Skip to content

Cannot use match as an identifier. It is a reserved keyword since PHP8.0 #217

@arnolanglade

Description

@arnolanglade

I tried to upgrade a project to PHP 8.0 but I got this error:

Parse error: syntax error, unexpected token "match", expecting identifier in /vendor/coduo/php-matcher/src/Matcher/Pattern/Expander/Match.php:10

We cannot use match as an identifier anymore because it is a reserved keyword since PHP 8.0. I don't know if there are other problems with a PHP 8.0 upgrade but this class can be easily renamed. What do you guys think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions