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\Utility\LinkGeneratorInterface::generate should be marked as internal.
* It should point to \Drupal\Core\Link instead

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner created an issue. See original summary.

dawehner’s picture

Component: base system » documentation
Issue summary: View changes
sdstyles’s picture

Status: Active » Needs review
FileSize
647 bytes
dawehner’s picture

See my comment on https://www.drupal.org/node/2606386#comment-10521404, we could point to Link::__construct and Link::fromTextAndUrl ...

jhodgdon’s picture

Status: Needs review » Needs work
+++ b/core/lib/Drupal/Core/Utility/LinkGeneratorInterface.php
@@ -72,6 +72,9 @@
+   * @internal Should not be used in user code.
+   *   Use \Drupal\Core\Link instead.

Don't put stuff with @internal. Just put it as @internal and if you want to add more docs, put that in a separate spot.

anil.gangwal’s picture

anil.gangwal’s picture

Status: Needs work » Needs review
dawehner’s picture

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

This seems reasonable for me.

xjm’s picture

Issue tags: -rc target triage +rc target

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.

xjm’s picture

Status: Reviewed & tested by the community » Fixed

So this patch does not seem to implement the feedback in #5, which seems to be saying that there should not be any docs with @internal itself. I looked into this more:

Based on that, I'm actually going to go ahead and commit this as-is since it is useful information in the context. If we decide going forward that this is not the correct format for @internal, we should add that to 1354 and just reshuffle any docs that have it in the wrong format.

Committed and pushed to 8.0.x. Thanks!

  • xjm committed 034a850 on 8.0.x
    Issue #2606390 by anil.gangwal, sdstyles, dawehner, jhodgdon: mark \...

  • xjm committed 034a850 on 8.1.x
    Issue #2606390 by anil.gangwal, sdstyles, dawehner, jhodgdon: mark \...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.