Bug #59998
closedInvalid composer.json breaks package management
100%
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