Problem/Motivation

Out there in #3417066: Upgrade PHPUnit to 10, drop Symfony PHPUnit-bridge dependency there are still a lot of DebugClassloader deprecations for Symfony 7 typehints, see https://git.drupalcode.org/issue/drupal-3417066/-/pipelines/127550 and its test jobs.

Proposed resolution

In this issue, fix Compiler related issues like

    Method
    "Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface::process()"
    might add "void" as a native return type declaration in the future. Do the
    same in implementation
    "Drupal\Core\DependencyInjection\Compiler\ModifyServiceDefinitionsPass" now
    to avoid errors or add an explicit @return annotation to suppress this
    message.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3436255

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mondrake created an issue. See original summary.

mondrake’s picture

Status: Active » Needs review
mondrake’s picture

Issue tags: +Major version only
longwave’s picture

Title: Fix return typhinting for Compiler related classes » Fix return typehinting for Compiler related classes
Status: Needs review » Reviewed & tested by the community

Compiler passes and event subscribers are internal so this should be fine especially if it only lands in 11.x.

mondrake’s picture

Status: Reviewed & tested by the community » Needs work

There's just a few more typehints missing for getSubscribedEvents, let's fix here.

mondrake’s picture

Title: Fix return typehinting for Compiler related classes » Fix return typehinting for Compiler and EventSubscriber related classes
Status: Needs work » Needs review
longwave’s picture

Status: Needs review » Reviewed & tested by the community

Good idea, thanks.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Agreed with #5 this is all @internal and even more than that, very unlikely candidates for subclassing even within that.

Committed/pushed to 11.x, thanks!

mondrake’s picture

Status: Fixed » Reviewed & tested by the community

Not pushed?

  • catch committed 434e19e0 on 11.x
    Issue #3436255 by mondrake, longwave: Fix return typehinting for...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Apparently not, pushed now.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.