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

Packagegenerator Laravel Package

wsdltophp/packagegenerator

wsdltophp/packagegenerator turns WSDL files and XML schemas into complete PHP packages, generating classes, models, and SOAP client code so you can integrate web services quickly without hand-writing repetitive boilerplate.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. PackageGenerator is a build-time code generator, not a runtime library. It consumes a WSDL/XSD set and emits a hierarchical PHP library — one Client class extending \SoapClient, a Struct class per complex type, Enum, ArrayType, and per-binding Service classes — plus its own composer.json if asked. That distinction drives everything else: it belongs in a scaffolding step or an internal artifact pipeline, not in require on a runtime application. For a Laravel estate whose integration surface is dominated by REST/JSON, this package is the pragmatic answer to a narrow but recurring problem: a mandatory SOAP counterparty (ERP, banking, shipping, government registry) that will not modernize.

Integration feasibility. High for a first spike, moderate for a durable pipeline. Installation as a dev dependency plus a one-line CLI invocation (--composer-name, --namespace, --src-dir, --dest-dir, --standalone, --no-tests) produces reviewable PHP in minutes, so the cost-to-first-signal is very low. The real feasibility question is not "can we generate" but "can we regenerate repeatedly and trust the diff," which requires committing to a deterministic generation command, pinned version, and a reviewed output directory.

Technical risk. Four risks dominate. (1) Runtime coupling to ext-soap — generated clients instantiate SoapClient, which parses the WSDL at construction unless you pin a local cached copy; a container image without ext-soap fails at class load, not at call time. (2) Regeneration churn — WSDL revisions produce wide, noisy diffs in generated structs; without discipline the generated tree becomes hand-patched and unreproducible. (3) Generator expressiveness — WSDL imports, xsd:any, restrictions, and choice groups map imperfectly to PHP types, so some messages require manual marshalling at the boundary; scope this per-service, not globally. (4) Bus factor — 434 stars and zero listed dependents is a thin adoption signal for a component that would sit on a revenue-critical path; treat the maintainer and release cadence (note the forward-dated 2026-03-17 release) as something to verify rather than assume.

Key questions. Which counterparties are in scope, and how frequently do their WSDLs actually change? Is ext-soap already in every target image, including local dev and CI? Do we need WS-Security, MTOM/attachments, or custom headers that the generator does not emit? Will generated code live in the repo, be published as a private Composer package, or be built into a deploy artifact? Which PHP versions must the generated library support, and does that match the app matrix? Is there a sandbox endpoint for contract tests before go-live?

Integration Approach

Stack fit. Laravel ships no first-class SOAP support, so this fills a genuine gap. The idiomatic placement is: generate into app/Soap/{Vendor}/ (or a separate packages/soap-{vendor} path repository), keep the generated namespace PSR-4 autoloaded, and never call the generated Client directly from controllers or jobs. Instead wrap it in a thin adapter — a {Vendor}Gateway class implementing a small domain interface — bound in a service provider, configured from config/services.php with endpoint URL, credentials, timeouts, and a local WSDL path. The generated code stays a mechanical translation of the contract; the adapter carries the business semantics, retries, and error translation.

Migration path. If the team currently hand-writes SoapClient subclasses with ad-hoc arrays, the migration is incremental and low-risk: generate for one service, diff the generated structs against the hand-rolled payload shapes, and replace the hand-rolled client only once parity is proven by contract tests against the counterparty's sandbox. If there is no existing SOAP usage, treat this as a greenfield build with a spike gate — one WSDL, one read-only operation, end to end — before committing to multiple services.

Compatibility. Verify PHP version support against the app matrix, confirm ext-soap and ext-dom/ext-libxml in the base image, and check that the generated code's namespace and autoload map do not collide with application namespaces. Regeneration should run from a script (composer soap:generate) rather than a developer's shell history, and the generated library should be built against a committed WSDL snapshot so builds are reproducible offline.

Sequencing. (1) Spike: generate one client into a scratch directory, review output volume and type fidelity. (2) Commit the WSDL snapshot and generation script; add a CI step that regenerates and fails on diff. (3) Build the adapter layer, config binding, and error translation (SOAP faults → domain exceptions). (4) Add contract tests against the sandbox plus a local WSDL cache to remove per-request parse cost. (5) Only then onboard additional counterparties, reusing the pipeline.

Operational Impact

Maintenance. The generated tree must be treated as derived, never hand-edited — enforced by a header note, a CODEOWNERS entry, and the CI regeneration check. Budget for periodic regeneration when the counterparty ships a WSDL change, and keep a changelog mapping WSDL versions to releases. Pinning the generator version is mandatory; floating to latest will silently reshape the generated API.

Support. Support burden concentrates where the generator ends: complex types that map poorly, authentication schemes, and unexpected SOAP faults. Expect the team to own those, not upstream. Given the thin adoption signal, assume limited community answers and plan for reading generated code directly during incidents; an internal short README documenting "how this was generated and how to regenerate" is the highest-leverage operational artifact here.

Scaling. SOAP is synchronous and blocking, which makes it a poor fit for request-path calls at volume. Move calls into queued jobs with explicit timeouts, cap concurrency per counterparty, and cache the parsed WSDL locally to avoid re-fetching on every client construction. Large WSDL surfaces generate many classes, so watch autoloader and memory footprints; Composer's classmap authoring and opcache mitigate this but should be measured, not assumed.

Failure modes. Counterparty WSDL unreachable at runtime (client construction throws before any call); SOAP fault returned as a normal HTTP 200 with a fault body, silently mis-parsed by naive error handling; request timeouts with no built-in retry semantics; schema drift where the live service no longer matches the committed WSDL; and malformed payloads from incomplete xsd:any handling. Each needs an explicit guard in the adapter, plus a health check that validates the committed WSDL against the live endpoint.

Ramp-up. A mid-level Laravel developer can run the generator and call a simple operation in a day, but productive ownership — understanding struct marshalling, fault handling, and the regeneration workflow — is roughly one sprint for one engineer, plus half a sprint per additional counterparty once the pipeline exists. Front-load that cost on the first integration; it amortizes well across the second and third.

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.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route