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

Require visibility for class constants #245

Open
mbabker opened this issue Jun 17, 2019 · 2 comments
Open

Require visibility for class constants #245

mbabker opened this issue Jun 17, 2019 · 2 comments

Comments

@mbabker
Copy link
Contributor

mbabker commented Jun 17, 2019

With PHP 7.2 being required going forward, I propose all class constants are required to have a visibility declared so it is explicitly clear what constants are visible in what scopes. Obviously, most constants will have to be public for B/C.

@wilsonge
Copy link
Contributor

Makes sense to me

@TomasVotruba
Copy link

In case you plan to add private/protected modifier in next version with BC break, here is a way to automate it:https://tomasvotruba.com/blog/how-to-add-visbility-to-338-class-constants-in-25-seconds

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

No branches or pull requests

3 participants