Skip to content

Namespaces: note that enums are affected #4739

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DanielEScherzer
Copy link
Member

Prompted by a note on the manual page

Prompted by a note on the manual page
@DanielEScherzer
Copy link
Member Author

Comment on lines +94 to +95
types of code are affected by namespaces: classes (including abstracts and traits), interfaces, enums (since PHP 8.1),
functions and constants.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
types of code are affected by namespaces: classes (including abstracts and traits), interfaces, enums (since PHP 8.1),
functions and constants.
types of code are affected by namespaces: classes (including abstract classes, traits and enums), interfaces,
functions and constants.

The version indication implied to me what enums were there before 8.1, but could only be used in namespaces with 8.1. I think leaving out the version here is just fine, since when you don't have enums, clearly they can't be in a namespace.

Also, either both traits and enums should be mentioned separately, or they both should be considered a subset of classes. No strong feeling either way. Enums are more similar to classes than traits are, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants