Skip to content

ci(rector): run the refactoring check on every build - #3

Merged
danielebarbaro merged 2 commits into
mainfrom
chore/rector-in-ci
Sep 8, 2026
Merged

ci(rector): run the refactoring check on every build#3
danielebarbaro merged 2 commits into
mainfrom
chore/rector-in-ci

Conversation

@danielebarbaro

Copy link
Copy Markdown
Contributor

No description provided.

Rector was added with the dev dependencies but left out of both the
aggregate test script and the workflow, because it could not be
verified at the time. It now passes clean on Laravel 12 and 13, so it
joins the chain after the formatting check and gets its own step.

The step skips Windows, matching type coverage and the test suite. The
check describes code shape rather than runtime behaviour, so the eight
Linux rows already cover both supported Laravel versions and both PHP
versions.

Claude-Session: https://claude.ai/code/session_0131mg78D5c5ao3zWZ5c8sDX
rector.php skips three rules by class name, and Rector fails hard when
a skipped rule does not exist. On a prefer-lowest build the previous
constraints resolved rector 2.0.0 and rector-laravel 2.0.0, where none
of the three had been written yet:

    [ERROR] These rules from "$rectorConfig->skip()" does not exist
     * RectorLaravel\Rector\FuncCall\AppToResolveRector
     * RectorLaravel\Rector\ClassMethod\MakeModelAttributesAndScopesProtectedRector
     * Rector\Php84\Rector\MethodCall\NewMethodCallWithoutParenthesesRector

Both constraints move to ^2.6, the range that carries them. Verified
on the two ends of the matrix: Laravel 12 with prefer-lowest, which
resolves rector 2.6.4 and rector-laravel 2.6.1, and Laravel 13 with
prefer-stable. Both dependencies are dev only, so nothing changes for
an application installing the package.

Claude-Session: https://claude.ai/code/session_0131mg78D5c5ao3zWZ5c8sDX
@danielebarbaro
danielebarbaro merged commit 76d3c85 into main Sep 8, 2026
16 checks passed
@danielebarbaro
danielebarbaro deleted the chore/rector-in-ci branch September 8, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant