Bug #41843: Composer and rename issues (umbrella issue)
Composer dependency with Guzzle leads to Package related exception
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 --devand
to get this error.
[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.
#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.