[BUGFIX] Store dependency errors before further dependency tests 88/38688/2
authorNicole Cordes <typo3@cordes.co>
Tue, 14 Apr 2015 09:10:11 +0000 (11:10 +0200)
committerXavier Perseguers <xavier@typo3.org>
Tue, 14 Apr 2015 11:46:19 +0000 (13:46 +0200)
During dependency checking the extensions are checked recursively. If an
depended extension is not yet installed, dependencies for this extension
are tested as well. Unfortunately the second test resets the array with
stored dependency errors which leads to improper dependency handling.
This patch stores the dependency errors before starting further tests
and re-adds them after processing.

Resolves: #66410
Releases: master, 6.2
Change-Id: Ic576c30f6b1f066467c4899ea5e958280c12d37c
Reviewed-on: http://review.typo3.org/38686
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>
Reviewed-on: http://review.typo3.org/38688

typo3/sysext/extensionmanager/Classes/Utility/DependencyUtility.php

index df5033c..c42066f 100644 (file)
@@ -256,7 +256,9 @@ class DependencyUtility implements \TYPO3\CMS\Core\SingletonInterface {
                        if ($extensionIsAvailable === TRUE) {
                                $isAvailableVersionCompatible = $this->isAvailableVersionCompatible($dependency);
                                if ($isAvailableVersionCompatible) {
+                                       $unresolvedDependencyErrors = $this->dependencyErrors;
                                        $this->managementService->markExtensionForInstallation($extensionKey);
+                                       $this->dependencyErrors = array_merge($unresolvedDependencyErrors, $this->dependencyErrors);
                                } else {
                                        $this->getExtensionFromRepository($extensionKey, $dependency);
                                }