[TYPO3-v4] TYPO3 4.6 and PHP 5.3

Xavier Perseguers xavier at typo3.org
Wed Jun 29 13:57:00 CEST 2011


Hey Olly,

> Personally I really like the idea of namespaces and the problems that
> (might) get solved with using it. On the first view it look really
> simple, just use namespaces and you're done...

My idea behind that would be to (possibly) ease backport or inclusion of 
state-of-the-art libraries or components of v5 (such as Fluid) without 
further processing.

> I assume that there is a compatibility behaviour that supports both ways
> of creating instances with the t3lib static functions (namespaced and
> plain class names).

Basically the idea is that if *you* want to use namespaces, you could write

$myClassObj = t3lib_div::makeInstance('\TYPO3\MyExt\Components\MyClass');

and 3 lines after instantiate a standard TYPO3 library such as

$contentObj = t3lib_div::makeInstance('tslib_cObj');

This is the basic idea. The goal is not to rewrite Core to use 
namespaces but being able to add new code possibly with namespaces but 
above all let users start using namespaces and not having a dependency 
to 5.3 without being able to take full advantage of it.

> If I now think about extension developer that would
> start to write extensions with using namespaces, I fear that none of
> those extensions are usable with TYPO3 4.5 LTS (since the requirement is
> PHP 5.2).

This is a problem of course but...

> I'm not sure whether it's possible to have something like namespaces
> with a fallback for TYPO3 4.5 LTS and thus PHP 5.2...

... this is not what I plan. As said, the goal is to let developer have 
full power of 5.3 and let them decide if they want to support LTS or 
not. I'm a bit dubitative with a clever fallback mechanism...

-- 
Xavier Perseguers
Release Manager TYPO3 4.6

TYPO3 .... inspiring people to share!
Get involved: http://typo3.org



More information about the TYPO3-project-v4 mailing list