I've noticed some incorrect lowercasing when constant names match certain PHP keywords. The casing-changes keep accidentally slipping into my commits and it's driving me crazy! I couldn't find a supported way to disable this 'rule' (not sure if it is even a rule) so I figured I'd raise an issue since a const shouldn't really be renamed by a formatter!
To see this, run phpfmt on a class with constants whose names match keywords, for example, print or list in uppercase:
abstract class MyConstants
{
const EXAMPLE = 'example';
const LIST = 'list';
const PRINT = 'print';
const TESTING = 'testing';
const ECHO = 'echo';
}
Hey!
I've noticed some incorrect lowercasing when constant names match certain PHP keywords. The casing-changes keep accidentally slipping into my commits and it's driving me crazy! I couldn't find a supported way to disable this 'rule' (not sure if it is even a rule) so I figured I'd raise an issue since a
const
shouldn't really be renamed by a formatter!To see this, run phpfmt on a class with constants whose names match keywords, for example,
print
orlist
in uppercase:The
const
names get changed upon formatting:Is there some way to disable this?
Thanks for the great formatter!