xmlvalid/xmlvalid-symfony
Symfony bundle for xmlvalid that validates XML documents against XSD schemas directly from your services, commands and pipelines. Configure it once and get clear validation errors without writing boilerplate.
Context & confidence note: this is the first assessment for this package. It is based solely on the v1.2.0 release notes; no composer.json, source, test suite, or prior integration data was supplied. Treat architecture claims below as inferred from naming conventions and should be confirmed against the repo.
Architecture fit
xmlvalid/xmlvalid-php SDK, exposing XmlvalidMockResponse — a fake that mimics the hosted/remote validation API's response shape inside the test suite.path (per-error location of the fired business rule), sha256 (content digest of the validated document), and engine (which validation engine/version produced the result). That elevates the package from "test convenience" to part of the audit-trail story.Integration feasibility
xmlvalid/xmlvalid-php 1.2 "whose models read them." That is a coordinated two-package bump, not an independent one. Composer constraints on both sides must be verified before scheduling.Technical risk
assertExactJson() or stored JSON snapshots will fail once path/sha256/engine appear. assertJson() and assertJsonStructure() are unaffected. Scope is discoverable in one test run.sha256 values or a hardcoded engine string can let tests pass while production behaves differently. This is the failure mode I would raise first with the maintainer.TypeError/undefined-property errors rather than a clean dependency conflict.readonly hydration, or array-shape assertions downstream.Key questions for the maintainer
engine configurable per fake (to simulate different engines/versions), or a fixed constant?sha256 derived from the submitted document bytes, or from the result payload? Determines whether it is usable for caching/idempotency or only for audit.sha256/engine present on success responses, or error responses only?Stack fit
Xmlvalid::fake()-style helper for tests, consumed inside standard Http::fake()/feature-test patterns.Migration path
xmlvalid/xmlvalid-php to ^1.2 and the Laravel wrapper to ^1.2 in the same commit — never one without the other.assertJsonStructure(); regenerate stored snapshots deliberately, reviewing the diff so new fields are intentional rather than blindly accepted.path is surfaced instead of discarded.sha256/engine to downstream systems (audit logs, support tooling).Compatibility
^1.0 on the core, which would allow an incompatible pairing to resolve. Tighten to ^1.2 if needed.readonly classes, OpenAPI-generated clients) are where breakage will appear.Sequencing
path for field-level error UX or sha256 for audit logging, so those features build on the final contract.composer.json and add a grouped Renovate/Dependabot rule so the two packages never drift.Maintenance
Support
path materially improves triage: a user-reported validation failure can now be routed to the exact business rule and document location instead of a generic "XML invalid." Expect a measurable drop in escalation time once support tooling renders it.sha256 and engine make audit disputes answerable — "this exact document, validated by this engine version, produced this result." Worth capturing in logs even before a formal requirement exists.Scaling
sha256 hints at content-addressable caching of validation results — the single largest available performance lever if validation volume grows. Flag as an opportunity to raise with the maintainer, not a capability we can assume today.Failure modes
| Mode | Symptom | Mitigation |
|---|---|---|
| Version skew | Mock emits fields core 1.1 cannot hydrate | Single-commit paired bump, tight constraints |
| Stale mock | Green tests, production validation differs | Contract test against live API schema |
| Exact-JSON assertions | Suite fails immediately after bump | Convert to structural assertions |
| Silent field loss | path/sha256 dropped by lenient deserialization |
Assert presence of new fields explicitly |
Hardcoded engine |
False confidence across engine versions | Confirm configurability (key question 1) |
Ramp-up
path locates it, and which engine produced it requires domain reading beyond the package docs.How can I help you explore Laravel packages today?