-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add downgraded release down to PHP 7.2 (#5)
- Loading branch information
1 parent
3516ef8
commit ff3e2d5
Showing
4 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Downgraded Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
downgrade_release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: "actions/checkout@v2" | ||
|
||
- | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: 8.1 | ||
coverage: none | ||
|
||
- 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 | ||
- run: vendor/bin/ecs check src --fix --ansi | ||
|
||
# copy PHP 7.2 composer | ||
- run: cp build/composer-php-72.json composer.json | ||
|
||
# clear the dev files | ||
- run: rm -rf build .github tests ecs.php phpstan.neon phpunit.xml | ||
|
||
# setup git user | ||
- | ||
run: | | ||
git config user.email "action@github.com" | ||
git config user.name "GitHub Action" | ||
# publish to the same repository with a new tag | ||
- | ||
name: "Tag Downgraded Code" | ||
run: | | ||
# separate a "git add" to add untracked (new) files too | ||
git add --all | ||
git commit -m "release PHP 7.2 downgraded" | ||
# force push tag, so there is only 1 version | ||
git tag "${GITHUB_REF#refs/tags/}" --force | ||
git push origin "${GITHUB_REF#refs/tags/}" --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.2 || ^8.0", | ||
"phpstan/phpstan": "^1.10" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Symplify\\PHPStanExtensions\\": "src" | ||
} | ||
}, | ||
"extra": { | ||
"phpstan": { | ||
"includes": [ | ||
"config/config.neon" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Rector\Config\RectorConfig; | ||
use Rector\Set\ValueObject\DowngradeLevelSetList; | ||
|
||
return static function (RectorConfig $rectorConfig): void { | ||
$rectorConfig->sets([DowngradeLevelSetList::DOWN_TO_PHP_72]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters