[PP-1] NodeRouteProvider should extend DefaultHtmlRouteProvider

Created on 11 May 2016, over 8 years ago
Updated 30 January 2023, almost 2 years ago

Problem/Motivation

NodeRouteProvider does not extend DefaultHtmlRouteProvider. Thus, it contains duplicated logic.

Proposed resolution

Make NodeRouteProvider extend DefaultHtmlRouteProvider.

Remaining tasks

Review.

User interface changes

None.

API changes

The 'node.add' and 'node.add_page' routes are deprecated and replaced by 'entity.node.add_form' and 'entity.node.add_page' routes without any BC break.

[
'node.add_page' => 'entity.node.add_page',
'node.add' => 'entity.node.add_form',
];

If someone has a route provider that extends NodeRouteProvider and has e.g. a getCanonicalRoute() with different parameters than DefaultHtmlRouteProvider this could break. I think that is something we can get away with in a minor version but I guess we could write a change notice to be nice.

Data model changes

None.

Blocked on

On

📌 Task
Status

Needs work

Version

10.1

Component
Node system 

Last updated 4 days ago

No maintainer
Created by

🇩🇪Germany tstoeckler Essen, 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.

  • The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • First commit to issue fork.
  • 🇦🇺Australia acbramley

    Did my best to reroll #94 onto 11.x but the deprecation stuff is a bit new to me. It all changed in #3272779: [Symfony 6.1] Replace deprecationListenerTrait with PHPUnitBridge ignoreFile so hopefully I've done it right.

  • Pipeline finished with Failed
    about 1 year ago
    Total: 754s
    #43604
  • Pipeline finished with Failed
    9 months ago
    Total: 630s
    #134871
  • First commit to issue fork.
  • Pipeline finished with Canceled
    5 months ago
    Total: 170s
    #234413
  • Pipeline finished with Failed
    5 months ago
    Total: 855s
    #234414
  • First commit to issue fork.
  • Pipeline finished with Failed
    5 months ago
    Total: 89s
    #244340
  • 🇳🇿New Zealand quietone

    This needed a rebase, which I did, and then updated the deprecation messages. That should help the Kernel tests to pass. I ran ManageFieldsFunctionalTest::testHelpDescriptions locally and it failed with access denied.

  • Pipeline finished with Failed
    5 months ago
    Total: 95s
    #244352
  • Status changed to Needs review 5 months ago
  • 🇬🇧United Kingdom joachim

    The problem was the requirements on the routes, which were keys which didn't exist any more -- probably from an older version of this MR, referring to requirements handlers which have been removed since.

    ( add a way to manually use the test site from a Functional test Needs review was useful here for debugging!)

  • Pipeline finished with Failed
    5 months ago
    Total: 153s
    #244655
  • Pipeline finished with Success
    5 months ago
    Total: 1486s
    #245016
  • Pipeline finished with Success
    5 months ago
    Total: 592s
    #245040
  • Status changed to Needs work 5 months ago
  • 🇬🇧United Kingdom joachim

    Oh yes -- should we move most of core/modules/node/src/RouteProcessor/NodeDeprecatedRouteProcessor.php to a common class and leave just the $routeMap & the deprecation message in that class, so it can be reused in future route deprecations?

  • Status changed to Postponed 4 days ago
  • 🇷🇴Romania amateescu

    I think it would be better if we do this after 📌 Support route aliasing (Symfony 5.4) and allow deprecating the route name Needs work , with the benefit of having a lot less BC code and test coverage to maintain.

Production build 0.71.5 2024