Skip to content

Commit ecb7d4c

Browse files
authored
[Symfony 74] Rename Application::add() to Application::addCommand() (#809)
1 parent 8978e8e commit ecb7d4c

File tree

4 files changed

+43
-0
lines changed

4 files changed

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

src/Set/SetProvider/Symfony7SetProvider.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,19 @@ public function provide(): array
110110
'7.3',
111111
__DIR__ . '/../../../config/sets/symfony/symfony7/symfony73/symfony73-validator.php'
112112
),
113+
114+
new ComposerTriggeredSet(
115+
SetGroup::SYMFONY,
116+
'symfony/symfony',
117+
'7.4',
118+
__DIR__ . '/../../../config/sets/symfony/symfony7/symfony74.php'
119+
),
120+
new ComposerTriggeredSet(
121+
SetGroup::SYMFONY,
122+
'symfony/console',
123+
'7.4',
124+
__DIR__ . '/../../../config/sets/symfony/symfony7/symfony74/symfony74-console.php'
125+
),
113126
];
114127
}
115128
}

src/Set/SymfonySetList.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@ final class SymfonySetList
167167
*/
168168
final public const SYMFONY_73 = __DIR__ . '/../../config/sets/symfony/symfony7/symfony73.php';
169169

170+
/**
171+
* @var string
172+
*/
173+
final public const SYMFONY_74 = __DIR__ . '/../../config/sets/symfony/symfony7/symfony74.php';
174+
170175
/**
171176
* @var string
172177
*/

0 commit comments

Comments
 (0)