As found in #2151829-13: Doctrine annotation parsing takes an unacceptable amount of time/memory on install, there are 4 datetime class names that don't match their file names.
This actually matters for the Doctrine parser.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | datetime-case-8.patch | 1.73 KB | berdir |
| datetime-case.patch | 3.5 KB | tim.plunkett |
Comments
Comment #1
olli commentedLooks good to me.
Comment #2
chx commentedYay, PHP!
Edit:
php -r 'class x {static function foo(){}} ; $x = X::fOO(); var_dump($X);'
PHP Notice: Undefined variable: X in Command line code on line 1
Classnames are case insensitive. Method names are case insensitive. Variable names, however, are case sensitive.
Comment #3
olli commentedYes, beware class properties, static properties and constants =)
Comment #4
berdir50% of the DateTime classes were messed up like this, also tests. Simpletest didn't like that very much but those have been fixed already.
Comment #5
sunTo my knowledge, the DateTime module and plugins were modeled after PHP's native DateTime class.
PHP's native class name is CamelCased; i.e., DateTime as opposed to Datetime.
Do we rather want to rename the filenames to use DateTime, too?
Comment #6
berdirGood point, yes, we do.
Almost all other classes, with the exception of a single test are named DateTime...
I think this was changed at some point in the development of that patch/module and that messed this up...
Comment #7
tim.plunkettWell I can't roll that patch, because of my filesystem. Git won't let me.
Comment #8
berdir@timplunkett: Must be tough live under such inhuman circumstances :)
Comment #9
tim.plunkett:)
Comment #10
webchickI can't apply this because I'm on Mac:
Tentatively trying alexpott?
Comment #11
xjm8: datetime-case-8.patch queued for re-testing.
Comment #12
alexpottCommitted 562b775 and pushed to 8.x. Thanks!