Skip to content
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

Enable php-http/discovery plugin #107

Merged
merged 2 commits into from
Feb 13, 2023
Merged

Conversation

keelanfh
Copy link
Member

@keelanfh keelanfh commented Feb 9, 2023

Breaking change in php-http/discovery prompts you to require a plugin. If accepted, this project build gets stuck in an endless composer loop. Endless loop is now fixed in php-http/discovery.

Discussion in discovery repo: php-http/discovery#213

@ekes
Copy link
Member

ekes commented Feb 9, 2023

I'm going to hazard a guess that some of our dependencies can depend on the PSR implementations that are made available by this. So removing it might not cause any obvious immediate failures, but might for a module auto-retrieving something using guzzle and something.

Reading the issue linked, it's maybe better to just pin it to the previous version, till people come to a better solution. php-http/discovery#208 (review) is specific to the looping. But composer create project is mentioned there, and the automated testing might be another. I've noticed the dependency certainly comes via something geo... so that's another thing that can't be certain it's got our top level composer file.

> lando composer why php-http/discovery
geocoder-php/common-http  4.5.0  requires  php-http/discovery (^1.6)

@ekes
Copy link
Member

ekes commented Feb 9, 2023

Spent some more time looking at this:-

a) the loop seems it is a bug, and they need to fix it, so we should pin for that bug;
b) then on upgrading we should include the plugins false line for testing (I also need to work out how to disable it for drupal-ci testing :) but we could explicitly allow for it in normal operation. I need to look at how geoceder-php uses it I guess. It is however the intended behaviour.

@keelanfh
Copy link
Member Author

keelanfh commented Feb 9, 2023

@ekes Sounds good to pin the previous version instead. The dependency comes through localgovdrupal/localgov_geo so maybe it's more appropriate that we pin it there instead?

@keelanfh
Copy link
Member Author

keelanfh commented Feb 9, 2023

I created a PR on localgov_geo instead of this one: localgovdrupal/localgov_geo#71 No longer relevant

@keelanfh keelanfh changed the title Disable php-http/discovery plugin Enable php-http/discovery plugin Feb 10, 2023
@keelanfh
Copy link
Member Author

php-http/discovery has now been updated to resolve the infinite loop issue: https://github.com/php-http/discovery/releases/tag/1.15.1

I've changed this PR to enable this new plugin, rather than disable it, at @ekes' suggestion. This runs fine for me, and gets rid of the prompt in the middle of the install, but I don't know enough to know if this is a good idea or not - or what implications it might have for CI pipelines. At least the tests on this PR seem to be working OK.

@keelanfh keelanfh marked this pull request as ready for review February 10, 2023 15:38
Copy link
Member

@ekes ekes left a comment

Choose a reason for hiding this comment

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

We've got the dependency via-via for the geocoders. Adding advised PSR implementations if not specified is what the plugin is supposed to do php-http/discovery#208 If it's working with true for automated testing as well as in operation I'm good with it.

Copy link
Member

@stephen-cox stephen-cox left a comment

Choose a reason for hiding this comment

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

Initially wondered if we needed this plugin, but as Ekes points out it's needed by the geocoder-php. The bug that broke things is now fixed so all good.

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.

None yet

4 participants