- Can I use m6web/monolog-extra-bundle in a Laravel application?
- No. It is a Symfony bundle, not a framework-agnostic library: it ships a bundle class, relies on Symfony's DI container tags such as monolog.processor, and boots against symfony/framework-bundle, symfony/http-kernel and symfony/dependency-injection. Installing it in a Laravel app pulls a second container and kernel into a codebase that has no reason to carry them, which is an architecture collision rather than a version-pin annoyance. Laravel's logging layer is already a thin wrapper over Monolog, so the functionality is reachable natively.
- What does m6web/monolog-extra-bundle actually do?
- It extends Monolog with reusable extras delivered through standard Symfony bundle configuration. The main pieces are prebuilt Monolog processors that enrich each record with request, session, user and correlation identifiers, plus a logger decorator for attaching business-specific extras. It is designed to sit alongside your existing channels, handlers and formatters so logging stays consistent without custom glue code per project.
- Does it support Monolog 3 and Laravel 11?
- Monolog 3 support has to be verified per branch from the package's own composer.json, not inferred from the release tag, because the supported matrix spans PHP versions, Symfony 5/6/7 and Monolog 1/2/3 across different branches. For Laravel 11 the question is largely moot: modern Laravel ships Monolog 3.x but you should not install this bundle at all in a Laravel-only estate. Confirm the exact tag and its constraints against the upstream repository before relying on any compatibility claim.
- How do I add request_id and user_id to every Laravel log line without this package?
- Register a Monolog processor through a custom channel's tap, or call Log::withContext() from middleware to attach request_id, user_id, route and tenant_id. Either approach is roughly 30 to 60 lines of application code, keeps your dependency surface at Monolog only, and avoids booting Symfony components. This is the recommended replacement for the bundle's core capability in a Laravel codebase.
- Is m6web/monolog-extra-bundle actively maintained and safe for production?
- Adoption signals are effectively zero: around 6 stars, 0 dependents and a composite score near 15 out of 100, which means no field-proven edge cases and no community security triage. Every defect becomes your defect, and the single-vendor origin implies bus-factor risk. There is also a metadata anomaly, with a last-release date of 2026-07-21, so treat provenance, tag authenticity and registry integrity as unverified until checked directly against the repository. MIT licensing removes legal exposure but not maintenance labor.
- Which Symfony and PHP versions does MonologExtraBundle support?
- Support is spread across branches covering Symfony 5, 6 and 7 alongside Monolog 1, 2 and 3, with PHP constraints varying by branch. You must read the composer.json of the exact branch or tag you intend to use instead of assuming the latest release tag matches your stack. Pin the tag explicitly and run a dependency resolution check in a scratch project before committing.
- Does MonologExtraBundle log sensitive user data or PII?
- By design, its processors attach session identifiers, user identities, IP addresses and request URIs to every record, which silently widens the blast radius of every log sink, including third-party shippers. That is a compliance concern that must be gated by retention and privacy policy rather than left to defaults. Check whether the branch you use offers processor-level redaction controls, and be aware that session-touching processors can force a session start in CLI, queue and console contexts.
- What should Laravel developers use instead of this bundle?
- Use Laravel's first-class equivalents: Log::withContext() for request and user context, channel-level tap to push Monolog processors, and custom formatters when you need a specific record shape. If you only need correlation IDs across services, a small middleware plus a processor is sufficient and testable. There is no need to bring in a Symfony bundle to standardize log context in Laravel.
- How do you install and register MonologExtraBundle in a Symfony application?
- Run composer require m6web/monolog-extra-bundle, then register the bundle in config/bundles.php for only the environments that need it. Tag processors explicitly with monolog.processor instead of relying on autoconfiguration, so you control exactly which handlers receive enriched records. This path is only viable where a Symfony application already exists and its Monolog major version has been confirmed against the package branch.
- Will composer require m6web/monolog-extra-bundle conflict with Laravel's existing dependencies?
- Expect conflicts. The requirement pulls symfony/framework-bundle, symfony/http-kernel and symfony/dependency-injection plus transitive Symfony components, which is a container-and-kernel collision rather than a simple version-pin nuisance. Do not attempt to force the install with constraint overrides, because even a successful resolution leaves two competing bootstrapping models in one application.