Re: Re: PHP 5.1 (Or How to break tousands of apps out there)

From: Date: Fri, 25 Nov 2005 10:11:33 +0000
Subject: Re: Re: PHP 5.1 (Or How to break tousands of apps out there)
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.internals 
Request: Send a blank email to internals+get-20358@lists.php.net to get a copy of this message
Lukas Smith wrote:
Marcus Boerger wrote:
That conclusion means stay with date in ext/date and have pear learn the lesson by making the same mistake in core. Once again the only solution is namespacing.
indeed. though this "mistake" applies to all of PEAR at this point ..
As has been pointed out before this isn't only a PEAR problem: Every single application out there defining a Date class has to be changed if the core adds a class with the same name. Is this common? One of our running gags here is that every project ends up adding its own set of date formating/conversion functions/classes at some point. So unless people are prefixing all local classes there is a rather good chance of having a class named Date in quite some projects. Section [7] of CODING_STANDARDS Naming Conventions states that "The class name should be prefixed with the name of the 'parent set'" but at the same time lists "Curl" as good. Now my question is whether the prefixing should be enforced (at least when a common name like Date is used)? Or a) am I missing something b) is it the core developers' opinion that core classes have the right of way? - Chris

« previous php.internals (#20358) next »