xmlvalid/xmlvalid-laravel
A Laravel integration for XML validation that provides validation rules, a facade, and configuration helpers for checking XML documents against XSD schemas. It simplifies adding schema-aware XML checks to uploads, APIs, and form requests in Laravel applications.
path identifying where the business rule fired, so the product can render "line 4, element cbc:InvoiceTypeCode violates rule X" instead of a generic "invalid document" — the difference between a support ticket and a self-service fix.engine and sha256 are now part of the result contract, the roadmap can plan features that depend on provenance and reproducibility — audit trails ("which engine validated this document, and is this the exact artifact we validated?"), re-validation on engine upgrades, and deduplication/caching keyed on document hash. Those are expensive to retrofit; plan them now if they're on the horizon.XmlvalidFake now answers as the real API does, so tests can assert on path, sha256, and engine without network calls or fixture drift. That shortens the feedback loop on validation-dependent features and removes a class of "passes in CI, fails in staging" defects. Worth weighting if validation logic sits on a critical path.Adopt when:
path and rule-level reporting suggests this is the package's center of gravity.path, sha256, and engine, so validation-dependent tests can assert on the same fields production reads. This is a strong reason to prefer it over hand-rolled HTTP mocks.xmlvalid/xmlvalid-php 1.2+; v1.2.0 of this package requires it, since the result models are what actually read the new fields.Look elsewhere when:
DOMDocument::schemaValidate is free, synchronous, and dependency-free. This package is worth its weight only when business rules, structured error paths, or engine metadata are in scope.xmlvalid-php <1.2, resolve that before adopting.Migration note for the upgrade: v1.2.0 is additive at the contract level, so it should be a low-risk bump — but any test that asserted on the old fake's response shape (missing path, sha256, engine) is now asserting against a stricter object and may need its expectations updated. Budget a short pass over validation tests; treat the fake's response shape as a contract you own going forward.
For executives (one paragraph): We can ship XML validation as a real product capability — showing users exactly which rule failed and where — without building and maintaining a validation engine ourselves. The 1.2.0 release is a maturity signal: the vendor has made their testing layer match their production API, which means our automated tests now check the same fields our customers will see. That reduces the risk and cost of compliance-adjacent features (e-invoicing, document ingestion, regulatory submissions) and lets us add audit-grade traceability — which engine validated a document, and a hash of the exact document — when regulation or enterprise buyers ask for it. The main thing to manage is a dependency upgrade, not a re-architecture.
For engineering (the short version):
xmlvalid/xmlvalid-php; validation results are structured objects, and errors are now path-addressable.XmlvalidFake behave like the live API: path per error, sha256 and engine on the result. Use it in feature tests instead of HTTP fakes — assertions on error location and provenance now work offline.xmlvalid/xmlvalid-php ^1.2 — the models, not the wrapper, read the new fields. Bump both together and check for conflicting constraints.sha256 and engine are cheap to persist now and awkward to backfill later — decide early whether results are stored for audit and caching.How can I help you explore Laravel packages today?