Skip to content

Allow PHP 8 #389

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 27 commits into from
Dec 23, 2020
Merged

Allow PHP 8 #389

merged 27 commits into from
Dec 23, 2020

Conversation

ddeboer
Copy link
Contributor

@ddeboer ddeboer commented Nov 27, 2020

Q A
Bug fix? no
New feature? yes
BC breaks? yes
Deprecations? no
Related tickets
Documentation
License MIT

What's in this PR?

  • Allow HttplugBundle to be installed on PHP 8.
  • Remove support for guzzle6-adapter; support guzzle7-adapter instead.

Checklist

  • Updated CHANGELOG.md to describe BC breaks / deprecations | new feature | bugfix
  • Documentation pull request created (if not simply a bugfix)

@dbu
Copy link
Collaborator

dbu commented Nov 27, 2020

do we need to build with an RC of php 8? 8.0 is not found in the ci build :-/

@dbu
Copy link
Collaborator

dbu commented Nov 27, 2020

and thanks for looking into this! i am excited for php 8!

@ddeboer
Copy link
Contributor Author

ddeboer commented Nov 30, 2020

Whoa, suddenly we have all new kinds of failures. Due to Symfony 5.2?

@dbu
Copy link
Collaborator

dbu commented Nov 30, 2020

i think that is a symfony upgrade, yes:

Failed asserting that exception message 'The child config "cache_pool" under "httplug.clients.test.plugins.0.cache" must be configured: This must be a service id to a service implementing Psr\Cache\CacheItemPoolInterface' contains 'The child node "cache_pool" at path "httplug.clients.test.plugins.0.cache" must be configured.'.

i think the wording changed and we have assertions on that. can you adjust the assertion? i guess we should just look for httplug.clients.test.plugins.0.cache or something, otherwise the lowest version build will fail...

@ddeboer
Copy link
Contributor Author

ddeboer commented Nov 30, 2020

Depends on php-http/stopwatch-plugin#16.

@ddeboer
Copy link
Contributor Author

ddeboer commented Nov 30, 2020

Most jobs are green now. The remaining ones have to do with testing against guzzle6-adapter (by adding it to the DEPENDENCIES env var), which tries to install Guzzle 6, which obviously conflicts with Guzzle 7 required by the default guzzle7-adapter.

@dbu
Copy link
Collaborator

dbu commented Dec 2, 2020

i suggest we switch all tests to guzzle7-adapter then. we don't test the other integrations anyways. and guzzle7 should work on all php versions we allow.

@ddeboer
Copy link
Contributor Author

ddeboer commented Dec 11, 2020

Unfortunately guzzle7-adapter requires HTTPlug ^2.0, so now the test against HTTPlug 1.0 is failing. How important is it to keep that test?

@dbu
Copy link
Collaborator

dbu commented Dec 14, 2020

it would be nice to know it still works. can we put the guzzle7-adapter version into a variable? maybe a global variable that says guzzle7 and then we overwrite it in the build where we need guzzle6-adapter?

@ddeboer
Copy link
Contributor Author

ddeboer commented Dec 23, 2020

@dbu Only two failing test cases left. Do you have any idea what‘s going on there?

@dbu
Copy link
Collaborator

dbu commented Dec 23, 2020

almost, almost.
is it possible to install guzzle6 adapter along with guzzle7-adapter? if not, we should skip the Http\HttplugBundle\Tests\Functional\DiscoveredClientsTest::testForcedDiscovery in lowest version build (check if guzzle7-adapter is available and if not, skip)

@ddeboer
Copy link
Contributor Author

ddeboer commented Dec 23, 2020

Nope: in that case guzzlehttp/guzzle will conflict between versions 6 and 7. So I’ll skip this individual test.

But… shouldn’t the auto discovery find Guzzle6 in this case?

@ddeboer
Copy link
Contributor Author

ddeboer commented Dec 23, 2020

All green, thanks for your help!

Copy link
Collaborator

@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.

great, thanks!

@dbu dbu merged commit 80ace96 into php-http:master Dec 23, 2020
@dbu
Copy link
Collaborator

dbu commented Dec 23, 2020

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.

2 participants