Project

General

Profile

Actions

Bug #81375

closed

Autoloader won't recognize case-sensitive vendor names

Added by Moritz Ngo over 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-05-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I had a "very old" extension thats VendorName was "Myvendor".
I wrote a new extension a while ago with the VendorName "MyVendor".

TYPO3 CMS 8.7.1 wont recognize the difference between "Myvendor" and "MyVendor" if both extensions are installed.
Thus TYPO3 CMS 8.7.1 won't autoload classes in my new extension.
That generated an Exception:

Uncaught TYPO3 Exception Class 'MyVendor\MyExt\Utility\ModifyTca' not found

Actions #1

Updated by Moritz Ngo over 7 years ago

  • Description updated (diff)
Actions #2

Updated by Jigal van Hemert over 7 years ago

  • Status changed from New to Needs Feedback

Do both extensions have the same extension key? In PHP namespaces, class and function names, etcetera are case insensitive. Composer follows the PSR-4 standard which specifies that (fully qualified) class names must be specified (for the class loader) in a case sensitive way.
For PHP MyVendor\MyExt and Myvendor\MyExt are the same, but for the composer class loader they are different. If you use the same extension name with vendor names that only differ in case you can easily run into problems.

Is this the case for your extensions?

Actions #3

Updated by Moritz Ngo over 7 years ago

Both extensions have different keys. The FQCNs of both extensions would be something like this:

\Myext\OldExtension\Controller\FooController
\Myext\OldExtension\Utility\AwesomeUtility
\MyExt\NewExtension\Controller\BarController
\MyExt\NewExtension\Domain\Model\MyModel

Those extensions had nothing to do with each other except that \MyExt\NewExtension used some utility functions of \Myext\OldExtension.

BTW: I'm not using composer right now ...

Actions #4

Updated by Alexander Opitz about 7 years ago

Following questions on this:

  • Which OS do you use? And does it have a case sensitive Filesystem?
  • What are the extension keys for both?
  • Did you use the Complete cache clearing and the generating autoloader files in the install tool?
Actions #5

Updated by Riccardo De Contardi almost 7 years ago

  • Status changed from Needs Feedback to Closed

No feedback since the last 90 days => closing this issue.

If you think that this is the wrong decision and have more information about how to reproduce your problem, please reopen it or open a new issue with a reference to this one. Thank you.

Actions

Also available in: Atom PDF