Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As we've EntityInterface::uri() now, we can remove the deprecated entity_uri() function and replace it with $enitity->uri() calls.
Comment | File | Size | Author |
---|---|---|---|
#28 | 1618172-28.patch | 10.58 KB | corvus_ch |
#24 | 1618172-24.patch | 10.58 KB | corvus_ch |
#22 | 1618172-22.patch | 10.58 KB | corvus_ch |
#18 | entity-uri-removed-1618172-18.patch | 9.56 KB | Berdir |
#15 | 1637342-15.patch | 9.57 KB | jcisio |
Comments
Comment #1
estebanvalerio.h CreditAttribution: estebanvalerio.h commentedWorked with Brolag
We did a search through all Drupal 8.x project and replaced the entity_uri() function for OBJECT->uri();
Comment #2
estebanvalerio.h CreditAttribution: estebanvalerio.h commentedComment #3
fagoPlease watch out to not remove the sprint tags to avoid the issue moving out of our radar. :/
Comment #4
fagoConversions are straight forward and look good. But we also need to remove the function as well as all the references to it:
Comment #5
jcisio CreditAttribution: jcisio commentedThis one fixes #4.
Comment #6
jcisio CreditAttribution: jcisio commentedSame as #5, with Entity::uri() being namespaced.
Comment #7
fagoIt's not used anywhere sounds like it is for nothing, but it isn't. It's available to hook_url_outbound_alter(). Thus, let's don't add that. (for $entity as well)
Once we already change the comment I think we can fix this part at the same time as well, i.e. let's remove the $entity_type option.
Comment #8
aspilicious CreditAttribution: aspilicious commenteddo we need to keep a callback wrapper like we did with the entity label?
Comment #9
fagoI don't think so. Where would you use that entity_uri callback? I can't imagine a use case and we don't have one in core.
Comment #10
jcisio CreditAttribution: jcisio commentedFix #7.
Comment #11
jcisio CreditAttribution: jcisio commentedEven better.
Comment #12
fagoWhy that docu change? It should read as previous, but just remove the entity type document and fix the reference to entity_uri. Then of course we have to fix the invocation to don't include the entity type as well.
Comment #13
jcisio CreditAttribution: jcisio commentedI changed to correct that document, even I thought that it could be changed later when we removed the 'entity_type' in the $options array in #1643362: Remove 'entity_type' from Entity::uri()'s return (I've just created it).
Because 1/ Those values are not directly used in url() and l(). 2/ Any module can put more value into the $options array, I think this documentation change is needed.
Comment #14
fagoChanging that documentation changes how that is supposed to be used, what needs discussion and a separate issue. So let's focus on deprecating entity_uri() here.
Comment #15
jcisio CreditAttribution: jcisio commentedOk that's exactly what I thought in #13. So reverting this documentation change.
(edit) PS: wrong filename, but patch is correct.
Comment #16
Berdir#15: 1637342-15.patch queued for re-testing.
Comment #18
BerdirRe-rolled.
Comment #19
fagoPatch looks good!
Comment #20
webchickYay for less code. :D
However, this seems to no longer apply. ;(
Comment #21
corvus_ch CreditAttribution: corvus_ch commentedComment #22
corvus_ch CreditAttribution: corvus_ch commentedMake patch apply to current 8.x branch.
Comment #24
corvus_ch CreditAttribution: corvus_ch commentedMake patch apply again.
Comment #25
aspilicious CreditAttribution: aspilicious commentedtriggering the bot :) Thnx for working on this.
Comment #27
aspilicious CreditAttribution: aspilicious commentedYou accidently removed too much :).
- $language = language_load($item->langcode);
- $uri = entity_uri('node', $node);
+ $uri = $node->uri();
The first line should stay!
Comment #28
corvus_ch CreditAttribution: corvus_ch commentedSorry for that one. Here is a new patch including the missing line.
Comment #29
BerdirLooks good to me, was RTBC before.
Comment #30
jvsoutoLooks good to me :)
Comment #31
catchLovely. Committed/pushed to 8.x.
Comment #32
BerdirUpdated http://drupal.org/node/1400186 to say "have been removed" instead of "will be removed" and added a reference to this issue.
Comment #33
BrockBoland CreditAttribution: BrockBoland commentedNeeds issue summary
Comment #34
tim.plunkettNo need, it was committed.