[TYPO3-50-general] Will Typo3 5.0 use namespaces with PHP 5.3/PHP 6?

Robert Lemke robert at typo3.org
Mon Jan 14 09:09:55 CET 2008


Hi Christoph,

(some note: please don't hijack threads - you just did by replying to  
the "Discussion to
CodingStandards" thread)

Am 13.01.2008 um 17:39 schrieb Christoph Blömer:

> will Typo3 5.0 use namespaces from PHP 5.3 and PHP 6 instead of the  
> long
> class names with prefixes?

In fact we have everything prepared from the beginning to be able to  
switch to namespaces
as soon as they are supported by PHP. But after the lengthy discussion  
in the php-internals
list we have decided to postpone namespaces support a little.

These two requirements must be met before we use namespaces:

   - the namespaces implementation must be stable, be released in a  
stable PHP version and
     the features must make sense (the current implementation looks  
promising).

   - there must be refactoring tools available which support namespaces.
     The problem is that if you want to rename or move classes during  
refactoring, you can't
     just do a global search & replace if you use the short class names.

     Imagine you want to rename the component manager  
(T3::Framework::Component::Manager) to
     component service (T3::Framework::Component:Service). If you just  
search & replace "Manager"
     this would end up in a chaos.

So, in general we really like namespaces, but we'd like to wait a  
little more until we use it.
We'll probably do so before having a final 1.0 release of the framework.

robert
-- 
http://typo3.org/gimmefive
http://buzz.typo3.org/people/robert-lemke/






More information about the TYPO3-project-5_0-general mailing list