Symfony MakerBundle missing / make commands unavailable in CI
MakerBundle ships in require-dev and only registers make:* commands when installed and enabled for dev. In CI that runs --no-dev (or an env where the bundle is off), those commands do not exist.
What this error means
A CI step calling bin/console make:entity or similar fails with "Command \"make:entity\" is not defined." even though it works locally.
In Application.php line 663:
Command "make:migration" is not defined.
Did you mean one of these?
doctrine:migrations:generateCommon causes
CI installed without dev dependencies
A composer install --no-dev for a lean build omits symfony/maker-bundle, so no make:* commands are registered.
MakerBundle is only enabled for dev, not the CI env
The bundle is mapped to dev in config/bundles.php; a job running APP_ENV=test or prod will not load it.
How to fix it
Do not run make commands in CI; generate output beforehand
Maker is a scaffolding tool for local development. Commit the generated entities and migrations rather than running make:* in CI.
# locally, then commit the result
php bin/console make:migrationInstall dev dependencies if a job truly needs Maker
For a job that must run a make command, install with dev dependencies and ensure the bundle is enabled for that env.
composer install --no-interaction # includes require-devHow to prevent it
- Treat MakerBundle as a local-only scaffolding tool; commit its output.
- Use
doctrine:migrations:*(notmake:migration) in CI pipelines. - Keep dev-only bundles out of prod/test env maps unless needed.