Deprecate unused MatchingRouteNotFoundException

Created on 28 March 2023, over 1 year ago
Updated 6 August 2024, 5 months ago

Problem/Motivation

According to \Drupal\Core\Url::createFromRequest:

  /**
   * @throws \Drupal\Core\Routing\MatchingRouteNotFoundException
   *   Thrown when the request cannot be matched.
   */
  public static function createFromRequest(Request $request) {

But really it throws Symfony\Component\Routing\Exception\ResourceNotFoundException, which is NOT handled with code like this:

    try {
      $url = Url::createFromRequest($request);
    } catch (MatchingRouteNotFoundException) {
      return;
    }

The class is used nowhere else.

Proposed resolution

Remove or deprecate the class, fix docs.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Fixed

Version

11.0 🔥

Component
Documentation 

Last updated 1 day ago

No maintainer
Created by

🇩🇪Germany geek-merlin Freiburg, Germany

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024