Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
entity system
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
5 Jun 2012 at 21:32 UTC
Updated:
29 Jul 2014 at 20:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
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 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 commentedThis one fixes #4.
Comment #6
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 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 commentedFix #7.
Comment #11
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 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 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 commentedComment #22
corvus_ch commentedMake patch apply to current 8.x branch.
Comment #24
corvus_ch commentedMake patch apply again.
Comment #25
aspilicious commentedtriggering the bot :) Thnx for working on this.
Comment #27
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 commentedSorry for that one. Here is a new patch including the missing line.
Comment #29
berdirLooks good to me, was RTBC before.
Comment #30
josevitalsoutoLooks 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 commentedNeeds issue summary
Comment #34
tim.plunkettNo need, it was committed.