Problem/Motivation

As of https://docs.google.com/document/d/1BxgNvyIRcxYGzzA1DLkZ6A4-c8gGFixypNvP... we want to make clear which bits of the URL generation
machinery should be used

Proposed resolution

* \Drupal\Core\Routing\UrlGeneratorInterface::generateFromPath() should be used as generateFromRoute().
* It should point to \Drupal\Core\Url instead

Remaining tasks

User interface changes

API changes

Data model changes

Comments

dawehner created an issue. See original summary.

sdstyles’s picture

Status: Active » Needs review
StatusFileSize
new786 bytes
legovaer’s picture

There isn't a documenting standard for @internal, but I'd suggest to start the actual documentation on the next line.

Something like:

 * @internal
 *   Should not be used in user code. Use \Drupal\Core\Url instead.
dawehner’s picture

Status: Needs review » Needs work

So yeah @internal should not have additional information, see some of the other related patches for examples.

snehi’s picture

Assigned: Unassigned » snehi
Status: Needs work » Needs review
StatusFileSize
new786 bytes
new796 bytes

Done as Suggested in #3 and #4.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +rc target triage

Thank you!

xjm’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -rc target triage +rc target

This patch is changing generateFromRoute(), not generateFromPath(). There's #2606386: mark \Drupal\Core\Routing\UrlGeneratorInterface::generateFromRoute() as internal for the former.

https://docs.google.com/document/d/1BxgNvyIRcxYGzzA1DLkZ6A4-c8gGFixypNvP... specifies also deprecating generateFromPath().

Discussed with @effulgentsia and we agreed on making this an RC target to minimize the surface of the routing and URL generation APIs prior to release.

anil280988’s picture

Status: Needs work » Needs review
StatusFileSize
new795 bytes
new707 bytes

Description and "Use \Drupal\Core\Url instead." text should be in different line, in accordance with other patches.
Also, do we have to make changes in generateFromPath() function?

Status: Needs review » Needs work

The last submitted patch, 8: 2606388-8.patch, failed testing.

dawehner’s picture

@anil280988
Please look at #7

anil280988’s picture

Hi dawehner/xjm,
Could you point me out to generateFromPath() function. Where to make changes.

cilefen’s picture

Issue tags: +Needs reroll
snehi’s picture

This issue is already resolved.
@Anil take a fresh clone and check. Your patch is already there.

Thanks.

cilefen’s picture

\Drupal\Core\Routing\UrlGeneratorInterface::generateFromPath() does not exist.

snehi’s picture

Title: mark \Drupal\Core\Routing\UrlGeneratorInterface::generateFromPath() as internal » mark \Drupal\Core\Routing\UrlGeneratorInterface::generateFromPath() should be used as generateFromRoute()
Issue summary: View changes
snehi’s picture

pwolanin’s picture

Title: mark \Drupal\Core\Routing\UrlGeneratorInterface::generateFromPath() should be used as generateFromRoute() » mark \Drupal\Core\Routing\UrlGeneratorInterface::generateFromRoute() as @internal
snehi’s picture

Assigned: snehi » Unassigned
zpawn’s picture

Version: 8.0.x-dev » 8.1.x-dev
Status: Needs work » Needs review
Issue tags: -rc target, -Needs reroll
StatusFileSize
new623 bytes

reroll

andypost’s picture

Issue tags: +SprintWeekend2016

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

roderik’s picture