[BUGFIX] Store dependency errors before further dependency tests 86/38686/4
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:45:19 +0000 (13:45 +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>
typo3/sysext/extensionmanager/Classes/Utility/DependencyUtility.php

index 5da3150..3f5527d 100644 (file)
@@ -257,7 +257,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);
                                }