- What is irstea/ng-model-generator-bundle used for?
- It is a Symfony bundle that reads Doctrine entity metadata and generates Angular/TypeScript model classes, so frontend interfaces stay aligned with backend entities. It is intended for Symfony projects exposing Doctrine entities to an Angular app, often through API Platform. It is not a Laravel package and does not generate models from Eloquent metadata.
- Can I install irstea/ng-model-generator-bundle in a Laravel app with Composer?
- Not as a normal Laravel dependency. The package is a Symfony bundle hosted on IRSTEA's GitLab, not a first-class Packagist package, and it assumes Symfony bundle registration, DI wiring, and API Platform metadata. Composer require may work only with a custom VCS repository and authentication, but the runtime integration will not fit Laravel's container or console. Treat it as a sidecar or fork candidate rather than a package to install.
- Does this package support Laravel 10 or Laravel 11?
- There is no indicated Laravel version support. It is built around Symfony kernel bootstrapping and API Platform resource metadata, not Laravel's service container or Eloquent. Laravel 10 or 11 compatibility would require forking or wrapping the emitter, not installing the bundle. Confirm supported PHP and Symfony versions with the maintainers before any work.
- What command generates TypeScript models from Doctrine entities?
- The bundle provides a console command for on-demand or scripted regeneration of TypeScript models. You configure the output directory and naming, then run the command when entity metadata changes. The exact command name and options are not in the provided excerpt, so check the bundle's console namespace after installation in a Symfony app.
- Does ng-model-generator-bundle require API Platform?
- The assessment says it most importantly assumes API Platform's resource metadata layer, including ResourceMetadataFactory, serializer metadata, and Hydra/JSON-LD conventions. That makes API Platform a de facto requirement for the bundle's intended value. If your Laravel API is hand-rolled with Eloquent API Resources or FormRequests, the bundle has no viable input. Ask maintainers whether an OpenAPI or JSON Schema input is supported.
- How does it map Doctrine relations and scalar fields to TypeScript?
- The overview says it handles relations and scalar field type mapping, generating typed models from Doctrine entity metadata. The exact mapping for enums, nullable fields, polymorphism, serializer groups, and Angular strict mode is not documented in the excerpt. Due diligence should confirm nullability, relation cardinality, and strictTemplates compatibility before relying on output.
- Can I use this bundle with Laravel API Resources or Eloquent models?
- Not directly. The bundle consumes Doctrine entity metadata and API Platform resource metadata; Eloquent models and Laravel API Resources do not provide that input. You could fork the emitter and drive it from an OpenAPI export or api-platform/laravel metadata, but that is custom work. For most Laravel apps, an OpenAPI-based generator is the lower-risk path.
- What are the alternatives for generating TypeScript models from a Laravel API?
- Use openapi-typescript, orval, or ng-openapi-gen against an OpenAPI export from your Laravel API. These are community-backed, work with Laravel OpenAPI tooling such as Scramble or L5-Swagger, and avoid a Symfony sidecar. Any adoption of ng-model-generator-bundle must beat that baseline on fidelity, maintenance, and operational cost. For Laravel and Angular, OpenAPI-first generation is usually the pragmatic choice.
- Is irstea/ng-model-generator-bundle maintained and safe for production?
- The assessment flags very high technical risk: zero stars, zero dependents, no Packagist presence, self-hosted GitLab, French-language docs, unknown release tags, and likely single-maintainer bus factor. Licence terms are unknown, so confirm fork and redistribution rights before use. For production, the realistic stance is sidecar generation or fork-and-own, not a direct dependency. Get a named owner and maintenance status from IRSTEA.
- How do I run ng-model-generator-bundle as a sidecar in CI?
- Stand up a minimal Symfony app containing the bundle, point it at the same API Platform metadata or an exported OpenAPI document, and emit .ts files into the Angular repo as a CI artifact. The Laravel app stays untouched, which preserves the bundle's highest-fidelity use as designed. Budget for a second deployable per environment and pin the Git commit because there are no known release tags. Verify licence and Symfony/PHP constraints first.