Feature #21144
closedRemove ext_autoload.php files for extensions using Extbase naming convention
100%
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
Updated by Steffen Kamper over 13 years ago
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.
Updated by Kay Strobach over 13 years ago
fully agree - started question about this in the dev mailinglist
Updated by Xavier Perseguers over 13 years ago
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.
Updated by Kay Strobach over 13 years ago
but it should be compatible to extbase!
Updated by Kay Strobach over 13 years ago
perhaps the autoloader can be backported as extension similar to extbase ;)
Updated by Sebastian Fischer over 13 years ago
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.
Updated by Xavier Perseguers over 13 years ago
- 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
Updated by Mr. Hudson over 13 years ago
Patch set 1 of change I1af68a2d95cfc590eecffe6d06ea4e4eb58e11ec has been pushed to the review server.
It is available at http://review.typo3.org/2985
Updated by Xavier Perseguers over 13 years ago
- 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
Updated by Xavier Perseguers over 13 years ago
- Target version changed from 1281 to 4.6.0-beta1
Updated by Mr. Hudson over 13 years ago
Patch set 2 of change I1af68a2d95cfc590eecffe6d06ea4e4eb58e11ec has been pushed to the review server.
It is available at http://review.typo3.org/2985
Updated by Mr. Hudson over 13 years ago
Patch set 3 of change I1af68a2d95cfc590eecffe6d06ea4e4eb58e11ec has been pushed to the review server.
It is available at http://review.typo3.org/2985
Updated by Mr. Hudson over 13 years ago
Patch set 4 of change I1af68a2d95cfc590eecffe6d06ea4e4eb58e11ec has been pushed to the review server.
It is available at http://review.typo3.org/2985
Updated by Mr. Hudson over 13 years ago
Patch set 5 of change I1af68a2d95cfc590eecffe6d06ea4e4eb58e11ec has been pushed to the review server.
It is available at http://review.typo3.org/2985
Updated by Mr. Hudson over 13 years ago
Patch set 6 of change I1af68a2d95cfc590eecffe6d06ea4e4eb58e11ec has been pushed to the review server.
It is available at http://review.typo3.org/2985
Updated by Xavier Perseguers over 13 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 9b9ce42ea4327724234292df8da58b9c89757515.
Updated by Xavier Perseguers over 12 years ago
- Status changed from Resolved to Closed
Updated by Ernesto Baschny over 11 years ago
- Target version deleted (
4.6.0-beta1)