Skip to content

Fix rector CI check - #1129

Merged
dereuromark merged 1 commit into
5.xfrom
fix-rector-ci
Nov 20, 2026
Merged

dereuromark merged 1 commit into
5.xfrom
fix-rector-ci

Conversation

@dereuromark

Copy link
Copy Markdown
Member

The cs-stan job fails on every PR against 5.x right now (#1112, #1105, #1128). composer rector-setup resolves rector 2.7.0 with phpstan 2.3.7, and rector then fails on 20 files with a type error from inside phpstan:

[ERROR] Could not process "src/Db/Adapter/AbstractAdapter.php" file, due to:
"PHPStan\PhpDocParser\Ast\Type\CallableTypeNode::__construct(): Argument #1 ($identifier)
must be of type ...IdentifierTypeNode, ...FullyQualifiedNameNode given"

Changes:

  • rector-setup installs rector ~2.8.0. With phpstan 2.3.7 it processes every file.
  • Manager.php: one blank line, as requested by NewlineBeforeNewAssignSetRector.
  • rector.php:
    • Skips AddReturnTypeDeclarationBasedOnParentClassMethodRector for src/Config/Config.php. It wants offsetGet(): mixed, but Config is not final, and a subclass that overrides offsetGet() without a return type would fatal. That change can wait for 6.x.
    • Drops two skip entries (ObjectExplicitBoolCompareRector, RemoveDuplicatedReturnSelfDocblockRector) that rector 2.8 reports as deprecated and never registered.

composer rector-check locally: "Rector is done!", exit 0, no warnings.

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.
@dereuromark dereuromark added the dependencies Pull requests that update a dependency file label Nov 20, 2026
@dereuromark
dereuromark merged commit a459233 into 5.x Nov 20, 2026
14 checks passed
@dereuromark
dereuromark deleted the fix-rector-ci branch November 20, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant