- Is ismaambrosi/generator-bundle compatible with Laravel?
- No. It is a Symfony bundle built on Symfony's DependencyInjection component, SensioGeneratorBundle command base classes, Twig skeleton templates, and Doctrine MongoDB ODM. Laravel has no bundle, container extension, or kernel mechanism to host it, and nothing in the package lines up with Artisan, service providers, Eloquent, or Blade. Despite being described as a Laravel generator bundle in some listings, the actual code targets Symfony.
- Can I just composer require ismaambrosi/generator-bundle in my Laravel project?
- You can run the command, but you will not get a working integration. The v2.5.0 release pins the supported floor at Symfony 2.8 and 3.x, which implies a PHP 5.5.9 through 7.x dependency band that conflicts with the PHP 8.x requirements of modern Laravel versions. Even if Composer resolved, there is no service provider or command registration that Laravel would discover. The practical answer is that it is not installable as a Laravel dependency.
- What does this generator actually create — models, controllers, migrations?
- It scaffolds Symfony bundles, Doctrine MongoDB ODM documents, Symfony form types, controllers, and CRUD screens from an interactive CLI. The output is convention-based Symfony code that you then customize by hand. It does not produce Eloquent models, Laravel migrations, Artisan commands, or Blade views, so the artifacts are not reusable in a Laravel application.
- Does it support Laravel 10 or Laravel 11?
- No. The most recent release, v2.5.0, adds Symfony 3 support and nothing beyond it, and Symfony 3 itself reached end of life in November 2018 including the 3.4 LTS. There is no Laravel seam, no modernized generated output, and no upgrade path onto a current PHP runtime. It should not be treated as compatible with any Laravel version.
- Is the package still maintained, and does it have a passing test suite?
- The project has seen roughly two commits of substance in a decade, and v2.5.0 reads as a backlog cleanup rather than renewed maintenance. That release also includes a Travis-CI configuration tweak, which is a red flag because Travis-CI's open-source tier was wound down, so the 'supports Symfony 3' claim has no demonstrated green build behind it in the current era. There is no meaningful test suite or CI signal to rely on.
- Is generated code from this bundle safe to run in production?
- The generator runs only at development time, so it adds no runtime attack surface to your application. The real production risk is stale output: what it emits is annotation-era Doctrine MongoDB ODM documents and Symfony form types, with no PHP 8 attributes or typed properties. Code that looks canonical but encodes 2016 to 2017 conventions is the most expensive failure mode because it passes review as if it were intentional.
- How do you configure field mappings and customize the generated templates?
- In Symfony you configure field type mappings through the bundle configuration and override the Twig skeleton templates, typically under the SensioGeneratorBundle resources directory. None of that maps onto Laravel's config files or stub publishing. There is no Laravel-side configuration surface to adapt.
- Does it work with MongoDB in Laravel through mongodb/laravel-mongodb?
- No. The bundle generates Doctrine MongoDB ODM documents and annotations, which is a completely different ODM from the Eloquent-based driver used by mongodb/laravel-mongodb. The document classes, repositories, and mapping metadata it produces will not be understood by Laravel's MongoDB integration. You would be rewriting the output rather than reusing it.
- What PHP version does ismaambrosi/generator-bundle require?
- The supported runtime band is effectively PHP 5.5.9 through 7.x, inherited from its Symfony 2.8 and 3.x constraints. That is incompatible with PHP 8.x, which every currently supported Laravel release requires. There has been no modernization to typed properties, attributes, or newer language features.
- What should Laravel developers use instead of this bundle?
- Use Artisan's built-in generators such as make:model, make:controller, make:migration, make:request, and make:resource, combined with community scaffolding packages where you need more. If your real problem is fast CRUD, Artisan plus existing packages solves it today. If you specifically need MongoDB document scaffolding, writing your own custom stubs against mongodb/laravel-mongodb takes roughly one to two days and gives you output you control.