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 | PSR12/ConstantVisibility: allow for class constants to be final #3527

Commits on Jan 10, 2022

  1. PHP 8.1 | PSR12/ConstantVisibility: allow for class constants to be `…

    …final`
    
    PHP 8.1 introduces the ability to declare class constants as `final`.
    
    The tokenization of the `final` keyword in this context appears to be consistent PHPCS cross-version, so AFAICS no changes are needed to the PHP tokenizer.
    
    However, the `PSR12.Properties.ConstantVisibility` sniff does need to allow for them.
    
    Includes unit tests.
    
    Ref: https://wiki.php.net/rfc/final_class_const
    jrfnl committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    1b1fc31 View commit details
    Browse the repository at this point in the history