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
Output deprecations in CI results #10061
Conversation
@Seldaek Thanks for the ping. I'd been using I think this is definitely a huge improvement. It still doesn't show enough detail about the actual deprecations (backtrace) to fix them and also still doesn't fail the build on tests with deprecations, but that seems inherent to the Symfony PHPUnit Bridge package, so I guess that's something we just have to accept for now. Still 97 deprecation notices to fix in PHP 8.1, but at least that's now visible. 👍🏻 |
I think I may still have a few more fixes lined up locally, will check and pull what I have and is ready. |
Yeah you still need to run this locally with something like this in phpunit.xml.dist to get full stack traces, but it at least lets one quickly check the CI output to see if there is anything to worry about.
See the last commit 6aa2d15 for something which should help resolve a bunch of the issues, once all tests have been adapter to make use of it. Because the default mock builder returns null by default for undefined calls which tends to cause lots of the current problems. Another big issue still is places using mocks for Package instances which is probably a bad idea vs just configuring a regular package value object and using that. It also leads to lots of nulls. Anyway have to pack it up for today :) |
And just FYI and to avoid wasting your time, I'll most likely keep going with the test refactorings tomorrow using the above as a base. |
@Seldaek Thanks for the update and the heads-up! I'll hold off looking at anything for now while you're doing this refactor. |
You may also raise the phpstans' phpversion, so you get errors including the actual location: |
What do you mean @staabm ? We run phpstan on php7.4, which is fine, no? |
You can configure it to report errors of newer php versions you run it with in the config file. So you can "enable reporting of errors" which would be emitted by e.g. php 8.1 even when running it with e.g. php7.4 |
This should get us the deprecations right on the CI for PHP 8.1, so easy to keep an eye out for more.
Fixes #10038
/cc @jrfnl