From 97cde4e145916f92503e139dd09a7cdacf735e18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Sun, 16 Feb 2025 17:29:37 +0100 Subject: [PATCH 1/2] [Rector] Added rector configuration --- composer.json | 1 + rector.php | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 rector.php diff --git a/composer.json b/composer.json index 18f7453..fe6afba 100644 --- a/composer.json +++ b/composer.json @@ -32,6 +32,7 @@ "require-dev": { "ibexa/code-style": "~2.0.0", "ibexa/doctrine-schema": "~5.0.x-dev", + "ibexa/rector": "~5.0.x-dev", "mikey179/vfsstream": "^1.6", "phpunit/phpunit": "^9.6" }, diff --git a/rector.php b/rector.php new file mode 100644 index 0000000..da984b1 --- /dev/null +++ b/rector.php @@ -0,0 +1,25 @@ +withPaths([ + __DIR__ . '/src', + __DIR__ . '/tests', + ]) + ->withSets([ + IbexaSetList::IBEXA_50->value, + SymfonySetList::SYMFONY_60, + SymfonySetList::SYMFONY_61, + SymfonySetList::SYMFONY_62, + SymfonySetList::SYMFONY_63, + SymfonySetList::SYMFONY_64, + ]); From 60712a6f4fc14dbb8d05be112114c67f96a1715c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Sun, 16 Feb 2025 17:30:06 +0100 Subject: [PATCH 2/2] [Rector] Enabled rector on CI --- .github/workflows/ci.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4131d90..f5fe035 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,6 +33,31 @@ jobs: - name: Run code style check run: composer run-script check-cs -- --format=checkstyle | cs2pr + rector: + name: Run rector + runs-on: "ubuntu-22.04" + strategy: + matrix: + php: + - '8.3' + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP Action + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + extensions: 'pdo_sqlite, gd' + tools: cs2pr + + - uses: ramsey/composer-install@v3 + with: + dependency-versions: highest + + - name: Run rector + run: vendor/bin/rector process --dry-run --ansi + tests: name: Unit tests runs-on: "ubuntu-22.04"