Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Bridge/PhpUnit] Add PHPUnit 6 support#21694
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
4c982a4 to7f12fbeCompare| \PHPUnit_Util_Blacklist::$blacklistedClassNames['\Symfony\Bridge\PhpUnit\SymfonyTestsListener'] =1; | ||
| }else { | ||
| Blacklist::$blacklistedClassNames['\Symfony\Bridge\PhpUnit\DeprecationErrorHandler'] =1; | ||
| Blacklist::$blacklistedClassNames['\Symfony\Bridge\PhpUnit\SymfonyTestsListener'] =1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
why not using::class here ?
nicolas-grekasFeb 21, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
In fact I fogot that the bridge needs to be PHP 5.3 compatible, so I removed all the::class
7f12fbe to64ef41eComparepeterrehm commentedFeb 21, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Awesome 👍 |
64ef41e tof6915c2Comparef6915c2 to9e0745cCompare| return; | ||
| } | ||
| $UtilPrefix =class_exists('PHPUnit_Util_ErrorHandler') ?'PHPUnit_Util_' :'PHPUnit\Util\\'; |
nicolas-grekasFeb 21, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Note that I used this upper-first convention in this PR for the compatibility variables that hold the class names to use
garak commentedFeb 21, 2017
+1 for not applying BC policy |
stof commentedFeb 21, 2017
What are the BC breaks here ? |
nicolas-grekas commentedFeb 21, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@stof the type hints on the listener methods and the parent class of the TextUI classes - which all switch to namespaces when phpunit 6 is used |
stof commentedFeb 21, 2017
Well, the typehints are OK IMO. People are not expected to extend these classes, and the calling code is PHPUnit itself. And the signature comes from PHPUnit anyway. |
nicolas-grekas commentedFeb 21, 2017
Same to me, that's what is done here :) |
This PR was merged into the 3.3-dev branch.Discussion----------[Bridge/PhpUnit] Add PHPUnit 6 support| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#21125| License | MIT| Doc PR | -This PR makes our phpunit bridge compatible with all namespaced versions of phpunit, from 4.8.35 to 6.It takes another approach than#21668 and#21221, thus replaces them.Tested locally : tests pass when using phpunit 5.7, and fails with v6.0 because our own test suite is not yet compatible with it - but at least it runs nice.If this were handled as usual Symfony component, we would consider some changes to be BC breaks. But in this specific case - a phpunit bridge - it makes no sense to me to apply the bc policy here. I added `@final` and `@internal` annotations to make this clearer.Commits-------9e0745c [Bridge/PhpUnit] Add PHPUnit 6 support
This PR was merged into the 2.7 branch.Discussion----------Use PHPUnit 6.0 on PHP 7.* test lines| Q | A| ------------- | ---| Branch? | 2.7| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | need#21694 first| Fixed tickets | -| License | MIT| Doc PR | -Commits-------96ecd3c Use PHPUnit 6.0 on PHP 7.* test lines
garak commentedMar 6, 2017
Just tried the latest update with phpunit 6, I'm getting |
xabbuh commentedMar 6, 2017
Did you update your local installation of the bridge ( |
garak commentedMar 6, 2017
Here are relevant parts from my phpunit/phpunit 6.0.8 |
xabbuh commentedMar 6, 2017
This PR was not merged when 3.2.4 was released. You have to wait for 3.2.5 then. |
nicolas-grekas commentedMar 6, 2017
In fact, this PR has been merged in 3.3, |
garak commentedMar 6, 2017
OK, using |
aertmann commentedMay 11, 2017
waiting for a stable :D thanks guys |
Uh oh!
There was an error while loading.Please reload this page.
This PR makes our phpunit bridge compatible with all namespaced versions of phpunit, from 4.8.35 to 6.
It takes another approach than#21668 and#21221, thus replaces them.
Tested locally : tests pass when using phpunit 5.7, and fails with v6.0 because our own test suite is not yet compatible with it - but at least it runs nice.
If this were handled as usual Symfony component, we would consider some changes to be BC breaks. But in this specific case - a phpunit bridge - it makes no sense to me to apply the bc policy here. I added
@finaland@internalannotations to make this clearer.