[FLOW3-general] Package handling / autoloading

Adrian Föder adrian at foeder.de
Mon Jun 4 15:09:17 CEST 2012


Hi list,

I don't know what the intention for the "upcoming composer support" is, 
but for me there are the current lackings in the package 
handling/autoloading etc.:

   * The "Classes" path, i.e. the autoload target, currently must be 
"Classes" except stated in PackageStates.php. Due to the fact that 
PackageStates.php is a very loose file that's intended to get deleted 
and auto-created again, I'd suggest that the autoloading path should be 
declared in Meta/Package.xml. To keep this going, I'd even make a 
suggestion: it's named "<classesPath>" exactly as it's called in the 
PackageStates.yaml

   * Do we want so support co-delivered packages? I.e. a library that 
itself might be PSR-0-compatible? Than we need a draft suggestion for 
the location of this (maybe 
<packageRoot>/Resources/PHP/Libraries/fromHere/Upto/Theuser/) and we 
need to add a possibility to add this also to the autoloader. Maybe with 
<classesPaths> too, but with child nodes, or; to keep compatibility and 
establish distinction between the "primary FLOW3 package code" and "the 
library code", there's an additional key "dependenciesClassesPaths" or such.

   * third is related to http://forge.typo3.org/issues/37727 as I 
mentioned there below, I'd suggest to make the Package.php optional. At 
the moment, I'd change my mind a bit and state, it shouldn't necessarily 
made optional, but the location of the file itself should be variable 
and not "in the middle of all the other files". The Package.php file is 
a special one which not, IMHO, should be placed besides all other files 
(even if the namespace representation forces the file to be there).


What do you think about one or more of the mentioned points? :)


Thanks and best!
-adrian


More information about the FLOW3-general mailing list