Skip to content

Commit 0b3b4fd

Browse files
authored
[Symfony 74] Rename Application::add() to Application::addCommand() (#813)
1 parent ecb7d4c commit 0b3b4fd

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

config/sets/symfony/symfony7/symfony74.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88

99
return static function (RectorConfig $rectorConfig): void {
1010
$rectorConfig->import(__DIR__ . '/symfony74/symfony74-console.php');
11+
$rectorConfig->import(__DIR__ . '/symfony74/symfony74-framework-bundle.php');
1112
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Rector\Config\RectorConfig;
6+
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
7+
use Rector\Renaming\ValueObject\MethodCallRename;
8+
9+
return static function (RectorConfig $rectorConfig): void {
10+
// @see https://github.com/symfony/symfony/blob/7.4/UPGRADE-7.4.md#frameworkbundle
11+
$rectorConfig->ruleWithConfiguration(RenameMethodRector::class, [
12+
new MethodCallRename('Symfony\Bundle\FrameworkBundle\Console\Application', 'add', 'addCommand'),
13+
]);
14+
};

src/Set/SetProvider/Symfony7SetProvider.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ public function provide(): array
123123
'7.4',
124124
__DIR__ . '/../../../config/sets/symfony/symfony7/symfony74/symfony74-console.php'
125125
),
126+
new ComposerTriggeredSet(
127+
SetGroup::SYMFONY,
128+
'symfony/framework-bundle',
129+
'7.4',
130+
__DIR__ . '/../../../config/sets/symfony/symfony7/symfony74/symfony74-framework-bundle.php'
131+
),
126132
];
127133
}
128134
}

0 commit comments

Comments
 (0)