Fix installation error with JSON:API Extra in custom Drupal 11 profiles due to missing synthetic service `kernel`

Created on 20 February 2025, about 2 months ago

Problem/Motivation

Facing an error when installing Drupal 11 and enabling the module before Drupal has finished installing.

Steps to reproduce

When installing JSON:API Extra while installing Drupal 11 in a custom profile
Then I will hit the following error

Symfony\Component\DependencyInjection\Exception\RuntimeException: You have requested a synthetic service ("kernel"). The DIC does not know how to construct this service. in Symfony\Component\DependencyInjection\ContainerBuilder->createService() (line 1093 of /var/www/html/vendor/symfony/dependency-injection/ContainerBuilder.php).

Proposed resolution

Switch from using the "kernel.environment" service to change on the environment

Remaining tasks

  • File an issue
  • MR
  • Test
  • Review

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇯🇴Jordan Rajab Natshah Jordan

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