PHP 8.0: NewTrailingComma: add check for trailing comma in closure use lists by jrfnl · Pull Request #1190 · PHPCompatibility/PHPCompatibility
…se lists PHP 8.0 introduced trailing comma's in function declaration parameter lists. A sniff to detect these was added via PR 1164. Since then, a new RFC has been voted on & accepted, to also allow trailing comma's in closure use lists. This adds an additional check to the `PHPCompatibility.FunctionDeclarations.NewTrailingComma` sniff to detect trailing comma's in closure `use` lists. Note: the error code for the original error message has been changed from `Found` to `InParameterList`, but as this sniff was only introduced recently and has not been released yet, this is not an BC-break. Refs: * https://wiki.php.net/rfc/trailing_comma_in_closure_use_list * php/php-src#5793
jrfnl
mentioned this pull request
40 tasks
jrfnl
changed the title
PHP 8.0 | NewTrailingComma: add check for trailing comma in closure use lists
PHP 8.0: NewTrailingComma: add check for trailing comma in closure use lists
wimg approved these changes Aug 9, 2020
wimg
deleted the
PHP-8.0/newtrailingcomma-detect-in-closure-use
branch
jrfnl
mentioned this pull request
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