Project

General

Profile

Actions

Bug #59998

closed

Invalid composer.json breaks package management

Added by Martin Kutschker over 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-06-30
Due date:
% Done:

100%

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

Description

If an extension has an invalid composer.json the package management:

PHP Fatal error: Uncaught exception 'TYPO3\\Flow\\Package\\Exception\\InvalidPackageManifestException' with message 'Invalid composer manifest. in /var/local/typo3/typo3_src-6.2.3/typo3/sysext/core/Classes/Package/PackageFactory.php:89\nStack trace:\n
#0 /var/local/typo3/typo3_src-6.2.3/typo3/sysext/core/Classes/Package/PackageManager.php(369): TYPO3\\CMS\\Core\\Package\\PackageFactory::getPackageKeyFromManifest(NULL, '/var/www_typo3/...', '/var/www_typo3/...')\n
#1 /var/local/typo3/typo3_src-6.2.3/typo3/sysext/core/Classes/Package/FailsafePackageManager.php(69): TYPO3\\CMS\\Core\\Package\\PackageManager->scanAvailablePackages()\n
#2 /var/local/typo3/typo3_src-6.2.3/typo3/sysext/core/Classes/Package/PackageManager.php(130): TYPO3\\CMS\\Core\\Package\\FailsafePackageManager->loadPackageStates()\n
#3 /var/local/typo3/typo3_src-6.2.3/typo3/sysext/core/Classes/Core/Bootstrap.php(314): TYPO3\\CMS\\Core\\Package\\PackageManager->initialize(Object(TYPO3\\CMS\\Core\\Core\\Bootstrap))\n
#4 /var/local/typo3/typo3_src-6.2.3/typo3/sysext/ in /var/local/typo3/typo3_src-6.2.3/typo3/sysext/core/Classes/Package/PackageFactory.php on line 89

The reason is that getPackageKeyFromManifest() of core/Classes/Package/PackageFactory.php is passed a NULL value. To make debugging even worse the thrown extension does not name the culprit. Please change the exception message to:

'Invalid composer manifest in package path: '.$packagePath

Actions

Also available in: Atom PDF