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] Add support for Enum #3004

Merged
merged 4 commits into from
Feb 18, 2021
Merged

[PHP] Add support for Enum #3004

merged 4 commits into from
Feb 18, 2021

Commits on Feb 14, 2021

  1. [PHP] Add enum to class-like naming patterns

    PHP 8.1 adds support for Enums with [`enum` syntax](https://php.watch/versions/8.1/enums#enum-syntax).
    
    Adding `enum` keyword to class naming pattern matches, and relaxing the class structure matching to allow `:` character to support Backed-Enum syntax.
    Ayesh committed Feb 14, 2021
    Configuration menu
    Copy the full SHA
    d6a0c53 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ba464d1 View commit details
    Browse the repository at this point in the history
  3. [PHP] Improve class-name syntax pattern for Enums

    Brilliant suggestion by @joshgoebel to use variants with different `illegal` matching patterns. Enums can contain a colon, but not other class-like structs such as `trait`, `interface`, and `class`.
    
    Co-authored-by: Josh Goebel <me@joshgoebel.com>
    Ayesh and joshgoebel committed Feb 14, 2021
    Configuration menu
    Copy the full SHA
    36f601d View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2021

  1. Configuration menu
    Copy the full SHA
    4484d54 View commit details
    Browse the repository at this point in the history