Merged
Conversation
009c04b to
c8a5ef4
Compare
Majkl578
reviewed
May 1, 2018
| .. code-block:: php | ||
|
|
||
| <?php | ||
| set_error_handler(function ( |
Contributor
There was a problem hiding this comment.
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
);
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 |
Contributor
There was a problem hiding this comment.
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
jwage
approved these changes
May 2, 2018
Contributor
|
Uh, we don't usually merge to 2.x branches, rather cherry-pick from master. This needs to be picked up to master now. :| |
Merged
Member
Author
Ah right, sorry for this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.