Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293292

Make Url::toString(TRUE) explicit by having a Url::generate() method, as well as having GeneratedUrl::toString

$
0
0

Problem/Motivation

$url->toString(TRUE)->getGeneratedUrl()
Seriously, what does TRUE even mean.

Proposed resolution

  • Add $url->generate()
  • Deprecate \Drupal\Core\GeneratedUrl::getGeneratedUrl() in favor of \Drupal\Core\GeneratedUrl::toString().
  • disputed: Deprecate \Drupal\Core\Url::toString() in favor of \Drupal\Core\GeneratedUrl::toString(). This will lead to longer constructs ($url->toString() becomes $url->generate()->toString()), but enables us to also deprecate MetadataBubblingUrlGenerator / the behind-the-scenes bubbling of metadata that has caused many LogicExceptions

Remaining tasks

User interface changes

API changes

Data model changes


Viewing all articles
Browse latest Browse all 293292

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>