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

Support route aliasing (Symfony 5.4) and allow deprecating the route name

$
0
0

Problem/Motivation

Over in #2723579: [PP-1] NodeRouteProvider should extend DefaultHtmlRouteProvider we are trying to deprecate 'node.add_page' and 'node.add' routes.

The problem is these route names are getting used in a lot of places:

  • The URL generation. e.g. Url::fromRoute('node.add_page')
  • Menu Link/local task/local action generation.
  • Drupal::routeMatch()->getRouteName is used in various contexts for doing things conditionally.
  • Breadcrumb builders primarily seem to use route names to derive context.
  • There might be a few more.

Over in #2723579: [PP-1] NodeRouteProvider should extend DefaultHtmlRouteProvider, NodeRouteProcessorBc is added which take care of URL generation but what about the rest?

Proposed resolution

Figure out a way to deprecate route names.

Remaining tasks

Figure out all the endge cases by looking at contribs usage. http://grep.xnddx.ru/search?text=node.add and http://grep.xnddx.ru/search?text=node.add_page
Finalize the implementation detail.
Implement the soultion.

User interface changes

None.

API changes

This will be an API addition. An API to allow the deprecation of the routes.

Data model changes

None.

Release notes snippet

Not worth mentioning in release notes.


Viewing all articles
Browse latest Browse all 296241

Trending Articles



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