joomla / coding-standards

Joomla Coding Standards Definition
https://developer.joomla.org/coding-standards/basic-guidelines.html
GNU General Public License v2.0
128 stars 129 forks source link

Require visibility for class constants #245

Open mbabker opened 5 years ago

mbabker commented 5 years ago

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 commented 5 years ago

Makes sense to me

TomasVotruba commented 2 months ago

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