#54581Please repair PackageStates before next Beta!
Description
Hello Core-Team,
I know…current git state of TYPO3 is beta, but there are some basic functions in TYPO3 which still needs some love. I already have created an ticket regarding dependencies in PackageStates.php. Now I have found a second bug:
Here a simplified visualisation of: $this->packageStatesConfiguration[‘packages’]:
array(
'about' => array(...),
'backend' => array(...),
'core' => array(...),
'yellowpages' => array(...), <--This extension has a dependency to jw_categories
'files' => array(...), <-- I have deleted this extension in extManager
'tt_news' => array(...),
'jw_categories' => array(...),
)
If I delete “files” you call:
protected function unregisterPackageByPackageKey($packageKey) {
unset($this->packages[$packageKey]);
unset($this->packageKeys[strtolower($packageKey)]);
unset($this->packageStatesConfiguration['packages'][$packageKey]);
$this->sortAndSavePackageStates();
}
In this function you remove files correctly, but you call $this->sortAndSavePackageStates() and this a mistake. $this->sortAndSavePackageStates() only works with already registered packages. So our packages array looks like:
array(
'about' => array(...),
'backend' => array(...),
'core' => array(...),
'yellowpages' => array(...), <--This extension has a dependency to jw_categories
);
$this->sortAndSavePackageStates() cannot find package jw_categories, because it is not registered already. Backtrace:
PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The package "yellowpages2" depends on "jw_categories" which is not present in the system.' in /Applications/MAMP/htdocs/typo3_src/typo3/sysext/core/Classes/Package/PackageManager.php:636 Stack trace: #0 /Applications/MAMP/htdocs/typo3_src/typo3/sysext/core/Classes/Package/PackageManager.php(692): TYPO3\CMS\Core\Package\PackageManager->buildDependencyGraphForPackages(Array) #1 /Applications/MAMP/htdocs/typo3_src/typo3/sysext/core/Classes/Package/PackageManager.php(719): TYPO3\CMS\Core\Package\PackageManager->buildDependencyGraph() #2 /Applications/MAMP/htdocs/typo3_src/typo3/sysext/core/Classes/Package/PackageManager.php(776): TYPO3\CMS\Core\Package\PackageManager->getAvailablePackageLoadingOrder() #3 /Applications/MAMP/htdocs/typo3_src/typo3/sysext/core/Resources/PHP/TYPO3.Flow/Classes/TYPO3/Flow/Package/PackageManager.php(914): TYPO3\CMS\Core\Package\PackageManager->sortAvailablePackagesByDependencies() #4 /Applications/MAMP/htdocs/typo3_src/typo3/s in /Applications/MAMP/htdocs/typo3_src/typo3/sysext/core/Classes/Package/PackageManager.php on line 636
Stefan
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.