PHP 7.0: New `PHPCompatibility.ParameterValues.NewAssertCustomException` sniff by jrfnl · Pull Request #1029 · PHPCompatibility/PHPCompatibility

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@jrfnl

Copy link Copy Markdown

Member

@jrfnl jrfnl commented

May 2, 2020

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:

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 jrfnl added this to the 10.0.0 milestone

May 2, 2020

@jrfnl jrfnl requested a review from wimg

May 2, 2020 17:08

@wimg wimg merged commit 8a4a9ec into develop

May 20, 2020

@wimg wimg deleted the php-7.0/new-newassertcustomexception-sniff branch

May 20, 2020 15:15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@wimg wimg wimg approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

10.0.0-alpha1

Development

Successfully merging this pull request may close these issues.

2 participants

@jrfnl @wimg