RecipeCommand does not terminate services, leaving a broken router

Created on 18 July 2025, 9 days ago

Problem/Motivation

I have a site using JSON:API. We create a content type with a recipe. When we visit /jsonapi after applying the recipe our site throws a 500 error.

RouteNotFoundException: Route "jsonapi.node--article.collection" does not exist.

That's because the RecipeCommand does not terminate the kernel and allow the router to react to setRebuildNeeded for lazy rebuilding.

Steps to reproduce

vendor/bin/drush si --account-pass=admin --yes || exit 1

vendor/bin/drush recipe RECIPE

curl -If http://web/jsonapi || exit 1

curl will fail

Proposed resolution

Add `terminate` to `BootableCommandTrait` to terminate the servies.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

recipe system

Created by

πŸ‡ΊπŸ‡ΈUnited States mglaman WI, USA

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024