Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions build/rector-downgrade-symfony.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php declare(strict_types=1);

use Rector\Core\Configuration\Option;
use Rector\Core\ValueObject\PhpVersion;
use Rector\DowngradePhp72\Rector\FuncCall\DowngradePregUnmatchedAsNullConstantRector;
use Rector\DowngradePhp72\Rector\FuncCall\DowngradeStreamIsattyRector;
use Rector\DowngradePhp72\Rector\FunctionLike\DowngradeObjectTypeDeclarationRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return static function (ContainerConfigurator $containerConfigurator): void {
$parameters = $containerConfigurator->parameters();
$parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_71);

$services = $containerConfigurator->services();
$services->set(DowngradeObjectTypeDeclarationRector::class);
$services->set(DowngradePregUnmatchedAsNullConstantRector::class);
$services->set(DowngradeStreamIsattyRector::class);
};
2 changes: 2 additions & 0 deletions build/rector-downgrade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php declare(strict_types=1);

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

$parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_71);
$parameters->set(Option::SKIP, [
'tests/*/data/*',
'tests/PHPStan/Analyser/traits/*',
Expand Down
2 changes: 2 additions & 0 deletions build/transform-source
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ set -o pipefail
set -o nounset

vendor/bin/rector process src tests/PHPStan tests/e2e -c build/rector-downgrade.php

vendor/bin/rector process vendor/symfony -c build/rector-downgrade-symfony.php || true
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"react/promise": "^2.8",
"react/socket": "^1.3",
"react/stream": "^1.1",
"symfony/console": "^4.4.30",
"symfony/finder": "^4.4.30",
"symfony/service-contracts": "1.1.8"
"symfony/console": "^5.4.1",
"symfony/finder": "^5.4.0",
"symfony/service-contracts": "^2.5.0"
},
"replace": {
"phpstan/phpstan": "self.version"
Expand Down
Loading