Task #42516

Bug #41843: Composer and rename issues (umbrella issue)

Composer dependency with Guzzle leads to Package related exception

Added by Rafael Kähm over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-10-30
Due date:
% Done:

100%


Description

Guzzle-Package, installed with composer, makes fatal errors:

PHP Fatal error:  Uncaught exception 'TYPO3\Flow\Package\Exception\InvalidPackagePathException' with message 'Package path does not exist or is no directory.' in /var/www/TYPO3-Flow/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Package/Package.php:99
Stack trace:
#0 /var/www/TYPO3-Flow/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Package/PackageFactory.php(48): TYPO3\Flow\Package\Package->__construct('Guzzle.Iterator', '/var/www/TYPO3-F...', 'Classes/', 'e/Iterator/')
#1 /var/www/TYPO3-Flow/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Package/PackageManager.php(699): TYPO3\Flow\Package\PackageFactory::create('/var/www/TYPO3-F...', 'Libraries/guzzl...', 'Guzzle.Iterator', 'Classes/', 'e/Iterator/')
#2 /var/www/TYPO3-Flow/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Package/PackageManager.php(600): TYPO3\Flow\Package\PackageManager->registerPackagesFromConfiguration()
#3 /var/www/TYPO3-Flow/Pa in /var/www/TYPO3-Flow/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Package/Package.php on line 99

Here is Repository for this issue. https://github.com/RafaelKa/TYPO3-Flow---Guzzle.git
You must only run

composer install --dev
and
./flow help

to get this error.

Associated revisions

Revision a148ca1e (diff)
Added by Christian Jul Jensen over 7 years ago

[BUGFIX] Consider only a packages top-level composer manifest

For different scenarios it is allowed for a package to contain more
than one composer-manifest. For example in tests or if a package
bundles several other packages. Only the root-manifest should be
evaluated by the PackageManager.

Change-Id: I8eb94d64b6bea6c4e699185bb6477bf6982f1a5f
Fixes: #42516
Releases: 1.2

History

#1 Updated by Adrian Föder over 7 years ago

  • Parent task set to #41843

#2 Updated by Adrian Föder over 7 years ago

  • Subject changed from TYPO3-Flow composer installation of Guzzle to Composer dependency with Guzzle leads to Package related exception

#3 Updated by Adrian Föder over 7 years ago

can confirm this with the mentioned forked base distribution at github.

#4 Updated by Gerrit Code Review over 7 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16081

#5 Updated by Christian Jul Jensen over 7 years ago

The problem is that the package contains several composer manifests (26 in fact), and this confused the automatic package registration. This is indeed a thing that should be handled gracefully Flow and I have pushed a patch, please review

That said, packages that bundles other libraries this way (called "subtree splits") are really only meant for installing as the main package and to be included as libraries. This is not very obvious though.

In this case the correct thing would be to require guzzle/service, and get all the dependencies installed as seperate packages.

Hope that made some sense.

#6 Updated by Gerrit Code Review over 7 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16081

#7 Updated by Gerrit Code Review over 7 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16081

#8 Updated by Gerrit Code Review over 7 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16081

#9 Updated by Gerrit Code Review over 7 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16081

#10 Updated by Gerrit Code Review over 7 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16081

#11 Updated by Christian Jul Jensen over 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Applied in changeset commit:a148ca1ed1ded30ef8ecba4cdab2a0a575bd2c67.

Also available in: Atom PDF