-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
PHPUnit 7 #22998
PHPUnit 7 #22998
Conversation
I believe that introducing phpunit 7 would make it harder for package developers to maintain stuff for both Laravel 5.5 and Laravel 5.6. Is there any new features in phpunit 7 we need? |
|
So we shouldn't upgrade any components that soon adopting to return and scalar type?? |
@crynobone You're over-interpreting the case here. We can upgrade to the latest phpunit 6, but upgrading to a new major version that uses features we do not use ourselves yet is a bit weird. |
We had the same argument last year when Laravel drop PHPUnit 5.7 and goes for PHPUnit 6. I see no different here, and this is from the person maintaining Orchestra Testbench which is used for package developer to run Laravel tests. |
Should we at least wait until the PHPUnit 7 announcement with list of breaking changes? If I read packagist timestamps correctly phpunit 7.0.0 was released four hours ago. |
@sisve PHPUnit 7 annoucement https://phpunit.de/announcements/phpunit-7.html |
And there are no breaking changes from 6 to 7? Surprising |
Ah, I was staring at https://github.com/sebastianbergmann/phpunit/wiki. Sure, there are breaking changes. That's why our travis is failing. How are package developers expected to target several Laravel releases today? Do we expect them to be able to serve several releases from one branch, or do they need to create a separate branch (and thus release) for every Laravel release? Does the gains of phpunit 7 compensate for the complexity for package developers to maintain two separate branches with different dependencies for testing? |
If any of the packages developer actually override the single class that are failing here (which is unlikely if you understand the actual code) then yes, you are correct. That the exact same thing that happen last year with PHPUnit 5.7 versus 6.0 where some of the internal classes need to be updated due to |
@crynobone We are facing PHP 7 method signatures conflicts here, and as Laravel does not use it, PHPUnit 7 is out of scope now |
@carusogabriel that failing class extends |
@crynobone I agree with you. Actually, I'm a huge fan of PHP 7 return and scalar types. But, or we use everywhere, or we don't use. Imagine the amount of PR that will show up if one class starts to use them 😞 |
Sure, if one of Symfony components start using return scalar we have to stop supporting newer version, because we depends a lot of Symfony components and we can't have those. That what you guys trying to suggest here. |
We're asking questions that are relevant, and I'm getting the vibes that you're intentionally misunderstanding them to the extreme.
|
Note that I am not asking questions about code. I am asking questions about policies and release management. These are human problems, not code problems. These are decisions that needs to be considered and documented. We need to be able to say "We intentionally dropped support for phpunit 6 in 5.6" when people ask. We do not want to be put in a decision where we're vague and saying "it probably works, try it and check. we're not sure what version is supported." |
No, we aggressively upgrade from PHPUnit 5.7 to PHPUnit 6.0 in Laravel 5.5.0 release. Laravel Framework 5.5 stop testing older PHPUnit (5.0 to 5.7). See #17755 for details.
Based on history, we stop supporting PHPUnit 6. Package developer can use Again, if you actually look at the code, none of packages developer would actually override any of those methods.
If we need to override |
The linked issue regarding upgrade to phpunit 6 contains discussion over 20 days before being merged. It seems to be a mess of communication, and it's unclear what we support and doesn't support. There were no authoritative answer on what versions of phpunit we actually support, as you mentioned in the issue. Just because we did it weird last time doesn't mean we have to do it weird this time. Regarding the Symfony question, I would have us stay on 3.4 LTS instead of 4.0. The 3.4 LTS will be supported for a few years (4.0 less than a year), there's no reason to upgrade. I believe that Symfony packages will target both 3.4 LTS and 4.0, so there should be versions of those packages we can use if needed. I don't see the need to upgrade to 4.0 at all. In fact, the 4.0 seems to be such huge number of changes that we should probably wait until we can bundle it with a Laravel LTS release just to avoid forcing people writing code that targets two different versions of Symfony. |
My arguments on the original PR because it was first targetting 5.4 (which was on patch support). But as the discussion move forward it was later push to 5.5. PHPUnit later create a release to support namespace aliases in 4.7.28 which allows Laravel 5.4 to continue working on 4.7. Laravel 5.6 is already pulling Symfony 4.0. PHPUnit 6.x is going to be support until feb 2019. Assuming we hold off for Laravel 5.6 we still have to either do it in 5.7 or 5.8. And during these time every Laravel developers who use |
Why does what version of PHPUnit that the framework itself uses to test its own code have ANY bearing on package developers? I'm confused. |
This isn't very helpful until the problems are fixed. If someone submits a PR please submit after the necessary changes are made to get green tests. |
No description provided.