Project

General

Profile

Actions

Feature #33869

closed

Autoloader does not find class file if correct case is used

Added by Lucas Jenß almost 13 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-02-12
Due date:
% Done:

100%

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

Description

When adding a file to the autoloader, one has to write it all in lowercase, even if the class name itself is not, for the autoloader to find it, e.g.

class tx_foo_piSomeStuff {}

will not be found if the autoloader rule is set like this:

array('tx_foo_piSomeStuff' => $path);

but it will be found like this:

array('tx_foo_pisomestuff' => $path);

This behavior doesn't seem right, given that PHP's class naming system is case insensitive, the autoloader should imo just apply a strtolower() to the array key.

Actions #1

Updated by Thorsten Kahler almost 13 years ago

  • Tracker changed from Bug to Feature
  • Status changed from New to Needs Feedback

This would add

  • more and complex code to the autoloader
  • magic to the usage of the autoloader

which both are drawbacks.

Maybe you want to suggest some sentences for the missing documentation of the autoloader in #9286?

Actions #2

Updated by Steffen Gebert almost 13 years ago

  • Priority changed from Must have to Could have
Actions #3

Updated by Daniel Siepmann over 12 years ago

Perhaps we can just add a add a

strtolower
to the keys? That will it make a bit easier for the developers.
On the other hand, isn't this solved with TYPO3 4.6 and Extbase? All Classes using the Extbase convention will be found by the autoloader.

Reference/documentation: http://wiki.typo3.org/Autoload

Actions #4

Updated by Georg Ringer over 11 years ago

  • Status changed from Needs Feedback to Resolved
  • % Done changed from 0 to 100

solved with 6.0

Actions #5

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF