Move the class modifiers consts to the ClassLike class
Since the modifiers apply to all of the ClassLike classes, it seems it would make more sense if those const where in this class instead.
This will likely require a major bump.
Thoughts?
I think if we move those constants, it might be best to create a separate Modifiers class for it. After all, they are not specific to classes, but are also used in methods, properties and constants.
+1 for:
it might be best to create a separate Modifiers class for it
Not directly using PHP-Parser in PHP, but taking it as reference for some other language related work. I agree It would be better if treated those as separate.
The same idea apply to Visibility. Currently Modifiers as well as Visibility are treated the same, as flags, if I have understood well the code in Class_ and ClassMethod.
Please take in consideration i am not aware about implementation issues this could bring. Just providing my 2 cents.
@davidmpaz The reason why I wouldn't separate visibility and other modifiers is that they are not ordered. I.e. both public static and static public are valid. It doesn't really matter in the current design where the modifiers are flags, but it would be a problem if we would also try to preserve the order in which the modifiers were declared in the future.