Re: Reply on "Who is using namespaces in PHP already?"

From: Date: Tue, 16 Sep 2008 08:44:05 +0000
Subject: Re: Reply on "Who is using namespaces in PHP already?"
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-40527@lists.php.net to get a copy of this message
We had no issues related to the namespaces (well we found & reported some minor bugs, but not related to the namespaces). Of course we have one namespace per file, having the file structure following the namespace structure. As well, as Karsten mentions, converting some_class_name_new to some::class::name::new is not an option. We had no issues with the name resolution and no confusion so far on how to use the namespaces. In fact, we have a complex autoload procedure that follows the directory/namespace hierarchy to load/create (yes we generate some) classes. No issues with the autoload so far. Just one note: you should not throw Exceptions during the all autoload process, not just the __autoload function. I haven't checked the releases in the last month so this might have changed. Besides the namespaces, our internal framework uses in it fundamentals the Late Static Binding (for creating singletons and providing the static method get_instance ). In overall I can say that php 5.3 is highly anticipated (both because of the namespaces and LSB). I'm reading the ongoing discussions and proposals for support for multiple namespaces per file but this I think will delay 5.3. My opinion is that php 5.3. has to be finally released even with limited support for namespaces. It can be followed immediately with another release with the extended namespace support (this way many users will switch to namespace support although some CMS/frameworks will not because for optimization reasons they combine files). 5.3 was delayed enough already... Vesselin Kenashkov On Tue, Sep 16, 2008 at 2:10 AM, Jochem Maas <jochem@iamjochem.com> wrote: > Vesselin Kenashkov schreef: > >> Hi, >> >> At our company the majority of the projects in the last 4 months are using >> namespaces (we can afford using dev version of php, because we host the >> projects). >> Just to add my +1 into the count. >> > > care to elaborate? what are your experiences? have you run into any > trouble? > have you developed a list of do's and dont's? (as Karsten has) > > > >> Vesselin Kenashkov >> >> On Mon, Sep 15, 2008 at 5:26 PM, Karsten Dambekalns <karsten@typo3.org >> >wrote: >> >> Hi. >>> >>> Lukas asked on his Blog, so here goes my answer. >>> >>> We switched to namespaces last week for FLOW3 and all related packages. >>> See >>> http://forge.typo3.org/repositories/revision/21/1210 >>> for the needed >>> changes and >>> >>> http://forge.typo3.org/wiki/flow3-overview/Notes_on_using_PHP_namespacesfor >>> some notes on the implications. >>> >>> Currently we don't have any problems with use statements, as we still >>> have >>> fully qualified names almost everywhere, thus autoloading works as >>> expected. >>> >>> Still, looking into the future I'd love to see an enhancement as proposed >>> by Greg in >>> http://marc.info/?l=php-internals&m=121527668606247 plus some >>> way to get rid of having to use single classes if I could use some >>> wildcard >>> instead. >>> >>> Regards, >>> Karsten >>> -- >>> Karsten Dambekalns >>> Gimme Five! >>> http://typo3.org/gimmefive >>> >>> >>> >>> >> >

« previous php.internals (#40527) next »