Bug #56544

FLOW Exception on tar package inclusion via composer

Added by Kay Strobach over 7 years ago. Updated over 7 years ago.

Status:
New
Priority:
Must have
Assignee:
-
Category:
Core
Target version:
-
Start date:
2014-03-04
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.5
Has patch:
No
Complexity:

Description


Fatal error: Uncaught exception 'TYPO3\Flow\Package\Exception\InvalidPackageStateException' with message 'Could not find package with composer name "robrichards/xmlseclibs" in PackageStates configuration.' in /project/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Package/PackageManager.php on line 388

TYPO3\Flow\Package\Exception\InvalidPackageStateException: Could not find package with composer name "robrichards/xmlseclibs" in PackageStates configuration. in /project/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Package/PackageManager.php on line 388

Call Stack:
    0.0001     124452   1. {main}() /project/Web/index.php:0
    0.0011     179168   2. TYPO3\Flow\Core\Bootstrap->run() /project/Web/index.php:27
    0.0032     646832   3. TYPO3\Flow\Core\Booting\Scripts::initializePackageManagement() /project/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Core/Bootstrap.php:105
    0.0032     647192   4. TYPO3\Flow\Package\PackageManager->initialize() /project/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Core/Booting/Scripts.php:126
    0.0034     654584   5. TYPO3\Flow\Package\PackageManager->loadPackageStates() /project/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Package/PackageManager.php:136
    0.0035     678612   6. TYPO3\Flow\Package\PackageManager->scanAvailablePackages() /project/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Package/PackageManager.php:734
    0.1160     944296   7. TYPO3\Flow\Package\PackageManager->sortAndSavePackageStates() /project/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Package/PackageManager.php:801
    0.1160     944360   8. TYPO3\Flow\Package\PackageManager->sortAvailablePackagesByDependencies() /project/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Package/PackageManager.php:933
    0.1183     992628   9. TYPO3\Flow\Package\PackageManager->sortPackagesByDependencies() /project/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Package/PackageManager.php:962
    0.1183     992628  10. TYPO3\Flow\Package\Package->getPackageMetaData() /project/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Package/PackageManager.php:987
    0.1183     992808  11. TYPO3\Flow\Package\PackageManager->getPackageKeyFromComposerName() /project/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Package/Package.php:155

composer.json code in root directory:

...

    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "robrichards/xmlseclibs",
                "version": "1.3.1",
                "dist": {
                    "url": "https://xmlseclibs.googlecode.com/files/xmlseclibs-1.3.1.tar.gz",
                    "type": "tar" 
                },
                "autoload": {
                    "files": ["xmlseclibs.php"]
                }
            }
        }
    ],

As you can see it's possible to load the package without composer.json.
Adding it manually results in a working installation ;)

FLOW should not rely on a composer.json in each package directory

#1

Updated by Kay Strobach over 7 years ago

imho there are 2 options to solve that:

1. create composer.json automatically (would dislike that)
2. have a fallback and assume some values.

the problem is, that this is supported by composer, but flow struggles with it :(

Also available in: Atom PDF