assoconnect/validator-bundle
Symfony bundle providing validators for common scalar values: email addresses, phone numbers, latitude and longitude, monetary amounts, timezones, and French RNA, SIREN, and SIRET identifiers.
Architecture fit — the premise needs correcting before anything else. assoconnect/validator-bundle is a Symfony bundle, not a Laravel package. It ships a Symfony DI extension, service definitions wired into symfony/validator, Constraint/ConstraintValidator implementations that depend on Symfony\Component\Validator, translation catalogues consumed by the Symfony translator (en/fr/es), and — per the release history — Doctrine ORM integration (EntityValidator, custom DBAL column types, DateTimeMicroSecondsType). It has no Illuminate\Validation service provider, no Rule objects, no Laravel translation integration. In a Laravel codebase this is a foreign runtime bolted alongside the framework's own validator, not a drop-in.
giggsey/libphonenumber-for-php for phone. The realistic TPM framing is selective code extraction, not dependency adoption.Integration feasibility. Composer install plus Symfony Flex auto-registration; manual service wiring if Flex is absent. Validators are stateless and DI-friendly, so blast radius is low — they can be introduced incrementally into form handlers, API request validation, or console import jobs without touching persistence. The real friction is the version gate, not the install: recent tags require PHP 8.3+, then PHP 8.4+ from v2.42.0, and Symfony 7 only from v2.39.0 (Symfony 6 and below dropped). Any Laravel shop on PHP 8.1–8.3 is excluded outright or pinned to a stale tag.
Technical risk.
IT9PE1-*). Effective bus factor of one or two maintainers. MIT limits the downside (you can fork) but a fork is a standing maintenance commitment.giggsey/libphonenumber-for-php jumped ^8.13 → ^9.0 inside a patch release (v2.42.2). Phone parsing semantics and metadata size moved under a non-major bump — the classic source of a silent production validation regression.Key questions.
Stack fit.
composer require assoconnect/validator-bundle, let Flex register the bundle, apply constraints as PHP attributes on DTOs/entities, and register the Doctrine types only if you want column-driven validation.App\Validation\Rules\* implementing Illuminate\Contracts\Validation\ValidationRule, preserving the MIT license header and upstream attribution. Phone is the one non-trivial port — it depends on libphonenumber-for-php, which is framework-agnostic and installs cleanly alongside Laravel.Migration path.
Compatibility.
assoconnect/php-quality-config.lang/ if localized validation errors are user-facing.Sequencing. Pilot (1 sprint) → one bounded domain (2–3 sprints) → general adoption or fork-and-vendor → upstream pin review at each PHP/Laravel upgrade cycle. Extract, don't wrap, on the Laravel side: a shim layer that reimplements Symfony constraint contracts is the highest-cost, lowest-value option.
Maintenance. Low code volume, low change frequency, but high version-chase cost. Pin exact versions in composer.json, subscribe to releases, and budget a review each PHP and framework major. Keep the fork path warm — a vendored copy under our namespace removes the upgrade treadmill entirely at the cost of losing upstream fixes (which are mostly new regional identifiers).
Support. No SLA, no vendor contract. GitHub issues on a 5-star repo mean best-effort, single-timezone response. For a compliance-adjacent use case (VAT numbers, business identifiers) that is a real consideration: if a validator is wrong, the fix timeline is ours, not theirs.
Scaling. Negligible runtime cost. Validators are pure functions over strings. The one footprint item is libphonenumber-for-php metadata (~tens of MB unminified); on PHP-FPM it is fine, on constrained container images check image size. No state, no cache invalidation, no external calls — this is the package's strongest operational property. Latency is microseconds; throughput scales linearly and never becomes a bottleneck.
Failure modes.
Ramp-up. Small — roughly 15 short classes and a doc directory. A mid-level engineer can read the relevant validators in half a day. Budget one to two days for the Laravel extraction path per constraint family, plus a day to re-establish the message catalogue and tests.
Recommendation. Adopt on Symfony if French/Benelux identifiers are in scope; consider it a credible convenience dependency. On Laravel, treat it as a source of MIT-licensed logic to extract, not a component to integrate — and make that decision explicitly rather than discovering it during implementation.
How can I help you explore Laravel packages today?