[!!!][TASK] Remove deprecated migration for PackageStates.php v4 version 21/59221/2
authorBenjamin Franzke <bfr@qbus.de>
Wed, 19 Dec 2018 15:33:27 +0000 (16:33 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Wed, 19 Dec 2018 18:45:51 +0000 (19:45 +0100)
This migration was deprecated during v8 phase in
https://review.typo3.org/46389 and then expanded to be removed in v10
during v9 deprecation removal. Remove this one now.

Releases: master
Resolves: #87226
Related: #73041
Change-Id: I1ffcf0c8f50e311d90e7be935ece30c50eb2e4b6
Reviewed-on: https://review.typo3.org/59221
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Classes/Package/PackageManager.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst

index 0159fd3..8dd2d45 100644 (file)
@@ -216,29 +216,11 @@ class PackageManager implements SingletonInterface
      */
     protected function loadPackageStates()
     {
-        $forcePackageStatesRewrite = false;
         $this->packageStatesConfiguration = @include $this->packageStatesPathAndFilename ?: [];
-        if (!isset($this->packageStatesConfiguration['version']) || $this->packageStatesConfiguration['version'] < 4) {
-            $this->packageStatesConfiguration = [];
-        } elseif ($this->packageStatesConfiguration['version'] === 4) {
-            // Convert to v5 format which only includes a list of active packages.
-            // Deprecated since version 8, will be removed in version 10.
-            $activePackages = [];
-            foreach ($this->packageStatesConfiguration['packages'] as $packageKey => $packageConfiguration) {
-                if ($packageConfiguration['state'] !== 'active') {
-                    continue;
-                }
-                $activePackages[$packageKey] = ['packagePath' => $packageConfiguration['packagePath']];
-            }
-            $this->packageStatesConfiguration['packages'] = $activePackages;
-            $this->packageStatesConfiguration['version'] = 5;
-            $forcePackageStatesRewrite = true;
-        }
-        if ($this->packageStatesConfiguration !== []) {
-            $this->registerPackagesFromConfiguration($this->packageStatesConfiguration['packages'], false, $forcePackageStatesRewrite);
-        } else {
+        if (!isset($this->packageStatesConfiguration['version']) || $this->packageStatesConfiguration['version'] < 5) {
             throw new Exception\PackageStatesUnavailableException('The PackageStates.php file is either corrupt or unavailable.', 1381507733);
         }
+        $this->registerPackagesFromConfiguration($this->packageStatesConfiguration['packages'], false);
     }
 
     /**
@@ -367,12 +349,12 @@ class PackageManager implements SingletonInterface
      *
      * @param array $packages
      * @param bool $registerOnlyNewPackages
-     * @param bool $packageStatesHasChanged
      * @throws Exception\InvalidPackageStateException
      * @throws Exception\PackageStatesFileNotWritableException
      */
-    protected function registerPackagesFromConfiguration(array $packages, $registerOnlyNewPackages = false, $packageStatesHasChanged = false)
+    protected function registerPackagesFromConfiguration(array $packages, $registerOnlyNewPackages = false)
     {
+        $packageStatesHasChanged = false;
         foreach ($packages as $packageKey => $stateConfiguration) {
             if ($registerOnlyNewPackages && $this->isPackageRegistered($packageKey)) {
                 continue;
index a4548d1..65ad9e4 100644 (file)
@@ -308,6 +308,11 @@ The following feature is now always enabled:
 * :php:`simplifiedControllerActionDispatching` - Backend controller actions do not receive a prepared response object anymore
 
 
+The following feature has been removed:
+
+* Migration from v4 to v5 PackagesStates.php
+
+
 Impact
 ======