Problem/Motivation
In #3425337: Fix root namespace classes DebugClassLoader forward compatibility warnings we fixed methods to be return typehinted that were reported by DebugClassLoader deprecations.
Some were left over, fix them here.
Proposed resolution
Typehint the methods.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3425537
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:
- 3425537-fix-remaining-methods
changes, plain diff MR !6904
Comments
Comment #3
mondrakeHad to add
: voidto one__wakeup()call that was being reported, from there I had to add it to all such methods otherwise they would not be covariant; by extension, I added: arrayto all__sleep()methods.Comment #4
smustgrave commentedApplied the MR and searched the repo for "#[\ReturnTypeWillChange]" using phpstorm. All instances appear to be replaced and caused no test failures.
Comment #5
mondrakeAdded a fix for #3425337-21: Fix root namespace classes DebugClassLoader forward compatibility warnings
Comment #6
mondrakeParent was reverted and is blocked on making PHP 8.3 the default CI environment
Comment #7
mondrakeComment #8
mondrakeThe implementation of the deprecation reporting in #3417066: Upgrade PHPUnit to 10, drop Symfony PHPUnit-bridge dependency is now reporting about these missing fixes, that the current phpunit-bridge is not: https://git.drupalcode.org/issue/drupal-3417066/-/jobs/1012561
I think I can set this back to RTBC since the MR now is exactly as RTBCed in #4.
Comment #9
longwaveIIRC
TRUEreturn type is PHP 8.2, so we should drop PHP 8.1 support first?Comment #10
mondrakeYes it's PHP 8.2. But aren't we shipping D11 on PHP 8.3? Meaning, haven't we dropped PHP < 8.3 in the branch already? For sure we are testing on PHP 8.3 only.
Comment #11
longwaveWe haven't technically done that until #3413268: Add PHP 8.3 requirement to Drupal 11.0.x lands although CI is PHP 8.3 only.
Comment #12
mondrakeIf we need to wait for #11 then ok; I wouldn't revert the MR change from bool to TRUE, since it would need to readd #[\ReturnTypeWillChange] to prevent PHP 8.3 to throw its own deprecation.
Comment #13
mondrakeComment #14
mondrakeThe blocker is in, this needs a rebase
Comment #15
mondrakeMerged with 11.x, no conflicts. Back to RTBC.
Comment #16
mondrakeComment #20
catchCommitted/pushed to 11.x, thanks!
Ignore the cherry-pick and revert, copy/pasted the wrong commit hash when cherry-picking another commit.