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

Throw an exception when building route paths unsupported by Drupal

$
0
0

Problem/Motivation

I recently tried to implement a route of the format /openapi/{plugin_id}.{content_type} to allow for a URL like /openapi/jsonapi.yaml. This is supported upstream in Symfony but not in Drupal. (Similarly, you cannot have two parameters which are not separated by a slash, such as {a}{b}.

Steps to reproduce

This is a Drupalism and confusing. Tackling the underlying constraints is a huge lift, but we should at least throw an exception when compiling routes when Drupal doesn't like the path.

Proposed resolution

Throw an exception when compiling route paths that we know aren't supported by Drupal, with a pointer to helpful docs.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 292761

Trending Articles



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