[FOLLOWUP][BUGFIX] Add extension precedence 43/39543/2
authorHelmut Hummel <helmut.hummel@typo3.org>
Thu, 14 May 2015 14:20:49 +0000 (16:20 +0200)
committerNicole Cordes <typo3@cordes.co>
Thu, 14 May 2015 14:23:47 +0000 (16:23 +0200)
Before calling TYPO3 package methods, we must ensure
we have the correct instance.

All active composer packages are instance of the Flow package class
which does not implement the methods
isPartOfFactoryDefault or isPartOfMinimalUsableSystem

Resolves: #66955
Related: #59147
Releases: master, 6.2
Change-Id: I5f08cce5e4b0329927d6a302d643f680822e4ad6
Reviewed-on: http://review.typo3.org/39543
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/core/Classes/Package/DependencyResolver.php

index b5492e8..b36f2dd 100644 (file)
@@ -253,7 +253,7 @@ class DependencyResolver {
                foreach ($packageStateConfiguration as $packageKey => $packageConfiguration) {
                        /** @var Package $package */
                        $package = $packageManager->getPackage($packageKey);
-                       if ($package->isPartOfFactoryDefault() || $package->isPartOfMinimalUsableSystem() || strpos($packageConfiguration['packagePath'], self::SYSEXT_FOLDER) === 0) {
+                       if ($package instanceof Package && ($package->isPartOfFactoryDefault() || $package->isPartOfMinimalUsableSystem() || strpos($packageConfiguration['packagePath'], self::SYSEXT_FOLDER) === 0)) {
                                $frameworkPackageKeys[] = $packageKey;
                        }
                }