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.1: add support for readonly properties #363

Merged
merged 2 commits into from
Oct 15, 2022

Commits on Oct 15, 2022

  1. 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:
    * squizlabs/PHP_CodeSniffer 3516
    jrfnl committed Oct 15, 2022
    Configuration menu
    Copy the full SHA
    31d2849 View commit details
    Browse the repository at this point in the history
  2. PHP 8.1 | Variables::getMemberProperties(): detect if property is rea…

    …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 <kukulich@kukulich.cz>
    jrfnl and kukulich committed Oct 15, 2022
    Configuration menu
    Copy the full SHA
    1c40a07 View commit details
    Browse the repository at this point in the history