-
-
Notifications
You must be signed in to change notification settings - Fork 89
Description
PHP 8.5 introduces new syntaxes for which it should be verified if the Tokenizer needs updates and/or whether any sniffs need updating.
Action list
Notes:
- Action items in italics are tentative. Investigation and testing is needed to determine whether any changes are needed and if so, which.
- For action items not in italics, I'm fairly certain those will be needed.
- This list is not set in stone and is subject to change once investigation for supporting a syntax starts.
Action list
- Clone with v2
At first glance, this looks like this may be more involved than one might think, asclone()with parentheses will now behave like a function call, which may mean that FQN use ofcloneis now supported, use as first class callable, named parameters and thatclonemay need to be regarded as a parentheses owner.- Proposal needed on how to handle this for the tokenizer
- Tokenizer changes needed
- Updates needed to utility functions
- Sniff updates needed
- Final Property Promotion
- Pipe operator
- Tokenizer changes needed
This will also need significant tests with scope closer determination for arrow functions in combination with the pipe operator. - Updates needed to utility functions
- Sniff updates needed
- Tokenizer changes needed
- Asymmetric Visibility for Static Properties
- (No) Updates needed to utility functions -
getMemberProperties()- @jrfnl PR GH Actions: Bump actions/setup-node from 5.0.0 to 6.0.0 #1294 - Sniff updates needed
- (No) Updates needed to utility functions -
- Void cast (from Marking return values as important (#[\NoDiscard]) RFC)
- Tokenizer changes needed
- Updates needed to utility functions
- Sniff updates needed
- Support Closures in constant expressions
- Tokenizer changes needed
- Updates needed to utility functions
- Sniff updates needed
- First Class Callables in constant expressions
- Tokenizer changes needed
- Updates needed to utility functions
- Sniff updates needed
Contribution Process
If anyone familiar with the PHP and PHPCS tokenizer wants to start work on any of these, please leave a comment in this ticket to claim an action item.
New custom PHPCS tokens may be needed. If that's the case, please open a separate issue with a detailed proposal on how to handle the syntax, what alternatives have been considered, what the consequences would be and why the proposed option should be accepted. Please open this issue before creating a PR.
If anyone needs it, here are some examples of earlier proposals for supporting PHP syntaxes from before PHP 8.5:
- Proposal for supporting PHP 8.2+ Disjunctive Normal Form Types in the Tokenizer #387
- Reminder: revisit
yield fromtokenization #529 (comment)
Timeline
For anyone coming to this ticket to see when syntax support for PHP 8.5 syntaxes is expected, please do NOT spam this ticket with repeated comments asking for a timeline.
It will be ready when it's ready and whatever is ready will be included in a release forthwith.