Skip to content

Commit

Permalink
bug #1343 Add more reserved keyword (antalaron)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.x-dev branch.

Discussion
----------

Add more reserved keyword

As of PHP 8.1 `fn`, `match` and `readonly` are also reserved keywords. Cannot make a class named after them.

Commits
-------

f54a9fd Add more reserved keyword
  • Loading branch information
weaverryan committed Oct 10, 2023
2 parents e0504b0 + f54a9fd commit ab025cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ public static function validateClassName(string $className, string $errorMessage
'clone', 'const', 'continue', 'declare', 'default', 'die', 'do',
'echo', 'else', 'elseif', 'empty', 'enddeclare', 'endfor',
'endforeach', 'endif', 'endswitch', 'endwhile', 'eval',
'exit', 'extends', 'final', 'finally', 'for', 'foreach', 'function',
'exit', 'extends', 'final', 'finally', 'fn', 'for', 'foreach', 'function',
'global', 'goto', 'if', 'implements', 'include',
'include_once', 'instanceof', 'insteadof', 'interface', 'isset',
'list', 'namespace', 'new', 'or', 'print', 'private',
'protected', 'public', 'require', 'require_once', 'return',
'list', 'match', 'namespace', 'new', 'or', 'print', 'private',
'protected', 'public', 'readonly', 'require', 'require_once', 'return',
'static', 'switch', 'throw', 'trait', 'try', 'unset',
'use', 'var', 'while', 'xor', 'yield',
'int', 'float', 'bool', 'string', 'true', 'false', 'null', 'void',
Expand Down

0 comments on commit ab025cd

Please sign in to comment.