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

CMS 6: Remove explicit dependency for Guzzle - use php-http/discovery instead. #200

Open
GuySartorelli opened this issue Feb 19, 2024 · 0 comments

Comments

@GuySartorelli
Copy link
Member

GuySartorelli commented Feb 19, 2024

Currently some of our modules have guzzle as an explicit dependency.

We should use php-http/discovery instead, which allows developers to use whichever PSR18-compatible library they want.
See https://docs.php-http.org/en/latest/discovery.html#using-discovery-in-a-shared-library which explains how to set this up, and some of the features such as automatically installing a compatible PSR18 library if one is not explicitly declared, and using Psr18Client as the runtime class which internally "will use whatever PSR-7, PSR-17 and PSR-18 implementations your users have installed."

Useful links

Acceptance criteria

  • The discovery pattern is used so that any library supplying an appropriate HTTP client can be used
  • No supported modules have a specific HTTP client in their composer dependencies
  • Any existing YAML config or PHP code that expects a specific HTTP client is updated to use and respect the relevant PSR interface.
@GuySartorelli GuySartorelli added this to the Silverstripe CMS 6 milestone Feb 19, 2024
@GuySartorelli GuySartorelli changed the title Remove explicit dependency for Guzzle - use php-http/discovery instead. CMS 6: Remove explicit dependency for Guzzle - use php-http/discovery instead. Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant