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
Remove getMock() #2194
Comments
As soon as 5.4 marked stable these lines (https://github.com/sebastianbergmann/phpunit/blob/5.4/src/Framework/TestCase.php#L1557) causes all project using stable phar or phpunit/src/Util/Configuration.php Line 630 in fe1336d
Is it really neccessary to forcibly add warning on call? The interesting moment that when using php7 - tests pass well, warning is ignored (or not raised?). |
@scaytrase |
I'm not really sure which option leads to this (this one has caused Symfony 2.7 fail two years ago then they started to
(13 equal warnings)
|
As you can see in https://github.com/sebastianbergmann/phpunit/blob/5.4/src/Framework/TestCase.php#L936, these deprecation warnings are only generated when the test was successful, meaning that they do not hide test failures. |
The problem is on the other side. Previously successful test suite fails just because the enviorment (phpunit-stable) or dependency (~5.x) changes, so it looks like a BC-break at 5.4, not at 6.0 As far as I understand this does not comform well with semver or this project does not follow it strictly? |
A warning does not fail a test suite. |
Yeah, you are fully correct, sorry. Cannot reproduce this on a sample test case. I'll try to search why travis' phpunit exits with 1 on 5.6 Thank you for clarifying |
I've wrote a sample demonstration. PhpUnit exits with code 1 silently with travis, php 5.6.5 and phpunit 5.4.6 https://github.com/scaytrase/pu54-sample The php 5.6 build has the warning at the output: Could you take a look? May be I do something wrong, but the sample is as simple as possible |
As you can see in the example below, a warning does not mark the test execution as a failure:
Exit code 0 means success. Also note that this ticket is the wrong place to discuss your issue. This ticket is just a reminder to remove functionality for PHPUnit 6 that is deprecated in PHPUnit 5. |
Deprecated since PHPUnit 5.4.
The text was updated successfully, but these errors were encountered: