Repository navigation
Fix rector CI check - #1129
Merged
Merged
Fix rector CI check#1129
Conversation
rector 2.7.0 with phpstan 2.3.7 fails to process several files (CallableTypeNode type error inside phpstan). Bump rector-setup to ~2.8.0, which works with phpstan 2.3. Apply its one new finding in Manager and skip the parent return type rule for Config::offsetGet(): adding a native mixed return type would break subclasses that override it without one. Drop two skipped rules that rector 2.8 no longer registers.
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
cs-stanjob fails on every PR against 5.x right now (#1112, #1105, #1128).composer rector-setupresolves rector 2.7.0 with phpstan 2.3.7, and rector then fails on 20 files with a type error from inside phpstan:Changes:
rector-setupinstalls rector~2.8.0. With phpstan 2.3.7 it processes every file.Manager.php: one blank line, as requested byNewlineBeforeNewAssignSetRector.rector.php:AddReturnTypeDeclarationBasedOnParentClassMethodRectorforsrc/Config/Config.php. It wantsoffsetGet(): mixed, butConfigis not final, and a subclass that overridesoffsetGet()without a return type would fatal. That change can wait for 6.x.ObjectExplicitBoolCompareRector,RemoveDuplicatedReturnSelfDocblockRector) that rector 2.8 reports as deprecated and never registered.composer rector-checklocally: "Rector is done!", exit 0, no warnings.