-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Opt in deprecations docs #3123
Opt in deprecations docs #3123
Conversation
009c04b
to
c8a5ef4
Compare
.. code-block:: php | ||
|
||
<?php | ||
set_error_handler(function ( |
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.
Is it actually a good idea to overwrite handler for all messages like that? Can we maybe suggest this instead only for deprecations?
set_error_handler(
function (int $code, string $message, string $file, int $line) : void {
echo sprintf('Deprecation: "%s" in %s:%d', $message, $file, $line);
},
E_USER_DEPRECATED
);
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.
Fixed
docs/en/reference/upgrading.rst
Outdated
This is of course overly simplified, and if you are looking for such an | ||
error handler, consider the ``symfony/debug``, error handler that will | ||
log deprecations. You may also be interested by the | ||
``symfony/phpunit-bridge`` error handler that will display deprecations |
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.
It'd be nice to expand on the symfony/phpunit-bridge
part. Imho that's the most convenient opt-in method.
c8a5ef4
to
041a769
Compare
Uh, we don't usually merge to 2.x branches, rather cherry-pick from master. This needs to be picked up to master now. :| |
Ah right, sorry for this |
No description provided.