From 017ea84d2a47e85eb25ed571495406b8cf905bfa Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 12 Dec 2024 17:07:14 +0700 Subject: [PATCH 1/4] Allow Rector 2 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1b175495..89753f2c 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ "illuminate/container": "^10.39", "phpstan/extension-installer": "^1.3", "phpunit/phpunit": "^10.3", - "rector/rector": "^1.2", + "rector/rector": "^1.2 || ^2.0", "symfony/dependency-injection": "^6.4", "symfony/finder": "^6.2", "symplify/easy-coding-standard": "^12.0", From 2dafbb38c8eeca2864fbcb87500c6943489d28e6 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 12 Dec 2024 17:08:29 +0700 Subject: [PATCH 2/4] Allow Rector 2 --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 89753f2c..f8190aad 100644 --- a/composer.json +++ b/composer.json @@ -5,13 +5,13 @@ "license": "MIT", "require": { "php": ">=8.1", - "phpstan/phpstan": "^1.10.52 || ^2.0" + "phpstan/phpstan": "^2.0" }, "require-dev": { "illuminate/container": "^10.39", "phpstan/extension-installer": "^1.3", "phpunit/phpunit": "^10.3", - "rector/rector": "^1.2 || ^2.0", + "rector/rector": "^2.0", "symfony/dependency-injection": "^6.4", "symfony/finder": "^6.2", "symplify/easy-coding-standard": "^12.0", From 1a1e51ae34959667a9a55589df77bdac9e61b6b2 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 12 Dec 2024 17:09:47 +0700 Subject: [PATCH 3/4] update downgrade --- .github/workflows/downgraded_release.yaml | 10 +++++----- build/composer-php-72.json | 23 ----------------------- build/rector-downgrade-php-72.php | 10 ---------- 3 files changed, 5 insertions(+), 38 deletions(-) delete mode 100644 build/composer-php-72.json delete mode 100644 build/rector-downgrade-php-72.php diff --git a/.github/workflows/downgraded_release.yaml b/.github/workflows/downgraded_release.yaml index f5b493c8..24750267 100644 --- a/.github/workflows/downgraded_release.yaml +++ b/.github/workflows/downgraded_release.yaml @@ -20,12 +20,12 @@ jobs: - uses: "ramsey/composer-install@v2" - # downgrade /src to PHP 7.2 - - run: vendor/bin/rector process src --config build/rector-downgrade-php-72.php --ansi + # downgrade /src to PHP 7.4 + - run: vendor/bin/rector process src --config build/rector-downgrade-php-74.php --ansi - run: vendor/bin/ecs check src --fix --ansi - # copy PHP 7.2 composer - - run: cp build/composer-php-72.json composer.json + # copy PHP 7.4 composer + - run: cp build/composer-php-74.json composer.json # clear the dev files - run: rm -rf build .github tests ecs.php phpstan.neon phpunit.xml @@ -42,7 +42,7 @@ jobs: run: | # separate a "git add" to add untracked (new) files too git add --all - git commit -m "release PHP 7.2 downgraded" + git commit -m "release PHP 7.4 downgraded" # force push tag, so there is only 1 version git tag "${GITHUB_REF#refs/tags/}" --force diff --git a/build/composer-php-72.json b/build/composer-php-72.json deleted file mode 100644 index fe963b98..00000000 --- a/build/composer-php-72.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "symplify/phpstan-extensions", - "type": "phpstan-extension", - "description": "Pre-escaped error messages in 'symplify' error format, container aware test case and other useful extensions for PHPStan", - "license": "MIT", - "keywords": ["static analysis", "phpstan-extension"], - "require": { - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.10" - }, - "autoload": { - "psr-4": { - "Symplify\\PHPStanExtensions\\": "src" - } - }, - "extra": { - "phpstan": { - "includes": [ - "config/config.neon" - ] - } - } -} diff --git a/build/rector-downgrade-php-72.php b/build/rector-downgrade-php-72.php deleted file mode 100644 index 5550cffe..00000000 --- a/build/rector-downgrade-php-72.php +++ /dev/null @@ -1,10 +0,0 @@ -sets([DowngradeLevelSetList::DOWN_TO_PHP_72]); -}; From ec9fc5c721c387086fad821d5227c95a26b6a397 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 12 Dec 2024 17:09:53 +0700 Subject: [PATCH 4/4] update downgrade --- build/composer-php-74.json | 23 +++++++++++++++++++++++ build/rector-downgrade-php-74.php | 10 ++++++++++ 2 files changed, 33 insertions(+) create mode 100644 build/composer-php-74.json create mode 100644 build/rector-downgrade-php-74.php diff --git a/build/composer-php-74.json b/build/composer-php-74.json new file mode 100644 index 00000000..b1788b99 --- /dev/null +++ b/build/composer-php-74.json @@ -0,0 +1,23 @@ +{ + "name": "symplify/phpstan-extensions", + "type": "phpstan-extension", + "description": "Pre-escaped error messages in 'symplify' error format, container aware test case and other useful extensions for PHPStan", + "license": "MIT", + "keywords": ["static analysis", "phpstan-extension"], + "require": { + "php": "^7.4 || ^8.0", + "phpstan/phpstan": "^2.0" + }, + "autoload": { + "psr-4": { + "Symplify\\PHPStanExtensions\\": "src" + } + }, + "extra": { + "phpstan": { + "includes": [ + "config/config.neon" + ] + } + } +} diff --git a/build/rector-downgrade-php-74.php b/build/rector-downgrade-php-74.php new file mode 100644 index 00000000..b98900af --- /dev/null +++ b/build/rector-downgrade-php-74.php @@ -0,0 +1,10 @@ +sets([DowngradeLevelSetList::DOWN_TO_PHP_74]); +};