Project

General

Profile

Actions

Bug #66994

closed

Composer autoload path detection is a bit too restricture

Added by Claus Due over 9 years ago. Updated about 6 years ago.

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

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Problem: the current resolving of autoloading paths relies on two hardcoded paths which completely break if any segment of the path involved is a symlink.

Example: typo3_src in DOCUMENT_ROOT is symlink to other folder. Autoloader file resolving attempts to load file using a bizarro ../../../../../...... path.

Suggested fix: allow configuring this as an ENV variable.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #67808: Introduce "Application" classes for all entry pointsClosedBenni Mack2015-06-29

Actions
Has duplicate TYPO3 Core - Task #67363: Support Composer classloader from vendor directoryClosedMathias Brodala2015-06-09

Actions
Actions #1

Updated by Gerrit Code Review over 9 years ago

  • Status changed from New to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39580

Actions #2

Updated by Helmut Hummel over 9 years ago

  • Status changed from Under Review to Needs Feedback

Claus Due wrote:

Example: typo3_src in DOCUMENT_ROOT is symlink to other folder.

How did that happen? If you install TYPO3 with composer (in a currently supported way), typo3_src is a folder, not a symlink.

Actions #3

Updated by Helmut Hummel over 9 years ago

  • Status changed from Needs Feedback to Accepted

OK. After thinking about this a bit longer, I came to the conclusion to agree that we need to be more flexible here.

My current idea:

The typo3/composer-installer plugin should evaluate the vendor dir specified in the root composer.json and should write an autoload.php file into the typo3 sources directory. This way we could always only require this file, while the user has full flexibility by being able to specify the path to the vendor dir.

Actions #4

Updated by Mathias Brodala over 9 years ago

Please also have a look at Flow setup which adds a custom ClassLoader which evaluates the root composer.json accordingly.

Going a step back I'd like to ask, if we need all this stuff at all, especially in light of #67212. If the Composer autoload.php is already included before our bootstrap is launched, everything will just work. Of course we need some kind of handling for legacy extensions without Composer autoload configuration (e.g. via classmap).

Actions #5

Updated by Helmut Hummel over 9 years ago

This is now resolved elegantly with #67808 being merged in master and some adaptions to the installer plugin, (exactly like I have written before).

Basically it does not matter any more where the vendor dir is. TYPO3 always finds the class loading information from composer, without any additional configuration.

Actions #6

Updated by Helmut Hummel over 9 years ago

  • Status changed from Accepted to Resolved
Actions #7

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF