Project

General

Profile

Actions

Bug #57604

closed

PackageManager is unable to resolve composer PSR-4 namespaces

Added by Jacob Rasmussen about 10 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
System/Bootstrap/Configuration
Target version:
-
Start date:
2014-04-03
Due date:
% Done:

0%

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

Description

Currently the package manager is only able to resolve PSR-0 namespaces.

This makes it impossible to include composer packages which rely on PSR-4 namespaces, such as Pelago\Emogrifier, unless the composer autoloader is included manually in a TYPO3 extension.

Steps to reproduce

Create a composer.json in the root of site path like this:

{
  "config": {
    "vendor-dir": "Packages/Libraries" 
  },
  "minimum-stability": "dev" 
  "require": {
    "pelago/emogrifier": "*" 
  }
}

Run "composer install" in the path in order to fetch the package

Ensure typo3conf/PackageStates.php is updated - this can be done by uninstalling and installing a TYPO3 extension.

Activate the package manually by editing PackageStates.php, as it currently isn't possible to activate composer packages through the UI or CLI

Try to instantiate the \Pelago\Emogrifier class which will fail


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #54491: PackageManager doesn't solve/recognize real composer packages Rejected2013-12-18

Actions
Related to TYPO3 Core - Task #64361: Improve class loading performanceClosed2015-01-19

Actions
Actions

Also available in: Atom PDF