[TYPO3-50-general] Feature request: Running different versions of a class in parallel

Joerg Schoppet joerg at schoppet.de
Thu Oct 11 14:02:24 CEST 2007


Hi,

I just thought about a similar handling for extensions (or whatever will
be the name in phoenix).

Actually, all extensions are in typo3conf/ext.

I think about a local repository like typo3conf/ext-base, where each
extension is saved  with its version
e.g.:
typo3conf/ext-base/jquery/1.1
typo3conf/ext-base/jquery/1.3

In typo3conf/ext will be in a standard way only symlinks (don't handle
windows actually) to the actual ext
e.g.
typo3conf/ext/jquery -> ../../ext-base/jquery/1.3

So, within the extension-manager I can simple switch between version AND
as a extension-developer I have the possibility to say:
"my extension depends on jquery"
  this means, just use the extension in typo3conf/ext/jquery
*but*
I can also say "my extension depends on jquery 1.1":
  this means, if the extension is not downloaded in this version the
extension-manager can do it and, if you use t3lib_div::makeInstance (or
a component-manager) it can recognizes to use typo3conf/ext-base/jquery/1.1

The next step then would be to make it configurable over TypoScript (or
Config), so a admin can set it on a global and page-specific level.


This would not solve problems with core-classes, but for extensions
(components) you would not have the need to rewrite classes.


Joerg



Elmar Hinz wrote:
> Hello,
> 
> I want to come up with a feature request for v5. Maybe it's already planned,
> maybe it's an inbuild feature of PHP6.
> 
> Today one of the big issues with TYPO3 is backward compatibility. Once a
> class has an API and a behaviour, you can't simply optimize it, because  of
> the dependent classes. You can extend it, but you can't freely change it.
> 
> I would find it extremely useful, if I could say, which version of a class
> or component I want to use. I would say that my current version of
> component X requires version 1.x.x - 1.9.x. 
> 
> The mechanism Robert designs for aspect orientation already manipulates the
> code. It should be possible in the same step to rename classes to respect
> the version of a component. For example:
> 
>  T3_MyClass could become T3_MyClass_1_16_2
> 
> Certainly you never hardcode a call to T3_MyClass_1_16_2. That would be the
> component managers job. You simply write T3_MyClass and set the required
> version in ext_emconf.php or whereever the dependency is defined.
> 
> Regards
> 
> Elmar


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