irstea/ng-model-generator-bundle
A Symfony bundle that generates Angular/TypeScript model classes from Doctrine entities, helping keep frontend and backend data structures in sync. Automate model creation for API-driven Angular apps and reduce manual boilerplate.
Architecture fit. Poor as a direct dependency, because the package is a Symfony bundle rather than a Laravel package. It assumes Symfony kernel bootstrapping, config/bundles.php registration, DI service wiring, and — most importantly — API Platform's resource metadata layer (ResourceMetadataFactory, serializer metadata, Hydra/JSON-LD conventions). Laravel's container, console, and config primitives are only superficially similar, and there is no bundle abstraction to hook into. The realistic architectural stance for a TPM is "vendor the emitter logic or run it as a sidecar," not "install it." The package also does not exist on Packagist as a first-class dependency; it lives on IRSTEA's self-hosted GitLab, which raises availability, auth, and licensing questions before any code is written.
Integration feasibility. Conditionally feasible through one of three routes, none of which is composer require:
.ts files into the Angular repo as a CI artifact. The Laravel app stays untouched. This is the highest-fidelity use of the code as designed.api-platform/laravel metadata or directly from OpenAPI. Cleanest long-term ownership, highest initial effort.openapi-typescript, orval, or ng-openapi-gen against an OpenAPI export. Lower risk, community-backed, and the baseline any adoption case must beat.The dominant feasibility question is whether the API surface is genuinely API Platform. If it is hand-rolled Laravel (Eloquent API Resources, FormRequests), the bundle has no viable input — its entire value proposition is consuming API Platform metadata that does not exist.
Technical risk. Very high. Signals are uniformly weak: score 0, zero stars, zero dependents, French-language documentation, institutional self-hosted forge, no indicated Packagist presence. That profile describes an internal utility published for convenience, not a supported dependency. Specific risks: unknown licence terms (forking/redistribution must be confirmed before any work), no release tags or semver contract, unknown PHP/Symfony/Angular version constraints, no public issue tracker, likely single-maintainer bus factor, and French-language code and comments narrowing the pool of engineers who can debug it. With zero dependents there is no community to absorb breaking changes or answer questions.
Key questions for maintainers or due diligence:
strictTemplates?Stack fit. Laravel + Angular is a common pairing, so the underlying problem — TypeScript models drifting from backend contracts — is real and worth solving. But this package solves it for the Symfony + API Platform + Angular triangle. Fit is good only if the Laravel app already runs API Platform's Laravel integration (experimental, limited) or exposes a faithful OpenAPI document. Otherwise fit is nominal: same language, wrong framework. A TPM should treat the stack mismatch as a hard gate, not a caveat to work around.
Migration path. Do not plan to adopt this as a dependency. Plan one of:
openapi-typescript or orval driven from the OpenAPI export. This is the lower-risk default and should be the baseline the bundle is measured against.Compatibility. Unknown and must be established empirically: PHP floor, Symfony major, Angular version, and whether the emitted models assume class vs interface, readonly modifiers, or specific RxJS/Observable patterns. Validate against the target Angular and TypeScript compiler versions before any commitment.
Sequencing.
openapi-typescript. Compare enums, relations, nullability, and strict-mode compatibility.git diff --exit-code after regenerate) so schema changes surface in review rather than silently.Maintenance. Effectively zero upstream. Plan to fork on day one and carry the burden: PHP/Symfony security patches, Angular version bumps, TypeScript compiler upgrades. Treat this as an internal tool with an acquisition cost, not a dependency with a support contract. The sidecar route compounds this — you maintain a Symfony application solely to run a codegen step.
Support. No commercial support, no SLA, no public issue tracker, French-language codebase. Debugging failures requires internal expertise in Symfony bundle internals and API Platform metadata — a rare combination on a Laravel team. Assume no upstream triage, no release cadence, no deprecation policy.
Scaling. Build-time generator, so request-path scaling is a non-issue. Scaling concerns are organizational: as services, teams, and API resources multiply, the drift surface between metadata and generated TypeScript grows with them. The sidecar approach adds a deployable per environment; the OpenAPI route collapses this to a single CI step.
Failure modes.
readOnly mismatches producing runtime undefined in Angular.Ramp-up. High. Expect a senior polyglot engineer (PHP + TypeScript, comfortable in Symfony and Laravel) to spend one to two weeks on the spike, fork, and CI integration before the first reliable model set lands. Team-wide workflow ramp-up — regenerate, review the diff, never hand-edit — is a further half-day plus a written convention.
TPM verdict. Do not adopt this as a dependency on a Laravel stack. Evaluate it as a reference implementation for API-Platform-to-TypeScript mapping and default to an OpenAPI-driven generator, with this bundle's output used only as a comparison point in a timeboxed spike. If adopted at all, it must come with a named internal owner, a pinned commit SHA, and a documented exit path.
How can I help you explore Laravel packages today?