Skip to content

Commit 6c852bf

Browse files
committed
Update to Symfony 5.4
1 parent 05140a2 commit 6c852bf

File tree

9 files changed

+526
-156
lines changed

9 files changed

+526
-156
lines changed

build/rector-downgrade-symfony.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php declare(strict_types=1);
2+
3+
use Rector\Core\Configuration\Option;
4+
use Rector\Core\ValueObject\PhpVersion;
5+
use Rector\DowngradePhp72\Rector\FuncCall\DowngradePregUnmatchedAsNullConstantRector;
6+
use Rector\DowngradePhp72\Rector\FuncCall\DowngradeStreamIsattyRector;
7+
use Rector\DowngradePhp72\Rector\FunctionLike\DowngradeObjectTypeDeclarationRector;
8+
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
9+
10+
return static function (ContainerConfigurator $containerConfigurator): void {
11+
$parameters = $containerConfigurator->parameters();
12+
$parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_71);
13+
14+
$services = $containerConfigurator->services();
15+
$services->set(DowngradeObjectTypeDeclarationRector::class);
16+
$services->set(DowngradePregUnmatchedAsNullConstantRector::class);
17+
$services->set(DowngradeStreamIsattyRector::class);
18+
};

build/rector-downgrade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php declare(strict_types=1);
22

33
use Rector\Core\Configuration\Option;
4+
use Rector\Core\ValueObject\PhpVersion;
45
use Rector\DowngradePhp72\Rector\FunctionLike\DowngradeObjectTypeDeclarationRector;
56
use Rector\DowngradePhp73\Rector\FuncCall\DowngradeTrailingCommasInFunctionCallsRector;
67
use Rector\DowngradePhp74\Rector\Coalesce\DowngradeNullCoalescingOperatorRector;
@@ -11,6 +12,7 @@
1112
return static function (ContainerConfigurator $containerConfigurator): void {
1213
$parameters = $containerConfigurator->parameters();
1314

15+
$parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_71);
1416
$parameters->set(Option::SKIP, [
1517
'tests/*/data/*',
1618
'tests/PHPStan/Analyser/traits/*',

build/transform-source

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ set -o pipefail
55
set -o nounset
66

77
vendor/bin/rector process src tests/PHPStan tests/e2e -c build/rector-downgrade.php
8+
9+
vendor/bin/rector process vendor/symfony -c build/rector-downgrade-symfony.php || true

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
"react/promise": "^2.8",
3333
"react/socket": "^1.3",
3434
"react/stream": "^1.1",
35-
"symfony/console": "^4.4.30",
36-
"symfony/finder": "^4.4.30",
37-
"symfony/service-contracts": "1.1.8"
35+
"symfony/console": "^5.4.1",
36+
"symfony/finder": "^5.4.0",
37+
"symfony/service-contracts": "^2.5.0"
3838
},
3939
"replace": {
4040
"phpstan/phpstan": "self.version"

0 commit comments

Comments
 (0)