Skip to content

full support to PHP 8.0 + add support for CurlHandle resource objects #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 14, 2020
Merged

full support to PHP 8.0 + add support for CurlHandle resource objects #71

merged 4 commits into from
Dec 14, 2020

Conversation

ildyria
Copy link
Contributor

@ildyria ildyria commented Dec 10, 2020

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets fixes #68, closes #70
Documentation -
License MIT

What's in this PR?

  • In PHP 8.0, Curl resources are changed to CurlHandle class objects. This changes DocBlock parameters and other areas where provided handles are checked with is_resource(), which now needs to account for the replaced CurlHandle class objects.

  • In order to apply the test, it uses the github workflows.

  • Migrate from php-http/client-integration-tests from ^2.0 to ^3.0

Why?

  • The author of PHP 8: Add support for CurlHandle resource objects #70 has not reacted since his PR, so nothing is moving.

  • Because in PHP 8.0, Curl handles are no longer resources, and this libraries is_resource no longer return true for valid Curl handlers.

  • Migrate from php-http/client-integration-tests so that PHP 8.0 is supported.

Example Usage

is_resource(curl_init()); // true in PHP < 8.0
is_resource(curl_init()); // false in PHP >= 8.0

@ildyria ildyria changed the title full migration to php 8.0 full support to PHP 8.0 + add support for CurlHandle resource objects Dec 10, 2020
@ildyria
Copy link
Contributor Author

ildyria commented Dec 10, 2020

@dbu I incorporated your suggestions to #70 in this PR.

@ildyria
Copy link
Contributor Author

ildyria commented Dec 10, 2020

Full CI run here: https://github.com/ildyria/curl-client/actions/runs/413449950

Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

can you delete the .travis.yml file as well? when you move the build to github actions, we don't need travis anymore.

@ildyria
Copy link
Contributor Author

ildyria commented Dec 11, 2020

@dbu fixed as per requested.

CI Run here: https://github.com/ildyria/curl-client/actions/runs/416459080
I enabled coverage as per the travis file, but I expect it to crash as I don't have access to the secrets in the repo.

@dbu
Copy link
Contributor

dbu commented Dec 14, 2020

thanks a lot, this is coming good!

as you expected, the coverage fails in your repository. i will merge and see if it works from our repository.

@dbu dbu merged commit dcb28fa into php-http:master Dec 14, 2020
restore-keys: ${{ runner.os }}-composer-

- name: Composer self update
run: composer self-update
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step should definitely not be here.

run: composer self-update

- name: Install Composer dependencies
run: composer update ${{ matrix.COMPOSER_FLAGS }} --prefer-source --no-interaction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer-source will be very slow

- name: boot test server
run: vendor/bin/http_test_server > /dev/null 2>&1 &

- name: Apply tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run?

@dbu dbu mentioned this pull request Dec 14, 2020
@dbu
Copy link
Contributor

dbu commented Dec 14, 2020

thanks for the review graham - i was so excited for php 8 that i missed those details. i do a cleanup in #74

@Ayesh
Copy link

Ayesh commented Dec 18, 2020

Author of #70 - thank you for picking up it in here, I'm happy to see it merged now. I apologize about my delays in the other PR, I was having some issues lately. 🙏🏼

@dbu
Copy link
Contributor

dbu commented Dec 19, 2020

thanks for having gotten the ball rolling @Ayesh and @ildyria for wrapping it up. collaboration for the win!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP 8 Support
4 participants