Skip to content
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

PHP 8.0: new PHPCompatibility.FunctionDeclarations.NewTrailingComma sniff #1164

Merged
merged 1 commit into from
Jul 18, 2020

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Jul 11, 2020

PHP 8.0 will allow trailing comma's in parameter lists for function declarations.

Allow a single optional trailing comma in parameter lists. This includes parameter lists for functions, methods and closures.

Refs:

This new sniff detects those.

I've tested and confirmed that arrow functions are included in this change.

Includes unit tests.

Related to #809

…a` sniff

PHP 8.0 will allow trailing comma's in parameter lists for function declarations.

> Allow a single optional trailing comma in parameter lists. This includes parameter lists for functions, methods and closures.

Refs:
* https://wiki.php.net/rfc/trailing_comma_in_parameter_list
* php/php-src@f545ee2

This new sniff detects those.

I've tested and confirmed that arrow functions are included in this change.

Includes unit tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants