Project

General

Profile

Actions

Feature #21144

closed

Remove ext_autoload.php files for extensions using Extbase naming convention

Added by Xavier Perseguers over 14 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2009-09-25
Due date:
% Done:

100%

Estimated time:
PHP Version:
5.2
Tags:
Complexity:
Sprint Focus:

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

12067.diff (1.35 KB) 12067.diff Administrator Admin, 2009-09-25 22:05

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #25337: Add PHP 5.3 namespace supportClosed2011-03-16

Actions
Actions #1

Updated by Steffen Kamper about 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.

Actions #2

Updated by Kay Strobach about 13 years ago

fully agree - started question about this in the dev mailinglist

Actions #3

Updated by Xavier Perseguers about 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.

Actions #4

Updated by Kay Strobach about 13 years ago

but it should be compatible to extbase!

Actions #5

Updated by Kay Strobach about 13 years ago

perhaps the autoloader can be backported as extension similar to extbase ;)

Actions #6

Updated by Sebastian Fischer about 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.

Actions #7

Updated by Xavier Perseguers almost 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
Actions #8

Updated by Mr. Hudson almost 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

Actions #9

Updated by Xavier Perseguers almost 13 years ago

  • Status changed from New to Under Review
  • Assignee set to Xavier Perseguers

How to test:

  1. Take one of your extension where you stick to naming convention but still need an ext_autoload.php file.
  2. Remove one of the class
  3. TYPO3 will fail to instantiate your class
  4. Apply patch
  5. Retry
Actions #10

Updated by Xavier Perseguers almost 13 years ago

  • Target version changed from 1281 to 4.6.0-beta1
Actions #11

Updated by Mr. Hudson almost 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

Actions #12

Updated by Mr. Hudson almost 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

Actions #13

Updated by Mr. Hudson almost 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

Actions #14

Updated by Mr. Hudson almost 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

Actions #15

Updated by Mr. Hudson almost 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

Actions #16

Updated by Xavier Perseguers almost 13 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #17

Updated by Xavier Perseguers about 12 years ago

  • Status changed from Resolved to Closed
Actions #18

Updated by Ernesto Baschny almost 11 years ago

  • Target version deleted (4.6.0-beta1)
Actions

Also available in: Atom PDF