Project

General

Profile

Actions

Bug #21506

closed

autoloader doesn't support ext_autoload from extensions having underscore in extkey

Added by Steffen Kamper about 15 years ago. Updated almost 15 years ago.

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

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If this is the case, the function
t3lib_autoloader::attemptToLoadRegistryForGivenClassName
fails with calculating extkey because it explodes with '_'

(issue imported from #M12519)

Actions #1

Updated by Francois Suter about 15 years ago

I just checked and - in fact - it works.

I used your extension reports_logview to check, since this is what led you to report this problem and went through the details of t3lib_autoloader with it.

The problem is that the class name of your reports class doesn't follow proper naming conventions. You called it:

tx_Reports_Logview

but since your extension is called "report_logview", your class should have been named something like:

tx_reportslogview_foobar

So if I rename your class to:

tx_reportslogview_Logview

and enter the following in the ext_autoload.php file:

'tx_reportslogview_logview' => $extensionPath . 'class.tx_reports_logview.php',

then change the ext_tables.php file accordingly:

'report' => 'tx_reportslogview_Logview'

It all works fine.

NOTE: the class name in the ext_autoload.php file must be all lowercase. I'm not totally happy with that, but it seems like most people are, see discussion "TYPO3 autoloader case sensitivity: your opinion please" in the typo3.projects.typo3_4-3.general mailing list.

Actions #2

Updated by Oliver Hader about 15 years ago

Thanks Fracois for testing this issue. If lowercase is a problem, we could add another strtolowercase() for processing/loading these registry files.

Actions #3

Updated by Oliver Hader about 15 years ago

Steffen, since this seems not to be a bug, could you please close this issue again? Thanks in advance!

Actions #4

Updated by Steffen Kamper about 15 years ago

i'll do, i first will test it too, thx.

Actions #5

Updated by Steffen Kamper about 15 years ago

I tested and yes, it works. Thanks Francois for investigating.

I really would like to add the strtolowercase because it's weird having class name
tx_reportslogview_Logview
and in autoload you need to declare it as
tx_reportslogview_logview

I will make new RFC for it.

Actions

Also available in: Atom PDF