Skip to content
Latchkey

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.

Symfony
In Application.php line 663:
  Command "make:migration" is not defined.

Did you mean one of these?
    doctrine:migrations:generate

Common 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.

Terminal
# locally, then commit the result
php bin/console make:migration

Install 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.

Terminal
composer install --no-interaction   # includes require-dev

How to prevent it

  • Treat MakerBundle as a local-only scaffolding tool; commit its output.
  • Use doctrine:migrations:* (not make:migration) in CI pipelines.
  • Keep dev-only bundles out of prod/test env maps unless needed.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →