Skip to content

Commit

Permalink
!!! TASK: Followup neos#3443 remove dead package freezing API's
Browse files Browse the repository at this point in the history
Also removes declarations for not needed cache configurations:

Flow_Reflection_Status
Flow_Reflection_CompiletimeData

if you have any custom declaration for these please remove them.
  • Loading branch information
mhsdesign committed Feb 13, 2025
1 parent 56bf4cc commit 18e1f6d
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 125 deletions.
2 changes: 0 additions & 2 deletions Neos.Flow/Classes/Command/CacheCommandController.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ public function injectEnvironment(Environment $environment)
* @param boolean $force Force flushing of any temporary data
* @return void
* @see neos.flow:cache:warmup
* @see neos.flow:package:freeze
* @see neos.flow:package:refreeze
*/
public function flushCommand(bool $force = false)
{
Expand Down
70 changes: 0 additions & 70 deletions Neos.Flow/Classes/Command/PackageCommandController.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,76 +103,6 @@ public function listCommand(bool $loadingOrder = false)
}
}

/**
* Freeze a package
*
* This function marks a package as <b>frozen</b> in order to improve performance
* in a development context. While a package is frozen, any modification of files
* within that package won't be tracked and can lead to unexpected behavior.
*
* File monitoring won't consider the given package. Further more, reflection
* data for classes contained in the package is cached persistently and loaded
* directly on the first request after caches have been flushed. The precompiled
* reflection data is stored in the <b>Configuration</b> directory of the
* respective package.
*
* By specifying <b>all</b> as a package key, all currently frozen packages are
* frozen (the default).
*
* @param string $packageKey Key of the package to freeze
* @return void
* @see neos.flow:package:unfreeze
* @see neos.flow:package:refreeze
* @deprecated since 8.4
*/
public function freezeCommand(string $packageKey = 'all')
{
$this->outputLine('Package freezing is no longer supported, this command is deprecated and will be removed with 9.0.');
}

/**
* Unfreeze a package
*
* Unfreezes a previously frozen package. On the next request, this package will
* be considered again by the file monitoring and related services – if they are
* enabled in the current context.
*
* By specifying <b>all</b> as a package key, all currently frozen packages are
* unfrozen (the default).
*
* @param string $packageKey Key of the package to unfreeze, or 'all'
* @return void
* @see neos.flow:package:freeze
* @see neos.flow:cache:flush
* @deprecated since 8.4
*/
public function unfreezeCommand(string $packageKey = 'all')
{
$this->outputLine('Package freezing is no longer supported, this command is deprecated and will be removed with 9.0.');
}

/**
* Refreeze a package
*
* Refreezes a currently frozen package: all precompiled information is removed
* and file monitoring will consider the package exactly once, on the next
* request. After that request, the package remains frozen again, just with the
* updated data.
*
* By specifying <b>all</b> as a package key, all currently frozen packages are
* refrozen (the default).
*
* @param string $packageKey Key of the package to refreeze, or 'all'
* @return void
* @see neos.flow:package:freeze
* @see neos.flow:cache:flush
* @deprecated since 8.4
*/
public function refreezeCommand(string $packageKey = 'all')
{
$this->outputLine('Package freezing is no longer supported, this command is deprecated and will be removed with 9.0.');
}

/**
* Rescan package availability and recreates the PackageStates configuration.
*/
Expand Down
44 changes: 1 addition & 43 deletions Neos.Flow/Classes/Package/PackageManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,19 +222,6 @@ public function getAvailablePackages(): array
return $this->packages;
}

/**
* Returns an array of PackageInterface objects of all frozen packages.
* A frozen package is not considered by file monitoring and provides some
* precompiled reflection data in order to improve performance.
*
* @return array<PackageInterface>
* @deprecated since 8.4
*/
public function getFrozenPackages(): array
{
return [];
}

/**
* Returns an array of PackageInterface objects of all packages that match
* the given package state, path, and type filters. All three filters must match, if given.
Expand All @@ -253,8 +240,7 @@ public function getFilteredPackages($packageState = 'available', $packageType =
$packages = $this->getAvailablePackages();
break;
case 'frozen':
$packages = $this->getFrozenPackages();
break;
throw new Exception\InvalidPackageStateException('The package state "frozen" is has been removed', 1739462316);
default:
throw new Exception\InvalidPackageStateException('The package state "' . $packageState . '" is invalid', 1372458274);
}
Expand Down Expand Up @@ -382,34 +368,6 @@ public function createPackage($packageKey, array $manifest = [], $packagesPath =
return $package;
}

/**
* Moves a package from one path to another.
*
* @param string $fromAbsolutePath
* @param string $toAbsolutePath
* @return void
* @throws FilesException
* @deprecated since 8.4
*/
protected function movePackage($fromAbsolutePath, $toAbsolutePath): void
{
Files::createDirectoryRecursively($toAbsolutePath);
Files::copyDirectoryRecursively($fromAbsolutePath, $toAbsolutePath, false, true);
Files::removeDirectoryRecursively($fromAbsolutePath);
}

/**
* Tells if a package is frozen
*
* @param string $packageKey The package to check
* @return boolean
* @deprecated since 8.4
*/
public function isPackageFrozen($packageKey): bool
{
return false;
}

/**
* Rescans available packages, order and write a new PackageStates file.
*
Expand Down
10 changes: 0 additions & 10 deletions Neos.Flow/Configuration/Caches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,6 @@ Flow_Persistence_Doctrine_Results:
Flow_Persistence_Doctrine_SecondLevel:
backend: Neos\Cache\Backend\SimpleFileBackend

#
# DEPRECATED since 8.4
# These caches will be removed in 9.0, they are unused so you can safely remove any configuration for them.
#
Flow_Reflection_Status:
frontend: Neos\Cache\Frontend\StringFrontend
backend: Neos\Cache\Backend\SimpleFileBackend
Flow_Reflection_CompiletimeData:
backend: Neos\Cache\Backend\SimpleFileBackend

# Flow_Reflection
#
#
Expand Down

0 comments on commit 18e1f6d

Please sign in to comment.