Skip AddSeeTestAnnotationRector to fix rector-dry CI gate - #12
Merged
Conversation
Rector's rectorPreset enables AddSeeTestAnnotationRector, which wants to add @see annotations pointing at test classes in src/. Since /tests is export-ignored and the module declares no autoload-dev for the Tests namespace, those references would dangle in every published install. The rule started firing after an upstream dependency update; the container project pins nothing, so CI has failed on every branch since 2026-07-21.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
Static analysisjob fails onmake rector-dry(exit 2). All three PHPUnit jobs pass.Rector's
rectorPresetenablesAddSeeTestAnnotationRector, which wants to add@seeannotations pointing at test classes to both classes insrc/:This is not caused by any change on branch
6— the same failure hitfix/silverstripe-assets-compatibilityon 2026-07-21. The container project ships nocomposer.lockand runsminimum-stability: dev, so CI installs whatever is current upstream and the rule started firing somewhere after the last green run on 2026-05-07.Fix
Skip the rule instead of applying the annotations.
.gitattributesmarks/tests export-ignoreand the module'scomposer.jsondeclares noautoload-devfor theWeDevelop\SvgImage\Tests\namespace, so those@seereferences would point at classes absent from every published install. The config already skips three other rules.Verification
Run in-container against this change:
make rector-dry[OK] Rector is done!make analyse[OK] No errorsmake testFollow-up (not in this PR)
CI is not reproducible: unpinned dev-stability dependencies mean the next rule added upstream breaks the build again on a branch that changed nothing. Committing a
composer.lockfor the container project under.docker/app/would address that.