- Can I use pugx/extravalidator-bundle in a Laravel application?
- No. pugx/extravalidator-bundle is a Symfony bundle that relies on Symfony Bundle registration, DI container tags like validator.constraint_validator, and the Symfony Validator component. Laravel uses illuminate/validation with Rule objects and closures, so there is no drop-in integration path. The practical option is to extract or reimplement the constraint logic as native Laravel rules.
- Is pugx/extravalidator-bundle still maintained?
- No. The package is marked DEPRECATED and the repository is archived, so it receives no security patches, PHP 8.x compatibility work, or Symfony 5/6/7 support. With 16 stars and zero dependents, there is also no active ecosystem signal. Treat it as reference material rather than a dependency.
- What additional validators does pugx/extravalidator-bundle provide?
- The bundle extends Symfony's Validator component with ready-to-use constraints for common real-world data, such as locale-specific identifiers and anti-spam checks. These rules were useful when older Symfony releases lacked native equivalents. You would need to inspect the constraint classes to confirm which specific validations your application needs.
- Does pugx/extravalidator-bundle support Laravel 10 or Laravel 11?
- No. The bundle targets Symfony 2.x and has no service provider, facade, or config-publish convention for Laravel. Its Symfony version constraints will conflict with modern Laravel and Symfony dependencies during Composer resolution. Do not expect it to work with Laravel 10 or 11 without a full rewrite.
- Why does composer require pugx/extravalidator-bundle fail in a Laravel project?
- Composer conflicts usually come from the bundle's pinned Symfony component versions and its expectation of Symfony Flex-era bundle wiring. Laravel's illuminate packages and modern Symfony LTS releases require version ranges the archived bundle does not satisfy. Forcing the install would pin transitive dependencies and propagate risk into your lockfile.
- How do I migrate pugx/extravalidator-bundle constraints to Laravel validation rules?
- Read each Symfony constraint class and identify the validate() logic, then reimplement it as an invokable Laravel Rule object under app/Rules or a small internal package. Port one rule at a time and add Pest or PHPUnit tests that cover valid, invalid, and edge-case inputs. This gives you first-class Laravel error messages and :attribute translation support without a second validation engine.
- Can I run Symfony Validator alongside Laravel's validator?
- Technically yes, but it means maintaining two validation engines, two error-message pipelines, and two translation domains in one application. That complexity is rarely justified for a handful of extra constraints. Porting the logic to Laravel Rule objects is simpler and keeps validation behavior consistent.
- What are the best alternatives to pugx/extravalidator-bundle for Laravel?
- Start with Laravel's native validation rules, then look at maintained rule packages such as laravel-validation-rules/* for common extras. Respect/Validation and standalone symfony/validator can cover more complex cases if you need them outside Laravel's validator. For small custom checks, writing your own Rule classes is usually the lowest-risk option.
- Is pugx/extravalidator-bundle safe to use in production?
- It is not a good production dependency. The repository is archived, has no security patch path, and shows effectively zero third-party usage, so edge cases and compatibility problems are unknown. If you need its logic, audit and port the constraint classes into code you control.
- How should I test validation rules ported from pugx/extravalidator-bundle?
- Use Pest or PHPUnit with Laravel's Validator::make to assert that each ported rule passes valid inputs and fails invalid ones with the expected message. Add data providers for locale-specific identifiers, checksum cases, and anti-spam edge cases from the original constraints. Also test :attribute replacement and translation output so the port behaves like a native Laravel rule.