Closed (fixed)
Project:
Drupal core
Version:
10.1.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 Feb 2023 at 18:31 UTC
Updated:
9 Mar 2023 at 14:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
andypostFiled CR and patch, not sure if deprecation needs separate method as
generate()also should become internalComment #3
catchI think this needs to point to Link::fromTextAndUrl() for the alternative so it's not @internal. But otherwise looks good.
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Link.php/...
Comment #4
andypostIt can't point to
Link::fromTextAndUrl()because this method returnsGeneratedLinkobject butLinkis renderable elementComment #5
catchOh now I see... this is what gets called by Link::toString().
So all we're doing is removing an internal wrapper for another internal method, it's slightly odd that the deprecation points there, but in practice people should already not be using this, so they won't see it, and if they are, then worst thing is they use ::generate() instead which will be no worse than they're already doing.
Comment #6
quietone commentedThe deprecation message for a method does not start with 'The'. And I was getting a phpcs error on the deprecation message in the interface.
I updated the patch.
Comment #7
andypostMy bad, thank you for fix
Comment #8
longwaveCommitted and pushed to 10.1.x, thanks!