afosto / yaac

Yet another ACME client: a decoupled LetsEncrypt client
Other
219 stars 85 forks source link

Support for guzzle 6 or 7 #30

Closed mikemunger closed 3 years ago

mikemunger commented 3 years ago

Guzzle 7 has released, and in order for users to be able to use yaac with projects on the leading edge of dependency upgrades (such as Laravel 8 requiring guzzle ^7.0), it would probably be a good idea to check the feasibility of updating yaac dependencies to something like "guzzlehttp/guzzle": "^6.3|^7.0"

However, guzzle 7 does require "php": "^7.2.5" so this might create a case for a 2.0 of yaac so it doesn't break unexpectedly for users on php 7.0/7.1. Even php 7.2 is EOL after Nov 30, 2020.

ssbrar commented 3 years ago

I was having installation failed issue on laravel 8, but I managed to sort it out by updating my composer.json for guzzlehttp as follows: "guzzlehttp/guzzle": "^6.5",

bakkerpeter commented 3 years ago

@mikemunger thanks for putting in some background information and your suggestion. I'm thinking about putting in a new version (2.0) with httplug support. I believe this will eliminate most compatibility issues. Any con's / caveats I'm missing - I'm not very familiair with Laravel?

mikemunger commented 3 years ago

I have done some more research after the comment by @ssbrar

I was wrong about the requirement for laravel 8. My confusion was from the difference between laravel/laravel (new app skeleton) and laravel/framework (the actual framework).

The laravel 8 skeleton app in composer uses "guzzlehttp/guzzle": "^7.0.1" which is why I thought it was now required, but the framwork itself is "guzzlehttp/guzzle": "^6.5.5|^7.0.1",

So updating the yaac composer is actually not necessary, it is compatible with laravel 8 as long as you update a new laravel 8 app composer with the 6.5 compat line it does work -- it's really an issue with the laravel 8 app skeleton composer defaults.

So @bakkerpeter to answer your question, using httplug is not necessary to resolve this specific issue, but as you have implied may further increase compatibility for the future since it would allow any PSR7 compatible underlying http library, which includes guzzle 6 and 7 and probably others as well.

bakkerpeter commented 3 years ago

Thanks again!