- Is rezzza/model-violation-logger-bundle a Laravel package?
- No. Despite being listed among PHP packages, it is a Symfony bundle, as the Bundle suffix and the Rezzza vendor namespace indicate. It relies on the Symfony dependency injection container and bundle extension system, which Laravel does not have. There is no service provider, facade, or configuration path for Laravel, so it cannot be installed and used as-is in a Laravel application.
- What does ModelViolationLoggerBundle actually do?
- It hooks into the Symfony Validator component and captures the constraint violations raised against your models and entities. Instead of letting those failures disappear inside a form submission or API request, it forwards them to a PSR-3 logger such as Monolog. You get a persistent record of what was rejected, on which object and attribute, and why. The log level and message context are configurable.
- Can I install this package in a Laravel project with Composer?
- In practice, no. The last release was in January 2015, so its composer.json almost certainly pins PHP 5.x and Symfony 2.x constraints that will fail dependency resolution on any current runtime. Even if you forced the install, Laravel would never boot the bundle because it has no bundle registration mechanism. The package is a historical artifact rather than a usable dependency.
- Which Laravel or PHP versions does this bundle support?
- None for Laravel, since there is no integration at all. For PHP, the package predates PHP 7, PSR-4 consolidation, and the modern Symfony 3, 4, 5, 6 and 7 lines, so its declared constraints target the PHP 5.x era. You should assume it will not run on any supported PHP version without a rewrite.
- Is rezzza/model-violation-logger-bundle still maintained?
- No. The repository has been dormant since its 2015 release, with roughly four stars, zero dependents, and no CI, security response, or compatibility contract. There is no upstream maintainer to fix bugs or address vulnerabilities. Adopting it would mean owning a permanent fork whose only benefit is reusing around a hundred lines of legacy glue code.
- How do I log validation failures in Laravel without this package?
- Register a listener or subscriber on Illuminate\Validation\ValidationException, or override failedValidation inside a FormRequest, and emit a structured record to a dedicated channel. The record should include the model class, attribute name, rule name, message, and a request correlation identifier. Send it to a rotating file channel or a validation_violations table, and promote it to your observability pipeline only if volume justifies it. This is typically 50 to 150 lines of first-party code.
- What should a validation violation log record contain?
- The bundle's useful contribution is its log schema rather than its code, so copy the shape: model or entity class, the failing attribute, the rule that failed, the message, a timestamp, and a request correlation ID. Keep the payload structured so you can aggregate failures per field and per rule for input-contract drift detection. Add a redaction gate so only whitelisted fields such as attribute name and rule name are emitted.
- Does this bundle redact user-submitted values like emails or card numbers?
- Almost certainly not. A validation logger written in 2015 predates most modern PII and PCI logging guidance, and violation payloads commonly include the rejected value. Before borrowing any logic from it, audit what would land in your logs and whitelist only non-sensitive fields. Never log raw input values unless that data has been explicitly approved for retention.
- Can I use this bundle on Symfony instead of Laravel?
- Only on very old Symfony versions. A 2015 bundle will not survive Symfony 5, 6, or 7 because the container, extension, and Monolog handler APIs have all changed substantially. Even on a compatible legacy Symfony install, the better move is a small EventSubscriber on the validator event plus a PSR-3 logger. Reviving an abandoned bundle is not worth the maintenance burden.
- What are the alternatives for validation-failure observability in Laravel?
- The native listener approach on ValidationException is the primary alternative and covers most requirements. If you need user-facing error analytics, feed the same structured records into your existing analytics or observability stack such as Monolog handlers forwarding to Loki, CloudWatch, or Datadog. If you need audit logging, persist to a dedicated table instead of a log file. Each case is cheaper and safer than porting a Symfony bundle from 2015.