[BUGFIX] FailsafePackageManager: do not prevent package sorting
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Package / PackageManager.php
index b882b80..73bc906 100644 (file)
@@ -769,10 +769,8 @@ class PackageManager implements SingletonInterface
      *
      * @throws Exception\PackageStatesFileNotWritableException
      */
-    protected function sortAndSavePackageStates()
+    protected function savePackageStates()
     {
-        $this->sortActivePackagesByDependencies();
-
         $this->packageStatesConfiguration['version'] = 5;
 
         $fileDescription = "# PackageStates.php\n\n";
@@ -801,6 +799,18 @@ class PackageManager implements SingletonInterface
         GeneralUtility::makeInstance(OpcodeCacheService::class)->clearAllActive($this->packageStatesPathAndFilename);
     }
 
+    /**
+     * Saves the current content of $this->packageStatesConfiguration to the
+     * PackageStates.php file.
+     *
+     * @throws Exception\PackageStatesFileNotWritableException
+     */
+    protected function sortAndSavePackageStates()
+    {
+        $this->sortActivePackagesByDependencies();
+        $this->savePackageStates();
+    }
+
     /**
      * Check the conformance of the given package key
      *