Attempting to reference monolog services during site installation does not work

Created on 18 July 2024, 10 months ago

Problem/Motivation

Maybe just a gap in the documentation, but should the added `monolog.services.yml` attempt to reference services provided by the module proper, and `settings.php` is configured to make use of such `monolog.services.yml` at install time, site install fails.

Steps to reproduce

Place/configure `settings.php`, with a `monolog.services.yml`, as described under "Conditional Handlers" (including the `DrushLoggerServiceProvider` bit): https://git.drupalcode.org/project/monolog/-/tree/3.0.x?ref_type=heads#c...

Attempting to install the site the results an exception such as:

In CheckExceptionOnInvalidReferenceBehaviorPass.php line 119:
                                                                                                                                                
  The service "monolog.handler.default_conditional_handler" has a dependency on a non-existent service "monolog.handler.drupal.drupaltodrush".  

Proposed resolution

Update or provide additional example in README about how it might be necessary and how to prevent the use of the monolog configuration during site installation.

Remaining tasks

- Make the change.
- Review
- Merge
- Release

User interface changes

N/A.

API changes

N/A.

Data model changes

N/A.

📌 Task
Status

Active

Version

3.0

Component

Documentation

Created by

🇨🇦Canada adam-vessey PE, Canada

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

Comments & Activities

Production build 0.71.5 2024