Here is the complete detail
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Url.php/f...
Return value
string The internal path for this route.
Throws
\UnexpectedValueException. If this is a URI with no corresponding system path.
Deprecated
in Drupal 8.x-dev, will be removed before Drupal 8.0. System paths should not be used - use route names and parameters.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 2413701-9.patch | 603 bytes | marvin_b8 |
Comments
Comment #1
hussainwebI am trying to figure out why this is really deprecated, apart from the purist view that it should not be used as described in the comment. I found only one change record where this method is mentioned.
On the other hand, there are lots of references in core where this method is used and there doesn't seem to be a suitable substitute. We need to have a strong concise substitute before we remove a helper method.
Comment #2
dawehnerWe could also ask ourself whether this kind of method should be rather @internal
Comment #3
alexdmccabeThe core Path module seems to rely on having access to these internal paths for creating aliases - and unless I'm missing something, D8 Pathauto can't work with Path to make its magic happen without these internal paths, unless Path starts accepting routes and internal paths.
I agree though, without a replacement (that would be doing much the same job), I don't see why this is deprecated. It's not inconceivable to need the internal path (example: when creating aliases) and I don't see how it's doing any harm.
Comment #4
pwolanin commentedComment #5
pwolanin commentedPossibly we need to leave this alone now.
Comment #6
pwolanin commentedComment #7
xjmI think it's worth exploring marking it internal instead.
Comment #8
pwolanin commentedUses like this seem very hard to remove:
Comment #9
marvin_b8 commentedComment #10
marvin_b8 commentedComment #11
pwolanin commentedactually duplicate to #2367753: \Drupal\Core\Url::getInternalPath() cannot be deprecated
Comment #12
pwolanin commented