Skip to content

Commit 36aa9c3

Browse files
committed
chore: use codeigniter4/.github/.github/workflows/rector.yml
1 parent 493cb2f commit 36aa9c3

File tree

2 files changed

+4
-46
lines changed

2 files changed

+4
-46
lines changed

.github/workflows/rector.yml

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -19,48 +19,5 @@ on:
1919
- '.github/workflows/rector.yml'
2020

2121
jobs:
22-
build:
23-
name: PHP ${{ matrix.php-versions }} Rector Analysis
24-
runs-on: ubuntu-latest
25-
if: "!contains(github.event.head_commit.message, '[ci skip]')"
26-
strategy:
27-
fail-fast: false
28-
matrix:
29-
php-versions: ['8.1', '8.2']
30-
31-
steps:
32-
- name: Checkout
33-
uses: actions/checkout@v4
34-
35-
- name: Set up PHP
36-
uses: shivammathur/setup-php@v2
37-
with:
38-
php-version: ${{ matrix.php-versions }}
39-
tools: phpstan
40-
extensions: intl, json, mbstring, xml
41-
coverage: none
42-
env:
43-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
45-
- name: Get composer cache directory
46-
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
47-
48-
- name: Cache composer dependencies
49-
uses: actions/cache@v3
50-
with:
51-
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
52-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
53-
restore-keys: ${{ runner.os }}-composer-
54-
55-
- name: Install dependencies
56-
run: |
57-
if [ -f composer.lock ]; then
58-
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
59-
else
60-
composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
61-
fi
62-
63-
- name: Analyze for refactoring
64-
run: |
65-
composer global require --dev rector/rector:^0.18.12
66-
rector process --dry-run --no-progress-bar
22+
rector:
23+
uses: codeigniter4/.github/.github/workflows/rector.yml@main

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"codeigniter4/devkit": "^1.0",
2020
"codeigniter4/framework": "^4.3",
2121
"predis/predis": "^2.0",
22-
"phpstan/phpstan-strict-rules": "^1.5"
22+
"phpstan/phpstan-strict-rules": "^1.5",
23+
"rector/rector": "0.19.5"
2324
},
2425
"minimum-stability": "dev",
2526
"prefer-stable": true,

0 commit comments

Comments
 (0)