Skip to content

Apply the new Rector suggestion in Debugger #634

Closed as not planned
Closed as not planned

Description

@armanist

Summary

Add the closure parameter type that Rector 2.8.3 asks for in Debugger::routeInfo(), so composer rector:check passes again.

Why

The CI workflow runs composer update, so it installs the newest Rector. Rector 2.8.3 reports one change that the earlier version did not, and every pull request now fails the Rector step on PHP 8.1, 8.2 and 8.3:

src/Debugger/Debugger.php:249
-        return array_filter($info, fn ($value): bool => $value !== null && $value !== []);
+        return array_filter($info, fn (string|array|null $value): bool => $value !== null && $value !== []);
Applied rules: AddArrayFunctionClosureParamTypeRector

Scope

  • Apply that one change in src/Debugger/Debugger.php.
  • Rector also warns that the rule DeclareStrictTypesRector registered in the Rector config is deprecated and will be removed. That is not part of this ticket; it needs its own change before the rule is removed.

Acceptance Criteria

  • composer rector:check, composer cs:check, composer phpstan and the Debugger tests pass
  • no behavior change

Activity

  1. added this to the 3.1.1 milestone on Oct 29, 2026
  2. self-assigned this
    on Oct 29, 2026
  3. armanist commented on Oct 29, 2026

    @armanist
    CollaboratorAuthor

    Not needed as a separate change. The same one-line change to Debugger::routeInfo() was added to the pull request for #622 (#632), because that pull request could not go green with the new Rector failing, so it is handled there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

tech debtTechnical debt reduction

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions