Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Oct 15, 2022

PHP 8.1 | BCFile/FunctionDeclarations::get[Method]Parameters(): allow for readonly keyword

... in constructor property promotion.

Note: the property_readonly key will always be added when constructor property promotion has been detected. The readonly_token only when the readonly token has actually been found.

Includes unit tests.

Ref:

PHP 8.1 | Variables::getMemberProperties(): detect if property is readonly

Includes:

  • Updating the Collections::$propertyModifierKeyword property to allow for the T_READONLY token.

Includes unit tests.

Ref:

jrfnl and others added 2 commits October 15, 2022 07:51
… for readonly keyword

> ... in constructor property promotion.
>
> Note: the `property_readonly` key will always be added when constructor property promotion has been detected. The `readonly_token` only when the `readonly` token has actually been found.
>
> Includes unit tests.

Ref:
* squizlabs/PHP_CodeSniffer 3516
…donly

Includes:
* Updating the `Collections::$propertyModifierKeyword` property to allow for the `T_READONLY` token.

Includes unit tests.

Ref:
* squizlabs/PHP_CodeSniffer 3480
* squizlabs/PHP_CodeSniffer 3513
* squizlabs/PHP_CodeSniffer 3515
* squizlabs/PHP_CodeSniffer 3584

Co-authored-by: Jaroslav Hanslík <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants