API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...
This is incorrect:
in Drupal 8.0.0, intended to be removed in Drupal 9.0.0 Please use toLink() instead.
Should say that it's toLink()->toString() instead. Developers copying the code given here will find it doesn't work!
Also the @see to toLink() is broken, probably missing the ().
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | interdiff_3059564_12-14.txt | 951 bytes | init90 |
| #14 | 3059564-14.patch | 2.74 KB | init90 |
| #10 | 3059564-10.patch | 2.74 KB | yogeshmpawar |
| #6 | 3059564-6-update-depecation-message.patch | 1.73 KB | fredysan |
| #2 | 3059564-2-update-depecation-message.patch | 691 bytes | fredysan |
Comments
Comment #2
fredysan commentedPlease review
Comment #3
fredysan commentedComment #4
joachim commentedThanks for the patch!
LGTM.
Comment #5
alexpottWe need to update the corresponding @trigger_error() here
too.
Comment #6
fredysan commentedPlease review.
Comment #7
fredysan commentedComment #9
yogeshmpawarComment #10
yogeshmpawarUpdated patch added with an interdiff.
Comment #12
yogeshmpawarUpdated patch with an interdiff.
Comment #13
init90Looks like changes was added to improper place. According to the task description need to update deprecated message for link() method, but in a patch the message ancidentally have been updated for url() method.
Comment #14
init90Updated patch.
Comment #15
joachim commentedComment #16
alexpottCommitted and pushed 1546b4b85a to 8.8.x and 0dbceaa4eb to 8.7.x. Thanks!
We have a thing about not using the word Please so I've remove that from the deprecation message on commit. I've checked that the CR also agrees with this advice. One thing that complicates this a bit is that there times when calling toString() is no longer needed at the point you were calling ::link() but it is the most direct replacement so I guess this is fine.
Also fixed the @see mentioned in the issue summary.