Feature #21144
closed
Remove ext_autoload.php files for extensions using Extbase naming convention
Added by Xavier Perseguers about 15 years ago.
Updated over 11 years ago.
Description
The use of ext_autoload.php files was once supposed to be used only for old-fashioned extensions that did not used Extbase naming convention (Classes directory, class component parts as subdirectories).
Nowadays, all new extensions (starting with Extbase itself) are polluted with a never-ending growing ext_autoload.php file and we slowly start adding all our classes there to be sure all will work fine without exactly knowing what really needs to be in.
The patch allows not less than the removal of the ext_autoload.php file for all extensions sticking to using only the Extbase naming convention. This file may still be used for some third-party classes that may be included in a pure Extbase-styled extension.
Note: This has nothing to do with extensions relying on Extbase itself, only on its naming convention.
(issue imported from #M12067)
Files
Good one! This also helps to use correct naming for classes and a well defined file structure.
Kickstarter has to be aware of this, i would like if kickstarter could produce compatible base.
fully agree - started question about this in the dev mailinglist
As this is new feature, this should go to 4.6. We could even go one step further a make it compatible with PHP 5.3 namespaces.
but it should be compatible to extbase!
perhaps the autoloader can be backported as extension similar to extbase ;)
There is one incorrect thing:
$extensionKey = strtolower(array_shift($classNameParts));
As extenionkeys could contain an underscore the conversion needs to replace uppercase to _lowercase. beside that all looks fine.
- Tracker changed from Bug to Feature
- Target version changed from 4.6.0-beta1 to 1281
- TYPO3 Version changed from 4.3 to 4.6
Patch set 1 of change I1af68a2d95cfc590eecffe6d06ea4e4eb58e11ec has been pushed to the review server.
It is available at http://review.typo3.org/2985
- Status changed from New to Under Review
- Assignee set to Xavier Perseguers
How to test:
- Take one of your extension where you stick to naming convention but still need an ext_autoload.php file.
- Remove one of the class
- TYPO3 will fail to instantiate your class
- Apply patch
- Retry
- Target version changed from 1281 to 4.6.0-beta1
Patch set 2 of change I1af68a2d95cfc590eecffe6d06ea4e4eb58e11ec has been pushed to the review server.
It is available at http://review.typo3.org/2985
Patch set 3 of change I1af68a2d95cfc590eecffe6d06ea4e4eb58e11ec has been pushed to the review server.
It is available at http://review.typo3.org/2985
Patch set 4 of change I1af68a2d95cfc590eecffe6d06ea4e4eb58e11ec has been pushed to the review server.
It is available at http://review.typo3.org/2985
Patch set 5 of change I1af68a2d95cfc590eecffe6d06ea4e4eb58e11ec has been pushed to the review server.
It is available at http://review.typo3.org/2985
Patch set 6 of change I1af68a2d95cfc590eecffe6d06ea4e4eb58e11ec has been pushed to the review server.
It is available at http://review.typo3.org/2985
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
- Target version deleted (
4.6.0-beta1)
Also available in: Atom
PDF