Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Xmlvalid Symfony Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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

  • The package appears to be a Laravel-facing test/consumer layer over the xmlvalid/xmlvalid-php SDK, exposing XmlvalidMockResponse — a fake that mimics the hosted/remote validation API's response shape inside the test suite.
  • Fits Laravel applications that validate XML against business rules: e-invoicing (FatturaPA, PEPPOL, Factur-X), EDI, regulatory or tax submissions, and any domain where "well-formed XML" is necessary but not sufficient.
  • The new payload is a response contract, not just a helper: 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

  • The change is additive at the wire level: three new fields, one of them nested per error. Low implementation cost on the consumer side.
  • The hard coupling is the version relationship. v1.2.0 explicitly requires 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.
  • The mock now claims fidelity to "the API as it does now," which means the package carries an implicit contract-testing obligation — if the remote API changes and the mock does not, tests stay green against a stale contract.

Technical risk

  • Assertion breakage (medium): any test using assertExactJson() or stored JSON snapshots will fail once path/sha256/engine appear. assertJson() and assertJsonStructure() are unaffected. Scope is discoverable in one test run.
  • Mock fidelity drift (medium-high, the real risk): a mock that emulates the API is only as good as its fixture generation. Auto-generated 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.
  • Version skew (medium): wrapper on 1.2 against core on 1.1 → the mock emits fields the SDK models do not hydrate, or the reverse; both surface as confusing test-time TypeError/undefined-property errors rather than a clean dependency conflict.
  • Core-model changes (unknown): "whose models read them" implies DTO/serialization changes in the core. Semver says 1.2 is non-breaking, but new model properties can still break strict constructors, readonly hydration, or array-shape assertions downstream.

Key questions for the maintainer

  1. Is engine configurable per fake (to simulate different engines/versions), or a fixed constant?
  2. Is sha256 derived from the submitted document bytes, or from the result payload? Determines whether it is usable for caching/idempotency or only for audit.
  3. Are sha256/engine present on success responses, or error responses only?
  4. Does core 1.2 add required model properties or change hydration defaults in a way that affects constructor call sites?
  5. Is there a schema or contract test that pins the mock's output to the live API's response?
  6. What is the supported matrix — PHP floor, Laravel 9/10/11/12, Pest/PHPUnit?

Integration Approach

Stack fit

  • Laravel + Composer, PHP 8.x. Expected integration is a service provider registering the validator binding plus a Xmlvalid::fake()-style helper for tests, consumed inside standard Http::fake()/feature-test patterns.
  • No runtime dependency on Laravel internals is implied, so it should coexist with existing HTTP-client fakes and test doubles without ordering constraints.

Migration path

  1. Branch: bump xmlvalid/xmlvalid-php to ^1.2 and the Laravel wrapper to ^1.2 in the same commit — never one without the other.
  2. Run the full suite; collect failures and classify into "exact-JSON/snapshot" vs "genuine behaviour."
  3. Relax exact-match assertions to assertJsonStructure(); regenerate stored snapshots deliberately, reviewing the diff so new fields are intentional rather than blindly accepted.
  4. Update any front-end or consumer code that renders error lists, so path is surfaced instead of discarded.
  5. Only then expose sha256/engine to downstream systems (audit logs, support tooling).

Compatibility

  • Confirm the wrapper's constraint is not a bare ^1.0 on the core, which would allow an incompatible pairing to resolve. Tighten to ^1.2 if needed.
  • Verify PHP floor and Laravel version constraints against the app; the notes do not state them.
  • Back-compat expectation: additive fields should be tolerated by lenient deserializers; strict ones (typed DTOs, readonly classes, OpenAPI-generated clients) are where breakage will appear.

Sequencing

  • This is a low-urgency, test-layer change with no production-path risk — safe to bundle into a routine dependency PR rather than a dedicated release.
  • Do it before any planned work that consumes path for field-level error UX or sha256 for audit logging, so those features build on the final contract.
  • Pin the paired versions in composer.json and add a grouped Renovate/Dependabot rule so the two packages never drift.

Operational Impact

Maintenance

  • Two packages in lockstep, permanently. A grouped dependency-update rule is the cheapest mitigation and should be treated as part of the integration, not a nice-to-have.
  • The mock's surface area grows with every API field, so each upstream release implies fixture and assertion upkeep. Budget a small recurring allowance rather than treating this as a one-time bump.

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

  • Validation is CPU-bound and, if the package calls a remote API, network-bound; the mock is test-only and does not affect runtime scaling.
  • The introduction of 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

  • Low for engineers writing tests against the fake — the API is a single mock class.
  • Moderate for the error model: understanding what a "business rule" error is, how path locates it, and which engine produced it requires domain reading beyond the package docs.
  • Highest cost sits with whoever owns the contract-testing discipline between mock and live API; that is a named-owner responsibility, not a diffuse one.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource