Skip to content

Commit

Permalink
Add rectorConfig to change Table to DC_Table::class
Browse files Browse the repository at this point in the history
- Implements contao#6
  • Loading branch information
zoglo committed May 7, 2024
1 parent f50686e commit 0b4c8ca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config/sets/contao/contao-413.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Contao\BackendUser;
use Contao\Controller;
use Contao\CoreBundle\Security\ContaoCorePermissions;
use Contao\DC_Table;
use Contao\Folder;
use Contao\Rector\Rector\InsertTagsServiceRector;
use Contao\Rector\Rector\LegacyFrameworkCallToServiceCallRector;
Expand All @@ -19,8 +20,10 @@
use Rector\Renaming\ValueObject\RenameClassAndConstFetch;
use Rector\Transform\Rector\FuncCall\FuncCallToStaticCallRector;
use Rector\Transform\Rector\StaticCall\StaticCallToFuncCallRector;
use Rector\Transform\Rector\String_\StringToClassConstantRector;
use Rector\Transform\ValueObject\FuncCallToStaticCall;
use Rector\Transform\ValueObject\StaticCallToFuncCall;
use Rector\Transform\ValueObject\StringToClassConstant;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->ruleWithConfiguration(FuncCallToStaticCallRector::class, [
Expand Down Expand Up @@ -71,6 +74,9 @@

// Contao 4.13
$rectorConfig->rule(InsertTagsServiceRector::class);
$rectorConfig->ruleWithConfiguration(StringToClassConstantRector::class, [
new StringToClassConstant('Table', DC_Table::class, 'class'),
]);

// Contao 4.12
//'Contao\FrontendUser::isMemberOf($ids)' => 'Contao\System::getContainer()->get(\'security.helper\')->isGranted(ContaoCorePermissions::MEMBER_IN_GROUPS, $ids)',
Expand Down

0 comments on commit 0b4c8ca

Please sign in to comment.