PHP 7.4: new NewExceptionsFromToString sniff by jrfnl · Pull Request #814 · PHPCompatibility/PHPCompatibility
Navigation Menu
{{ message }}
PHPCompatibility / PHPCompatibility Public
- Notifications You must be signed in to change notification settings
- Fork 204
Merged
PHP 7.4: new NewExceptionsFromToString sniff#814
PHP 7.4: new NewExceptionsFromToString sniff#814
Conversation
Copy link Copy Markdown
Member
As of PHP 7.4, throwing exceptions from __toString() is now permitted. Previously this resulted in a fatal error. Existing recoverable fatals in string conversions have been converted to Error exceptions.
Refs:
- https://wiki.php.net/rfc/tostring_exceptions
- https://github.com/php/php-src/blob/374f7699821eb723a3a82a9854d18c0530b9d4e9/UPGRADING#L190
- php/php-src@a31f464
Related #808
> As of PHP 7.4, throwing exceptions from __toString() is now permitted. Previously this resulted in a fatal error. Existing recoverable fatals in string conversions have been converted to Error exceptions. Refs: * https://wiki.php.net/rfc/tostring_exceptions * https://github.com/php/php-src/blob/374f7699821eb723a3a82a9854d18c0530b9d4e9/UPGRADING#L190 * php/php-src@a31f464
jrfnl
added
Type: enhancement
PR: ready for review
labels
jrfnl
added this to the
9.2.0 milestone
jrfnl
requested a review
from wimg
jrfnl
mentioned this pull request
40 tasks
wimg approved these changes Jun 16, 2019
wimg
merged commit
37b4866
into
master
delete-merged-branch
bot
deleted the
php-7.4/new-to-string-exceptions
branch
jrfnl
removed
the
PR: ready for review
label
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 join this conversation on GitHub. Already have an account? Sign in to comment