Skip to content

Commit

Permalink
Update script for downgrade php 7.4 (#57)
Browse files Browse the repository at this point in the history
* Update script for downgrade php 7.4

* Update script for downgrade php 7.4
  • Loading branch information
samsonasik authored Dec 12, 2024
1 parent fdf358e commit bb3b899
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bare_run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php_version: ['7.2', '7.3', '7.4', '8.0', '8.1']
php_version: ['7.4', '8.0', '8.1']

steps:
- uses: shivammathur/setup-php@v2
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/downgraded_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Downgraded Release
on:
push:
tags:
# avoid infinite looping, skip tags that ends with ".72"
# avoid infinite looping, skip tags that ends with ".74"
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-including-and-excluding-branches
- '*'

Expand Down Expand Up @@ -32,16 +32,16 @@ jobs:
- run: mkdir rector-local
- run: composer require rector/rector --working-dir rector-local --ansi

# downgrade to PHP 7.2
- run: rector-local/vendor/bin/rector process bin src vendor --config build/rector-downgrade-php-72.php --ansi
# downgrade to PHP 7.4
- run: rector-local/vendor/bin/rector process bin src vendor --config build/rector-downgrade-php-74.php --ansi

# clear the dev files
- run: rm -rf tests ecs.php phpstan.neon phpunit.xml .gitignore .editorconfig

# prefix and scope
- run: sh prefix-code.sh

# copy PHP 7.2 composer + workflows
# copy PHP 7.4 composer + workflows
- run: cp -r build/target-repository/. .

# clear the dev files
Expand All @@ -59,7 +59,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Rector\Set\ValueObject\DowngradeLevelSetList;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->sets([DowngradeLevelSetList::DOWN_TO_PHP_72]);
$rectorConfig->sets([DowngradeLevelSetList::DOWN_TO_PHP_74]);

$rectorConfig->skip([
'*/Tests/*',
Expand Down
2 changes: 1 addition & 1 deletion build/target-repository/.github/workflows/bare_run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php_version: ['7.2', '7.3', '7.4', '8.0', '8.2']
php_version: ['7.4', '8.0', '8.2']

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion build/target-repository/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Swiss knife in pocket of every upgrade architect",
"license": "MIT",
"require": {
"php": ">=7.2"
"php": ">=7.4"
},
"bin": [
"bin/swiss-knife"
Expand Down

0 comments on commit bb3b899

Please sign in to comment.