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
RFC: change deprecation error handler to use weak_vendors mode by default #27936
Comments
I've always been quite skeptical with weak_vendor mode. My reasoning is that you call the vendor code, so in the end there is no such thing as vendor-only deprecations. The example here is a good one: thanks to the default mode, we identified quite early that Doctrine was in "WIP" state. Without this early notice, it could have been left unidentified for much longer, thus fixed much later. I think the current default encourages a constructive open-source attitude: instead of having a "not my fault" attitude, it encourages ppl to own their vendor. That also works on Symfony: since we decided to build on top of Doctrine, we own a responsibility here also and keeping eyes actively open on the project is vital for the ecosystem. |
Can you please explain what exactly was WIP there? Two new silent (
Yes. And everything would work as before. It's not a bug, using deprecated API doesn't inherently break anything and the deprecated API stays in place until end of minor version (semver-compatible approach).
This is not relevant to whether The deprecations using
I agree it's everyone's responsibility to keep an eye on the vital state of their dependencies. Which brings me back to:
|
@the usage of the listener reporting deprecation and making tests fail for them is the opting in. This listener is optional, and deprecations are not making the testsuite fail if you don't have it. |
Is it really though? Only having the package installed seems it gets enabled automagically in the report everything mode: https://github.com/symfony/phpunit-bridge/blob/master/bootstrap.php Just installed it in a project without previously having the bridge (try yourself on doctrine/orm:2.6 for example), didn't change phpunit.xml at all, but
This is not opt-in. |
This should be considered on the recipe for the bridge I suppose. |
There should absolutely be no such thing, but unfortunately, it turns out people make mistakes, and both the caller and the callee (which triggers) will be in the same Composer package sometimes, because of careless mistakes. |
As I understand, the only way to silence these errors is to use an environment var |
I was not sure what
|
After a constructive discussion on Slack with @greg0ire, I updated my understanding of the topic. So here we are: This doesn't use |
I believe the solution implemented now is a good compromise. People can still complain about the deprecations or (ideally) fix them upstream without the deprecations disrupting their daily workflow. Thanks @nicolas-grekas! |
This RFC was prompted by the recent deprecations in various Doctrine projects, which now make some peoples' tests fail (example: doctrine/orm#7306). For a Symfony project, the default value for the deprecation handler should be
weak_vendors
, not0
- any deprecations within vendors are not within the scope of the application and thus shouldn't make tests fail.With Symfony Standard Edition being deprecated and Symfony Flex being the new Gold Standard (™️) I wasn't sure where to bring this up, so I thought I'd just ask around here. Would you be in favor for a change like that, and where would we make it?
The text was updated successfully, but these errors were encountered: