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
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:
- 3436255-fix-return-typhinting
changes, plain diff MR !7192
Comments
Comment #3
mondrakeComment #4
mondrakeComment #5
longwaveCompiler passes and event subscribers are internal so this should be fine especially if it only lands in 11.x.
Comment #6
mondrakeThere's just a few more typehints missing for getSubscribedEvents, let's fix here.
Comment #7
mondrakeComment #8
longwaveGood idea, thanks.
Comment #9
catchAgreed 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!
Comment #10
mondrakeNot pushed?
Comment #12
catchApparently not, pushed now.