Needs work
Project:
Drupal core
Version:
main
Component:
other
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Sep 2014 at 20:07 UTC
Updated:
15 Sep 2026 at 19:46 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehnerI don't think this is novice as we originally had big issues finding a better namespace.
Comment #2
tim.plunkettRight, deciding the namespace isn't novice, but performing the move will be.
Comment #3
Palashvijay4O commentedSubmitting a patch .
Comment #4
tim.plunkett@Palashvijay4 I think this was the wrong patch?
Comment #5
jibranNW for #4
Comment #6
Palashvijay4O commentedSir @tim.plunkett why the patch is not correct ?
Comment #7
tim.plunkettAll the patch does is remove the LinkGeneratorTest, and change unrelated CSS.
It does not touch LinkGenerator at all.
Comment #8
alimac commentedComment #9
rpayanmany progress @Palashvijay4O?
Comment #10
dawehnerWe should not assign issues anyway these days.
Comment #11
rpayanmThen, which is the new namespace for LinkGenerator? I like work on this!
Comment #12
dawehnerWell, that is the point of the issue, find a good one.
Do you have a good suggestion?
Comment #13
mpdonadioIt generates HTML, so Drupal\Core\Render would potentially be valid, and this is where the render service landed.
It's related to routing, so Drupal\Core\Routing may make sense. Same could be said for Drupal\Core\Path.
It could go in a new namespace in case there are any other link related activities in the future, Drupal\Core\Link
Of those, since the output of this service is HTML, then Drupal\Core\Render is most appropriate.
Comment #14
borisson_I agree that Drupal\Core\Render makes the most sense, I've added a patch that implements this change.
Comment #15
tadityar commentedstatus change so bot will test.
Comment #17
RavindraSingh commentedIf Linkgenerator is moving out from unitlity so LinkGenratorInterface and LinkGeneratorTest should moved out
use Drupal\Core\Utility\LinkGeneratorInterface;
use Drupal\Tests\Core\Utility\LinkGeneratorTest;
Should be
use Drupal\Core\render\LinkGeneratorInterface;
use Drupal\Tests\render\Utility\LinkGeneratorTest;
Comment #18
tadityar commentedTrying. I also moved LinkGeneratorInterface and the test to Render. Please correct me if I'm wrong.
Comment #20
tadityar commentedForgot to change the namespace in LinkGeneratorTest.php . Changed now
Comment #21
shivanshuag commented@tadityar The patch should also remove LinkGenerator.php and LinkGeneratorInterface.php from core/tests/Drupal/Tests/Core/Utility/ and LinkGeneratorTest.php from core/tests/Drupal/Tests/Core/Utility/
Comment #22
tadityar commented@shivanshu: oops, updated!
Comment #23
tadityar commentedI realized that if do the method in patch #22 It'll remove the history of the file. So this time I used
git diff -C --stagedinstead.Comment #24
tadityar commentedAdding interdiff.
Comment #25
dawehnerSomeone should update the issue summary and add a beta evalulation to explain how useful this is, or not.
Comment #26
tadityar commentedAdded beta evaluation and priority change. Please correct me if I'm wrong.
Comment #27
tadityar commentedComment #28
dawehnerThis itself looks fine, thank you!
What is your oppinion here, do you think its worth broken existing people's code due to the renaming of the namespace?
Comment #29
tadityar commented@dawehner I think that it depends on how often this class is used, but since I don't know how often it is I'm not sure.
Comment #30
dawehnerWell, that classed is used quite often, given that it will be used to create links, actually it is one of the most often used ones.
Comment #31
tadityar commentedSo, will we move this at all? Maybe it can be closed(won't fix)?
Comment #32
mile23Reroll.
Comment #47
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #48
smustgrave commentedBut isn't LinkGenerator an actual utility though?
Comment #50
smustgrave commentedThis may still be valid but there also other files in that folder that could probably be moved as services.
Would have to consider BC too and do that fun dance.