[TYPO3-core] TYPO3 CMS composer & class loader

Thomas Maroschik tmaroschik at dfau.de
Mon Oct 27 08:26:29 CET 2014


Hi Georg,

my personal plan is to use the autoloader directly in the future. It is 
easier to tell the composer autoloader how to load TYPO3 packages than 
the other way round. With greater focus on this packages will work much 
like packages in Flow. It doesn't matter if they are composer or T3 
based. Currently the autoloader could load PSR-0 compatible Composer 
packages if activated in the Package Manager. But as in Flow the package 
manager doesn't resolve dependencies upon the activation. The Extensions 
Manager doesn't show Composer packages, which is a pity but will be 
tackled by my work during Q1 2015.

The more interesting question is how we update those packages especially 
if the core uses them. Currently 3rd party code resides either in 
typo3/contrib or Resources/ of one of the system extensions. This makes 
it easy to update the core because it's bundled. But if all packages 
would reside in Packages/ updating TYPO3 without composer (with the 
bundled zip/tgz) becomes tougher, because one has to selectively update 
the individual packages. If a package dependency is removed from the 
core one may not notice that and the package will be present eternally 
on your installation.

So in my opinion the biggest questions revolve around our future 
workflow. I once proposed to explore phar files in this regard, which 
would make bundling the core along with some dependencies easier again 
and making updates via lowlevel deployment techniques (eg FTP) much 
easier and atomic. It still like the idea.

Greetz,

Tom

Am 26.10.14 08:17, schrieb Georg Ringer:
> Hi everybody,
>
> I would like to know if there are any plans how to instantiate the class
> loader of packages loaded by composer.
>
> This is not only regarding packages I could use in custom extensions but
> also for the core itself.
>
> Currently what I do is in the AdditionalConfiguration
> ----
> $path = __DIR__ . '/../Packages/Libraries/autoload.php';
> require_once($path);
> ----
>
> which is of course not the best solution.
>
> Thanks for some ideas & thoughts about the future
> Georg

-- 
Thomas Maroschik
TYPO3 CMS Active Contributor

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


More information about the TYPO3-team-core mailing list