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

Only allow route names, deprecate support for route objects in UrlGenerator methods

$
0
0

Problem/Motivation

Following #2917331: Decouple from Symfony CMF we can simplify the implementation of, and reduce the API surface of, methods in UrlGenerator that accept both a route name and route object.

Examples:

UrlGenerator::getPathFromRoute()

UrlGenerator::generateFromRoute()

(also supporting protected methods)

In Drupal 10, this would also allow us to string typehint for those methods too.

Proposed resolution

Trigger a deprecation message when a route object is passed in.

Remaining tasks

While there's not a strict dependency in either direction, this issue is closely linked to #3151017: Deprecate UrlGenerator::supports() and UrlGenerator::getRouteDebugMessage().

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 296841

Trending Articles



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