Closed (fixed)
Project:
Drupal core
Version:
10.1.x-dev
Component:
routing system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Jun 2020 at 22:05 UTC
Updated:
8 Sep 2023 at 09:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
catchComment #3
catchAfter #3151019: Only allow route names, deprecate support for route objects in UrlGenerator methods we don't need the logic at all, so can just remove the two calls to getRouteDebugMessage() in Drupal 10. However we'll need to move the logic inline if we want to trigger_error() from the methods..
Comment #4
catchAdding the trigger_error().
Replacing getRouteDebugMessage() with a private @internal helper so we can avoid calling the original - and we can just remove the private message in Drupal 10 too.
Comment #6
catchRe-rolled.
Comment #7
catchNot postponed on anything now.
Comment #8
andypostNW for deprecation test and docs update
needs @return in docblock
Comment #9
catchAdding the deprecation testing and the @return.
Comment #10
andypostFiled CR https://www.drupal.org/node/3172303 and updated patch with ref
Also updated other 2 places where unused methods implemented
Comment #11
andypostAs this methods undocumented now
- removed usage in testing code
- deprecated in remaining bubblable generator
Comment #17
smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.
At this time we will need a D10 patch and the deprecation to be 10.1 please
Comment #18
andypostupdated for 10.1/11.0
Comment #19
andypostfix indent for deprecation
Comment #20
smustgrave commentedClose! Appears to be a CI issue.
Comment #21
andypostAs I see the
$parametersargument is not used and looking how$nameargument is passed I set it type to expectedstring|\Symfony\Component\Routing\RouteComment #22
smustgrave commentedThink that's the last little bit and I'm good to mark it!
Comment #23
ankithashettyAddressed #22, thanks!
Comment #24
smustgrave commentedThanks!
Comment #25
catch#23 no longer applies.
Comment #26
andypostone hunk context fix via #2574981: Fix grammar ("an URL" should be "a URL") and consistent use of URL (not "url" / "Url") in documentation only, part 1
Comment #27
smustgrave commentedMoving back thanks for the reroll!
Comment #29
andypostUnrelated failure
Comment #30
alexpottI always find this a bit tricky - given the urlGenerator method triggers a deprecation is adding the deprecation here necessary. Sure to the docs - but doubling up on every deprecation message can be noisy. Not sure.
Let's add return and parameter typehinting.
Given this is test code I think this is fine.
Comment #31
andypostFix #30.2 and about 1) - I see no usage so no reason to throttle warnings
Comment #32
alexpottstring|SymfonyRoute $namecan typehint the param too.But that also means we should leave the implementation of the old getRouteDebugMessage() alone - which is normally for the best anyway.
Comment #33
andypostI think new private method will be removed in #3151019: Only allow route names, deprecate support for route objects in UrlGenerator methods
I mean
getRouteStringIdentifier()is a full copy ofgetRouteDebugMessage()(which we can't type hint except doc-block as existing) so I copied code and added todo with linkupdated IS
Comment #34
andypostComment #35
smustgrave commentedPoints for #32 addressed
Comment #36
alexpottCommitted d532f6f and pushed to 10.1.x. Thanks!
Added test coverage of the deprecated method return value.
Comment #38
andypostThank you! The last deprecation of route objects unblocked #3151019-31: Only allow route names, deprecate support for route objects in UrlGenerator methods
Comment #40
quietone commentedI published the change record.