Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Test Rector to upgrade code for PHP 8.1 #2977

Merged
merged 13 commits into from
May 15, 2024
43 changes: 43 additions & 0 deletions .github/workflows/php-rector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: PHP rector

on:
push:
branches:
- master
Levdbas marked this conversation as resolved.
Show resolved Hide resolved
- 2.x
paths:
- '**.php'
- '**composer.json'
pull_request:
branches:
- master
Levdbas marked this conversation as resolved.
Show resolved Hide resolved
- 2.x
paths:
- '**.php'
- '**composer.json'
types:
- opened
- synchronize
- ready_for_review

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
php-cs:
name: PHP Rector
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install dependencies
uses: ./.github/actions/setup

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44

- name: Run Rector checks
if: steps.changed-files.outputs.all_changed_files != ''
run: ./vendor/bin/rector process --dry-run ${{ steps.changed-files.outputs.files }}
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.7",
"phpunit/phpunit": "^9.0",
"rector/rector": "^1.0",
"squizlabs/php_codesniffer": "^3.0",
"symplify/easy-coding-standard": "^12.0",
"szepeviktor/phpstan-wordpress": "^1.1",
Expand Down