Feature #37110

Make ext_autoload class names case insensitive

Added by Christian Kuhn about 1 year ago. Updated about 1 year ago.

Status:Resolved Start date:2012-05-11
Priority:Should have Due date:
Assignee:- % Done:

100%

Category:Default
Target version:6.0.0
TYPO3 Version:6.0 Complexity:medium
PHP Version:5.3
Votes: 0

Description

Remove the hurdle that class names in ext_autoload (the key part of the returned array) have to be lower cased.

The patch adds two tests, the first one tests that a case sensitive class name in ext_autoload.php in actually lowercases before it is written to the autoload cache file. It fails if the autoloader patch is not applied. The second tests that camel cased classes can be successfully autoloaded.


Related issues

related to Core - Bug #38331: CamelCased classes in autoloader work only if read from c... Resolved 2012-06-23

Associated revisions

Revision 9090ae4b
Added by Christian Kuhn about 1 year ago

[FEATURE] Allow camelCased class names in ext_autoload

Remove the hurdle that class names in ext_autoload (the key part of
the returned array) have to be lower cased.

The patch adds two tests, the first one expects that a case sensitive
class name in ext_autoload.php in actually lowercases before it is
written to the autoload cache file. It fails if the autoloader patch
is not applied.
The second tests that camel cased classes can be successfully autoloaded.

Change-Id: I2ccf916d43a288a520f6f89e9002bdc4df2da0b2
Resolves: #37110
Releases: 6.0
Reviewed-on: http://review.typo3.org/11148
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
Reviewed-by: Philipp Gampe
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack

Revision 709f715c
Added by Christian Kuhn 11 months ago

[FEATURE] Allow camelCased class names in ext_autoload

Remove the hurdle that class names in ext_autoload (the key part of
the returned array) have to be lower cased.

The patch adds two tests, the first one expects that a case sensitive
class name in ext_autoload.php in actually lowercases before it is
written to the autoload cache file. It fails if the autoloader patch
is not applied.
The second tests that camel cased classes can be successfully autoloaded.

Change-Id: I2ccf916d43a288a520f6f89e9002bdc4df2da0b2
Resolves: #37110
Releases: 6.0
Reviewed-on: http://review.typo3.org/11148
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
Reviewed-by: Philipp Gampe
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack

Revision 304cdabe
Added by Christian Kuhn 11 months ago

[BUGFIX] CamelCased class names impossible with empty cache

Issue #37110 that aimed to allow case sensitive class name in
ext_autoload files has a bug that any class registered with CamelCased
class name is only found if the autoload entries are read from cache.

The patch now creates a lower cased entry as soon as the core_autoload
and ext_autoload files are read. There is an additional test that fails
if the changes in the autoload class are not applied. The naming of the
existing camelCase test was adapted to show that it is handling the
answer of an successful cache fetch only.

Additionally the current strtolower is changed to t3lib_div::strtolower
to make the whole thing multibyte safe.

Change-Id: I94f7ca5b3e60234f08433c747c00639d8dd219cd
Fixes: #38331
Related: #37110
Releases: 6.0
Reviewed-on: http://review.typo3.org/12310
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn

Revision e8766175
Added by Christian Kuhn 10 months ago

[BUGFIX] CamelCased class names impossible with empty cache

Issue #37110 that aimed to allow case sensitive class name in
ext_autoload files has a bug that any class registered with CamelCased
class name is only found if the autoload entries are read from cache.

The patch now creates a lower cased entry as soon as the core_autoload
and ext_autoload files are read. There is an additional test that fails
if the changes in the autoload class are not applied. The naming of the
existing camelCase test was adapted to show that it is handling the
answer of an successful cache fetch only.

Additionally the current strtolower is changed to t3lib_div::strtolower
to make the whole thing multibyte safe.

Change-Id: I94f7ca5b3e60234f08433c747c00639d8dd219cd
Fixes: #38331
Related: #37110
Releases: 6.0
Reviewed-on: http://review.typo3.org/12310
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn

History

Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11148

Updated by Gerrit Code Review about 1 year ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11148

Updated by Christian Kuhn about 1 year ago

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

Also available in: Atom PDF