Feature #37110

Make ext_autoload class names case insensitive

Added by Christian Kuhn over 7 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Miscellaneous
Target version:
Start date:
2012-05-11
Due date:
% Done:

100%

PHP Version:
5.3
Tags:
Complexity:
medium
Sprint Focus:

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 TYPO3 Core - Bug #38331: CamelCased classes in autoloader work only if read from cache Closed 2012-06-23

Associated revisions

Revision 9090ae4b (diff)
Added by Christian Kuhn over 7 years 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 (diff)
Added by Christian Kuhn over 7 years 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 (diff)
Added by Christian Kuhn over 7 years 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 (diff)
Added by Christian Kuhn over 7 years 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

#1 Updated by Gerrit Code Review over 7 years 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

#2 Updated by Gerrit Code Review over 7 years ago

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

#3 Updated by Christian Kuhn over 7 years ago

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

#4 Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF