-
Notifications
You must be signed in to change notification settings - Fork 97
Laravel 8 compatibility #36
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
Conversation
Updated to allow Laravel 8 compatibility because Laravel 8 requires "guzzlehttp/guzzle": "^7.0.1"
PHP 7.1 no longer supported due to Guzzle HTTP dependency upgrade
PHP 7.1 support deprecated with Guzzle HTTP dependency upgrade
Would like to see this merged as well as this is one of the last two packages holding me back from updating our services to Laravel 8 |
Add version constraint "^9.0" to phpunit/phpunit in order to support Laravel 8
Update phpunit version constraints
I'm sorry I am mistaken, only the root package 's dev dependencies are installed so you wouldn't need to update that in composer.json. You might want to revert the merge with my fork since there may be breaking changes in 9. |
Require-dev dependencies are only installed in the root project. Thus dev-dependencies included in this package won't affect external applications. Breaking changes might be introduced in new phpunit version.
Thank you for pointing this out. |
Reading the issues it looks like they're heading in a direction that would allow for any PSR-18 implementation (which includes Guzzle 7). It wouldn't make sense to switch the dependency to Guzzle 7 which would require a major version upgrade. I am going to put a PR in soon which switches things over to depend on a PSR-18 implementation. |
While the changes in this PR look good, I'm conflicted about merging it. Not sure if stopping support for PHP7.1 in a minor version bump would violate semantic versioning. Would like to hear your thoughts on this. |
I assumed that because Guzzle 7 has backwards compatibility breaking changes that requiring it would make it so that the library would as well. But that might not be the case, I'm not sure. If it can be done with a minor version upgrade I don't see much of a reason of not merging the changes. Edit: Could we potentially release this with |
The tests are passing without making any code changes and I reviewed the backwards compatibility breaking changes they introduced in Guzzle 7 (https://github.com/guzzle/guzzle/blob/master/UPGRADING.md), none of them is being used in the package. @ShawnCorrigan I like this suggestion! This solves the Laravel 8 problem without changing the minimum PHP version. Can someone apply this change please? |
I am not able to make changes but I put suggestions for @ngunyimacharia. If nothing else by the end of the day I can make a PR with the changes. On an unrelated note, if a package is using another package that has breaking changes that could effect the end user, but doesn't actually effect the package itself, would that be considered a breaking change in the first package? I'm not too familiar with semantic versioning so I'm not sure. As an example, the package doesn't ever interact with or reference the ConnectException class in Guzzle, but if the end user were to be catching the ConnectException and calling the The scenario is very unlikely as the method would always return false so there is no reason to call it, so I don't think it's a concern for this specific update. But I'm just wondering in general what that would be considered as. |
@ShawnCorrigan That's a very good question.The answer is tricky, and relative depending on who you ask in my opinion. This is how i understand this: It's generally common wisdom not to bump up a dependency major version in a minor version release, unless someone really knows what they are doing. For this package's case, Guzzle's object are abstracted away from the end user. The requests are requests internally and responses are handled adapted into a custom object before being returned to the users. The exceptions though are not. We are only catching the For the sake of this release, I think it would be ok given the small scale of the change, the limited Guzzle exposed objects by the package, and the fact that we'll be providing the end user with more than one option for installing Guzzle depending on their project's dependencies. Managing dependencies is fun 😄 |
On a side note, let's give @ngunyimacharia until the weekend, this is not super urgent. |
Allow installation of both Guzzle ^6.3 and ^7.0.1 to improve backward compatibility Co-authored-by: Shawn Corrigan <shawn.james.c@gmail.com>
Allow usage of any PHP version ^7.1 improve backward compatibility Co-authored-by: Shawn Corrigan <shawn.james.c@gmail.com>
PHP 7.1 included for testing to improve backward compatibility with minimal breaking changes. Co-authored-by: Shawn Corrigan <shawn.james.c@gmail.com>
I've accepted the suggested changes. |
@ngunyimacharia I'm ready to merge this now. One important question before I do though, were you able to verify that this works with Laravel 8? Thanks |
I haven't tried it as well. The integration we were using this for is no-longer active in our project. |
You don't need to run any code, just verify that installation works well on Laravel 8. I just pushed your changes as a dev branch to my composer package to make your life easier. Start a new Laravel8 project, then try this: Now try this: If this installs successfully then the changes are compatible with Laravel8 and we can merge this pull request. |
I can confirm, it installs successfully. |
Thank you @ngunyimacharia and @ShawnCorrigan for your contribution! |
So many thanks! |
Update guzzlehttp version to allow Laravel 8 compatibility. Laravel 8 requires "guzzlehttp/guzzle": "^7.0.1"