Bug #69658
closedCustom composer packages won't load
0%
Description
According to the wiki article TYPO3 will load custom Composer packages from Packages/Libraries/ when the constant TYPO3_COMPOSER_AUTOLOAD is set.
This doesn't work because the code which determines the path to Packages/Libraries/ returns the real path to the core instead of the path to the webroot.
Actual result:
/Users/$user/Sites/TYPO3/6-2/typo3/sysext/core/Classes/Core/../../../../../../Packages/Libraries/autoload.php
Expected result:
Packages/Libraries/autoload.php
Updated by Gerrit Code Review about 9 years ago
- Status changed from New to Under Review
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43184
Updated by Gerrit Code Review about 9 years ago
Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43184
Updated by Mathias Brodala about 9 years ago
Your setup will work if /Users/$user/Sites/TYPO3/Packages/Libraries/
is your vendor-dir
. Have you tried that? For 6.2 no other layout is supported.
(Resolving the path you mentioned gives /Users/$user/Sites/TYPO3/Packages/Libraries/autoload.php
)
Updated by Stefano Kowalke about 9 years ago
My folder structure looks like
. ├── Packages ├── composer.json ├── composer.lock ├── fileadmin ├── index.php -> typo3_src/index.php ├── typo3 -> typo3_src/typo3 ├── typo3_src -> /Users/sok/Sites/TYPO3/6-2 ├── typo3cms ├── typo3conf ├── typo3temp └── uploads
Updated by Mathias Brodala about 9 years ago
What's the full path to this root directory here? Again, your vendor-dir
must be /Users/$user/Sites/TYPO3/Packages/Libraries/autoload.php
in this setup for TYPO3 to find it.
Updated by Stefano Kowalke about 9 years ago
The core is located at
/Users/$user/Sites/TYPO3/6-2the doc root at
/Users/$user/Sites/$project/dev/htdocs
My vendor
dir in comoser.json is
"vendor-dir": "Packages/Libraries". I copied the code from https://wiki.typo3.org/Composer.
$ composer installinstalls the packages to
/Users/$user/Sites/$project/dev/htdocs/Packages/Libraries
The composer packages are part of my installation and not of the core as you suggest.
Updated by Stefano Kowalke about 9 years ago
This will work if typo3_src will locate in the webroot and not somewhere outside.
Updated by Andreas Kienast about 9 years ago
- Status changed from Under Review to Closed
Closed as requested by Stefano.