Project

General

Profile

Actions

Bug #69658

closed

Custom composer packages won't load

Added by Stefano Kowalke over 8 years ago. Updated over 8 years ago.

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

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

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

Actions #1

Updated by Gerrit Code Review over 8 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

Actions #2

Updated by Gerrit Code Review over 8 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

Actions #3

Updated by Mathias Brodala over 8 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)

Actions #4

Updated by Stefano Kowalke over 8 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
Actions #5

Updated by Mathias Brodala over 8 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.

Actions #6

Updated by Stefano Kowalke over 8 years ago

The core is located at

/Users/$user/Sites/TYPO3/6-2
the 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 install
installs 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.

Actions #7

Updated by Stefano Kowalke over 8 years ago

This will work if typo3_src will locate in the webroot and not somewhere outside.

Actions #8

Updated by Andreas Kienast over 8 years ago

  • Status changed from Under Review to Closed

Closed as requested by Stefano.

Actions

Also available in: Atom PDF