-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Only display report_memleaks
deprecation message in debug builds
#19521
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
report_memleaks
deprecation message with debug buildsreport_memleaks
deprecation message in debug builds
bca9b0d
to
ced2ca3
Compare
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.
I disagree. For better or worse the INI setting also exists for non-debug builds (e.g. it can be interacted with using ini_get()
and ini_set()
) and thus it should behave consistently across both modes. Part of the motivation for me is that folks might've used the INI setting without being aware that it does nothing for production builds. Making them aware that they can safely remove it is a feature. Otherwise it might get included in scripts and tutorials for eternity.
That's very unlikely, the current comment on the setting is very clear about it. |
It is true that the default php.ini of Sury's PPA has an uncommented The deprecation message will only be emitted if you change the |
Ah right, that alleviate my concern, thanks for reminding me that. Every deprecation has a cost, so I'm careful about minimizing that cost / reduce needless friction for adoption of newer versions. |
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.
As a release manager, this is ~approved in that there are no release considerations as long as it gets approved via the normal process too
As a core developer, however, I agree that we should always have the warning
@alexandre-daubois Given that Nicolas' concerns seem to be resolved and the reviews from Daniel and me, should we close this? |
Because the fix in PHPUnit is present in all maintained branches, I would say yes. Thanks for participating! |
The deprecation message about
report_memleaks
is being displayed when PHPT files are executed with PHPUnit. The PhptTestCase runner setsreport_memleaks=0
. A recent commit (sebastianbergmann/phpunit@0eae114) removes the setting. However, it’s been pushed to PHPUnit master and it doesn’t seem to be backported to old versions.You can see that the Symfony CI is a flooded by the deprecation message: https://github.com/symfony/symfony/actions/runs/17072154862/job/48412448854.
@nicolas-grekas proposes to disable the deprecation message on release build, the setting being no-op anyway, see #19481 (comment).