Skip to content

Commit

Permalink
[TASK] Use VariableFrontend instead of StringFrontend (#1607)
Browse files Browse the repository at this point in the history
Resolves: #980
  • Loading branch information
sabbelasichon authored Nov 16, 2020
1 parent 91447da commit f64aac5
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/v9/typo3-92.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,23 @@

declare(strict_types=1);

use Rector\Renaming\Rector\Name\RenameClassRector;
use Ssch\TYPO3Rector\Rector\v9\v2\RenameMethodCallToEnvironmentMethodCallRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use TYPO3\CMS\Core\Cache\Frontend\StringFrontend;
use TYPO3\CMS\Core\Cache\Frontend\VariableFrontend;

return static function (ContainerConfigurator $containerConfigurator): void {
$containerConfigurator->import(__DIR__ . '/../services.php');

$services = $containerConfigurator->services();

$services->set(RenameMethodCallToEnvironmentMethodCallRector::class);

$services->set(RenameClassRector::class)
->call('configure', [[
RenameClassRector::OLD_TO_NEW_CLASSES => [
StringFrontend::class => VariableFrontend::class,
],
]]);
};
14 changes: 14 additions & 0 deletions stubs/Core/Cache/Frontend/StringFrontend.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
declare(strict_types=1);


namespace TYPO3\CMS\Core\Cache\Frontend;

if (interface_exists(StringFrontend::class)) {
return;
}

final class StringFrontend
{

}
14 changes: 14 additions & 0 deletions stubs/Core/Cache/Frontend/VariableFrontend.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
declare(strict_types=1);


namespace TYPO3\CMS\Core\Cache\Frontend;

if (interface_exists(VariableFrontend::class)) {
return;
}

final class VariableFrontend
{

}

0 comments on commit f64aac5

Please sign in to comment.