Bug #66994
closedComposer autoload path detection is a bit too restricture
0%
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.
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
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.
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.
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
).
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.
Updated by Helmut Hummel over 9 years ago
- Status changed from Accepted to Resolved