Repository navigation
fix(ci): hold rector at 2.7 so the Nextcloud rules keep working - #3209
Merged
Merged
Conversation
Rector 2.8 removed Rector\PhpDocParser\PhpDocParser\PhpDocNodeTraverser, which nextcloud/rector v0.5.2 imports and instantiates in AnnotationToAttributeRector. Every analysed file then fails with "Class ... not found", the run trips the 50 system error limit and the Rector job aborts, so every pull request branched after 8a6a7cb fails a check that has nothing to do with its own changes. The upgrade came in as a side effect of an automated dependency bump, which re-resolved the whole bin lock: "^2.7.0" let it walk into 2.8.3 and carried phpstan 2.3.4 along. Holding rector at ~2.7.0 on its own is not enough - phpstan 2.3.4 ships phpdoc-parser 2.4 and hands rector 2.7 a FullyQualifiedNameNode its scoped parser does not know - so the lock is restored to the set that last passed, rector 2.7.0 with phpstan 2.3.2. This is a stopgap. The fix belongs in nextcloud/rector, whose main branch still carries the removed import; once it has a release built against rector 2.8 the constraint can be widened again. Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
blizzz
approved these changes
Nov 2, 2026
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.
The Rector job fails on
mainand therefore on every pull request branched after it, with a failure that has nothing to do with the changes under review:Rector 2.8 removed
Rector\PhpDocParser\PhpDocParser\PhpDocNodeTraverser.nextcloud/rectorv0.5.2 imports that class insrc/Rector/AnnotationToAttributeRector.phpand instantiates it on line 183 — the line the error names. Every analysed file fails the same way, the run hits the 50-error limit and the job aborts.The upgrade arrived as a side effect of an automated dependency bump, 8a6a7cb (
chore(dev-deps): Bump nextcloud/ocp package), which re-resolved the whole bin lock:"rector/rector": "^2.7.0"allowed the walk to 2.8.3 and carried phpstan 2.3.4 with it. That is why a pull request branched before it, such as #3203, still passes with rector 2.7.0 while #3199 and #2538 fail.Holding rector at
~2.7.0alone does not fix it: phpstan 2.3.4 ships phpdoc-parser 2.4 and hands rector 2.7's scoped parser aFullyQualifiedNameNodeit does not know, which fails withCallableTypeNode::__construct(): Argument #1 ($identifier) must be of type IdentifierTypeNode. Both have to move together, so the lock is restored to the set that last passed.Verified against a clean clone of
mainat 4150d63, running what CI runs (composer ithencomposer rector:check):mainas is — rector 2.8.3, phpstan 2.3.4PhpDocNodeTraversererrors, job aborts~2.7.0, phpstan left at 2.3.4CallableTypeNodetype error[OK] Rector is done!This is a stopgap. The real fix belongs in nextcloud/rector, whose
mainbranch still carries the removed import (last touched 2026-10-14, before rector 2.8 shipped on 2026-10-26). Once there is a release built against rector 2.8 the constraint can be widened again.🏁 Checklist
/backport to stableX.X🤖 AI (if applicable)