Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
documentation
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Nov 2014 at 10:43 UTC
Updated:
29 Oct 2015 at 10:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tim.plunkettComment #2
ianthomas_ukI think this depends on #2339219: [meta] Finalize URL generation API (naming, docs, deprecation) being sorted
Comment #3
mile23Url->getInternalPath()seems to be used 21 times in core.Should it really be deprecated?
Comment #4
mile23Comment #5
mile23Changing parent issue.
Comment #6
mile23Comment #7
jeroentStarted working on this issue.
Should it be something like this or is the fix too simple?
Comment #10
jeroentI removed unrelated changes + fixed a lot of failures, but I'm not sure this is the right way..
Patch attached.
Comment #13
jeroentI know RC1 is out, but there is still a small change we can remove this function. See #2205673-147: [META] Remove all @deprecated functions marked "remove before 8.0"
Comment #15
RavindraSingh commented$url->toString() should be trimmed.
I am not sure if this function also require tests?
Need tests.
Needs tests.
We are ending system_path with '/' and someplaces we are not using. why?
Need tests.
Also, we would require to think about getInternalPath was not terurning the paths ending with slash whereas. OLD Code
I have done some minor changes in existing patch and submitting here to review.
Main thing, this issue should be considered as a Major .
Comment #16
RavindraSingh commentedComment #17
RavindraSingh commentedComment #20
gauravjeet commentedIn the patch above, the function toString() does not give any results. That has to be replaced with specific values that include RouteName and the RouteParameters. Following are the Test files where changes have to be made in addition to the changes made in this attached patch, and then we can completely remove the getInternalPath() function usage from /core/lib/Drupal/Core/Url.php.
Test Paths :
/core/modules/aggregator/src/Tests/AggregatorRenderingTest.php
/core/modules/system/src/Tests/Menu/BreadcrumbTest.php
/core/tests/Drupal/Tests/Core/UnroutedUrlTest.php
/core/tests/Drupal/Tests/Core/UrlTest.php
Comment #21
gauravjeet commentedPutting this issue in needs review state
Comment #25
pwolanin commentedSince this is just a wrapper on UrlGenerator::getPathFromRoute() I don't think there is much gain if we are just swapping the one for the other.
I think we just need to change or remove the deprecation notice now.
Comment #26
tim.plunkettUntil every system that relies on an internal path can instead use a Url object, we need this.
One example: \Drupal\Core\Path\AliasStorageInterface::save().
Comment #27
pwolanin commentedI don't think using a Url object or not in method calls matters here, I think the real issue is that path processing and aliases are coupled to the "internal" path so we cannot remove that capability from the generator if we want to be able to e.g. create a path alias for a given route.
If we are not removing it from the generator, there is no point in removing the wrapper method from Url.
Comment #28
pwolanin commentedComment #29
pwolanin commentedComment #30
pwolanin commentedThis only affects phpdoc, not code
Comment #31
pwolanin commentedCould use an issue summary update, and a check for affected change records
Comment #35
webchickHm. Remove @deprecated entirely? Or target for 9 instead?
Comment #36
webchickTagging rc eligible since this is just about docs now.
Comment #37
jhodgdonPlease update the issue summary.
Comment #38
pwolanin commentedComment #39
alexpottCommitted b219839 and pushed to 8.0.x. Thanks!