- What is gal-digital-gmbh/validation used for in Laravel?
- It is intended to extend Laravel's validator with reusable, testable rule objects so complex checks live in dedicated classes instead of long rule strings. The overview positions it for cleaner form requests and controllers, with translatable error messages and registration through a service provider. The technical assessment is narrower: it is only a fit where shared Symfony 6 constraints or cross-framework domain objects already exist, not for standard Laravel HTTP validation. Verify the actual API before planning adoption.
- How do I install gal-digital-gmbh/validation?
- Install it with Composer using composer require gal-digital-gmbh/validation and pin the version you have evaluated; the assessment recommends pinning exact 2.0.0. Confirm your PHP floor is 8.1 or higher and that your dependency graph can resolve symfony/validator 6.x. The package is low code volume, but you should run a Composer resolution spike against your target Laravel and Symfony versions first.
- Does gal-digital-gmbh/validation support Laravel 11 and Laravel 12?
- The package is described as Laravel-oriented, but 2.0.0 hard-requires Symfony 6, which raises the PHP floor to 8.1 and can conflict with projects resolving Symfony 7.x. That matters for teams moving Laravel 11 or 12 stacks onto newer Symfony components. There is no documented CI matrix in the provided assessment showing tested Laravel versions, so treat Laravel 11/12 support as unproven until you verify it in your own pipeline.
- Is this package a replacement for Laravel's native validator?
- No. The technical assessment says 2.0.0 adds no capability that closes the gap versus Laravel's native validator, and its fit is narrow: shared Symfony constraints, cross-framework domain objects, or imported Symfony validation metadata. It is not recommended for standard Laravel HTTP validation. Use native Laravel validation unless you specifically need Symfony constraint reuse.
- How do I register custom rules or a service provider?
- The overview says registration is simple through a service provider and that rules are drop-in custom rule classes compatible with Laravel's validator. However, the 2.0.0 assessment found no evidence of a Laravel service provider or a ConstraintViolationList-to-ValidationException mapping, so an internal adapter may be necessary. Check the package source and README for the actual registration path before relying on auto-discovery.
- Can I test these validation rules in isolation?
- The package is marketed as fully testable rule logic, and separating rules into classes can make unit testing easier. The 2.0.0 release uses final classes and native parameter types on methods such as validate and getMetadataFor, which breaks subclasses, decorators, and PHPUnit mocks of those types. Prefer testing through your own adapter interface or composition rather than mocking package classes.
- What are the breaking changes in version 2.0.0?
- The assessment describes 2.0.0 as a major version with final classes, stricter typing, and native parameter types that break subclasses, decorators, and mocks. It hard-requires Symfony 6 and raises the PHP floor to 8.1. There is no stated deprecation path or documented 1.x to 2.x upgrade guide in the provided materials, so treat it as breaking for existing 1.x usage and add parity tests before upgrading.
- What are the production risks of adopting this package?
- Risk is described as stale and breaking: a single release after a multi-year gap, no established release cadence, zero stars and zero dependents, and no named maintainer commitment. Final classes remove the subclass or fork escape hatch, and Symfony 6 pinning may block coexistence with Symfony 7 projects. If you adopt it, keep it behind an internal ValidationService interface, map violations to Laravel errors at the boundary, and document an exit plan.
- What alternatives should I consider for complex Laravel validation?
- For most Laravel applications, native rule objects, form requests, closures, and custom Rule classes cover complex validation without adding a Symfony dependency. If you need shared Symfony constraints, use the Symfony validator directly behind an adapter. If you need cross-framework domain validation, consider a dedicated domain validation layer rather than coupling controllers or form requests to this package.
- Is gal-digital-gmbh/validation actively maintained?
- The assessment says the package is not dead because 2.0.0 exists and the project uses PHPStan and PHP-CS-Fixer, but those signals are not security scanning or a support commitment. Adoption signals remain weak, and one release after a multi-year gap does not establish a cadence. Ask whether there is a 2.1+ roadmap, a named maintainer, and whether 1.x still receives security patches if you must stay on it.