-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Enhance deprecation summary at end of tests #13279
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
} | ||
register_shutdown_function(function () use (&$deprecations, $deprecationHandler) { | ||
|
||
if (function_exists('posix_isatty') && @posix_isatty(STDOUT)) { |
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.
what about Windows users with ConEmu (I care less than previously though as I'm not running tests on Windows anymore and this is only about the testsuite, but it would be handy) ?
Btw, isn't it possible to get this info from PHPUnit itself (using colors if PHPUnit is using colors) ?
Regarding the remaining violations, I think Should legacy deprecation warnings be reported at all ? We expect to call deprecated APIs in this case. And your handler does not seem to check whether the error reporting level is asking to ignore them or no. I think most of the legacy tests are explicitly ignoring deprecations |
fdcbc00
to
93aad57
Compare
Updated: I now use the color support detection from phpunit (but not the command line argument, I don't want to dig too deep into the source code to find how). |
@nicolas-grekas can you make sure that all legacy tests being reported are only the legacy tests which don't have the |
@stof I don't check if iniSet has been called or not but I'll do it now, thanks for the reminder :) |
I think you need to add a |
93aad57
to
0787c41
Compare
Ready: I check |
0787c41
to
7b8cf01
Compare
@nicolas-grekas why ? If the error_reporting asks to ignore them (or if they are silenced by |
That's not because you use a deprecated method but |
Thank you @nicolas-grekas. |
…kas) This PR was merged into the 2.7 branch. Discussion ---------- Enhance deprecation summary at end of tests | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Splits deprecations triggered by legacy tests and non-legacy ones. Commits ------- 7b8cf01 Enhance deprecation summary at end of tests
Splits deprecations triggered by legacy tests and non-legacy ones.