[RFC] Support optional comma in closure use list by TysonAndre · Pull Request #5793 · php/php-src
jrfnl added a commit to PHPCompatibility/PHPCompatibility that referenced this pull request
Jul 30, 2020…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
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