goetas-webservices/xsd2php-runtime
Runtime support for code generated by goetas-webservices/xsd2php. Provides the base classes and helpers needed to use PHP classes generated from XML Schema definitions, simplifying integration and serialization in PHP projects.
Architecture fit. This is a narrow infrastructure dependency, not a general Laravel feature package. It fits when the application must consume or produce XML governed by XSD schemas—SOAP integrations, B2B/EDI-style payloads, government/enterprise XML contracts, or legacy systems with published schemas. The runtime (now confirmed as goetas-webservices/xsd2php-runtime) supports generated PHP DTOs and JMS Serializer handlers, placing it at the integration boundary. It remains a poor fit for JSON-first Laravel applications, simple REST APIs, or domains without stable XSD contracts. TPM should keep generated schema objects out of core domain logic and map them through an anti-corruption adapter.
Integration feasibility. Feasible via Composer with PSR-4 autoloading. There is still no Laravel service provider expectation, so integration is manual: install the runtime, install/configure JMS Serializer, generate or import xsd2php-generated classes, register serializer handlers, and bind a serializer/adapter in the Laravel container. Release 0.2.18 (adds Symfony 8.0 support) is a positive compatibility signal but also narrows the negotiation surface: the package now spans Symfony 5.x–8.x, while a given Laravel version pins specific symfony/* component ranges. Feasibility gate remains version alignment across PHP, Laravel, Symfony components, JMS Serializer, the xsd2php generator, and this runtime. The generator should run in development/CI, not production.
Technical risk. Runtime code surface is small and the 0.2.18 changes are limited to the dependency constraint and CI coverage—no functional or API changes observed, so upgrade risk from 0.2.17 is essentially nil. Risk therefore stays concentrated in the ecosystem: JMS Serializer version conflicts, Symfony component range conflicts introduced or resolved by this release, generated-code drift when XSDs change, XML security concerns (XXE, entity expansion), namespace/prefix handling, and debugging complexity across generated classes. Maintainership signal is modest but improving: the repository is identifiable, has tagged releases, and now has CI running across PHP versions above 8.0 plus a new external contributor. That is a healthy sign for a small utility package, though the contributor pool remains concentrated. MIT licensing is favorable.
Key questions.
symfony/* pins?Stack fit. Use the package as a Laravel infrastructure adapter, not as a domain model layer. Place generated classes under a dedicated namespace such as App\Infrastructure\Xml\Generated or a separate internal package. Configure JMS Serializer handlers in a dedicated service, bind that service as a singleton in a service provider, and expose narrow application services such as SubmitClaimXml or ParsePartnerOrder. Map generated objects to domain DTOs/Eloquent models at the boundary.
Migration path. Start with one low-risk schema and one integration flow. Generate classes in a branch, pin the generator and runtime versions (0.2.18 is a safe pin; the bump from 0.2.17 is a patch-level constraint change), add fixture-based serialization/deserialization tests, and wrap the result behind an interface. Replace existing XML handling incrementally behind that interface rather than rewriting all integrations at once. Once the pilot proves schema generation, serializer configuration, error handling, and CI regeneration, expand schema by schema.
Compatibility. Validate a version matrix before commitment: PHP runtime, Laravel framework, Symfony component versions (directly affected by 0.2.18), JMS Serializer, xsd2php generator, and this runtime. Confirm PSR-4 autoloading, namespace conventions, Composer conflict behavior, and whether generated code targets the same runtime major version. Because this release is explicitly about widening the Symfony constraint, run composer why-not / dependency resolution against the actual Laravel lockfile rather than trusting the release headline. Check XML extension availability if the schemas require validation, and verify behavior on the target deployment image, not only local development.
Sequencing.
Maintenance. The primary maintenance burden is generated-code lifecycle management, not the runtime package itself. Every XSD change requires regeneration, review, tests, and deployment coordination. Pin runtime and generator versions, store schemas in version control, and document who owns regeneration. Runtime upgrades should be routine—0.2.18 is a CI/constraint release with no migration work implied—but must be tested with JMS Serializer and all generated classes.
Support. Community OSS under MIT with modest but visible adoption and an identifiable upstream repository. Release cadence is infrequent, the maintainer pool is small, and there is no implied SLA. TPM should assume internal ownership for integration defects and maintain a contingency plan: fork/vendor the runtime, replace JMS handlers, or isolate the adapter so it can be swapped. Budget for enablement because Laravel developers may not know XSD, JMS Serializer, or generated-code debugging.
Scaling. The runtime is lightweight and stateless, so horizontal scaling is not the concern. The risk is XML parsing and object hydration cost for large payloads, plus memory growth from generated object graphs. Load-test with realistic payload sizes, set request limits, and consider streaming or chunking for large documents. Cache serializer metadata where safe, but verify behavior under Octane or long-running workers. The new PHP 8.x CI coverage reduces (but does not eliminate) risk of runtime surprises on modern PHP in long-running workers.
Failure modes.
Mitigations include contract tests, schema version pinning, CI regeneration checks, explicit serializer configuration tests, XML security hardening, payload limits, and a rollback path that keeps the adapter interface stable.
Ramp-up. Expect moderate ramp-up for teams already comfortable with XML/XSD and JMS Serializer; higher for Laravel-only teams. The package itself is small, but the surrounding concepts—schema generation, serializer handlers, namespace mapping, and generated DTO debugging—require deliberate onboarding. Provide a reference implementation, fixture suite, and ownership model before scaling to multiple integrations.
How can I help you explore Laravel packages today?