This snippet exists in two places (and has the necessary service injection with all the associated boilerplate):

     // Rebuild routing cache.
     $this->routeBuilder->rebuild();

This should not be necessary. But indeed it currently is. #2815845: Importing (deploying) REST resource config entities should automatically do the necessary route rebuilding will fix this in core, and then the code in REST UI can be simplified.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers created an issue. See original summary.

Wim Leers’s picture

Title: REST UI module should not be rebuilding routes » [PP-1] REST UI module should not be rebuilding routes
Status: Active » Postponed
FileSize
5.67 KB

Blocked on #2851127: REST UI module should not be rebuilding routes.

But here's a patch already for when that lands.

Wim Leers’s picture

Title: [PP-1] REST UI module should not be rebuilding routes » REST UI module should not be rebuilding routes
Status: Postponed » Needs review
rogierbom’s picture

Status: Needs review » Reviewed & tested by the community

Tested against 8.3.x

No comments, works as advertised

  • juampynr committed 14ed163 on 8.x-1.x authored by Wim Leers
    Issue #2851127 by Wim Leers, rogierbom: REST UI module should not be...
juampynr’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks!

Wim Leers’s picture

Simplification! :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.