We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Version: v4.1.8
Creating a class with the name "Enum" does not work because its in the keyword list.
$file = new PhpFile(); $namespace = $file->addNamespace('Test'); $class = $namespace->addClass('Enum');
This will throw an exception:
In ClassLike.php line 89: Value 'Enum' is not valid class name.
The reason:
Enum is a valid class name when its under a namespace:
<?php namespace Test; class Enum { }
I suggest to remove the keyword from the list or to create a real list of unsupported PHP class names: https://www.php.net/manual/en/reserved.keywords.php +
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Version: v4.1.8
Bug Description
Creating a class with the name "Enum" does not work because its in the keyword list.
Steps To Reproduce
This will throw an exception:
In ClassLike.php line 89: Value 'Enum' is not valid class name.
The reason:

Expected Behavior
Enum is a valid class name when its under a namespace:
Possible Solution
I suggest to remove the keyword from the list or to create a real list of unsupported PHP class names:
https://www.php.net/manual/en/reserved.keywords.php +
The text was updated successfully, but these errors were encountered: