PHP 7.0: New `PHPCompatibility.ParameterValues.NewAssertCustomException` sniff by jrfnl · Pull Request #1029 · PHPCompatibility/PHPCompatibility
Navigation Menu
{{ message }}
PHPCompatibility / PHPCompatibility Public
- Notifications You must be signed in to change notification settings
- Fork 204
Merged
Conversation
Copy link Copy Markdown
Member
jrfnl
commented
May 2, 2020
jrfnl
commented
assert() is now a language construct and not a function. Assertion can now be
an expression. The second parameter is now interpreted either as an exception
(if a Throwable object is given), or as the description supported from PHP 5.4.8 onwards.
Refs:
- https://wiki.php.net/rfc/expectations
- https://www.php.net/manual/en/function.assert.php#refsect1-function.assert-changelog
This sniff addresses that change.
Includes unit tests.
Partially addressed #908
…tion` sniff > assert() is now a language construct and not a function. Assertion can now be > an expression. The second parameter is now interpreted either as an exception > (if a Throwable object is given), or as the description supported from PHP 5.4.8 onwards. Refs: * https://wiki.php.net/rfc/expectations * https://www.php.net/manual/en/function.assert.php#refsect1-function.assert-changelog This sniff addresses that change. Includes unit tests. Partially addressed 908
jrfnl
added
Type: enhancement
PR: ready for review
labels
jrfnl
added this to the
10.0.0 milestone
jrfnl
requested a review
from wimg
wimg approved these changes May 20, 2020
wimg
merged commit
8a4a9ec
into
develop
wimg
deleted the
php-7.0/new-newassertcustomexception-sniff
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