Problem/Motivation
In #3383339: Replace implementing deprecated interface Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface with ValueResolverInterface we removed Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface from the implements of \Drupal\Core\Controller\ArgumentResolver\Psr7RequestValueResolver and
\Drupal\Core\Controller\ArgumentResolver\RouteMatchValueResolver.
This means that the supports() function in both resolvers is now cruft, since it was only there to fulfil the contract from Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface.
However, do we need a follow-up to deprecate and then remove methods like Psr7RequestValueResolver::supports() in 11.x? Should be cruft now.
This issue is for deprecating both supports()s.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3383548
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
Comment #2
spokjeComment #4
spokjeSince there's no usage of both
supports()in core currently, I believe we don't need a deprecation test for this one?Comment #5
mondrakeBeing
finalclasses, maybe we can just remove the methods?Comment #6
spokjeWould love that and it makes sense, but there currently doesn't seem to be any ruling on that in https://www.drupal.org/about/core/policies/core-change-policies/drupal-d... and I have been bitten too much by doing things not described in there to do so straight up in here.
Maybe this could be the issue to enhance that?
Comment #7
catchI think argument resolvers would be covered under @internal insofar as they're equivalent to plugins and controllers and therefore not explicitly named. However also I think it's easier to deprecate + remove when in doubt same as we do for constructors unless something particularly makes that difficult.
finalhelps for removing protected methods but not for public, so don't think there's anything particularly different there.Comment #8
mondrakeSecond thinking, it’s not just about extending classes but also about potential direct calls to the methods in these classes. So let’s deprecate - but now with PHPStan doing the check for calls, I think we should do the
@deprecateand@seedance in the docblocks.Comment #9
spokjeIronic, and absolutely right, thanks @mondrake
Comment #10
mondrakeThanks!
Comment #12
catchCommitted 58ce7d4 and pushed to 11.x. Thanks!
Comment #14
spokjeAdded "Introduced in version" in CR.
Should it be published now or when 10.2.0 ships?
Comment #15
catchNow, but I frequently forget. Published.