Symfony "Command not found" for bin/console in CI
A bin/console subcommand is missing because the bundle that registers it is not installed (dev dependencies skipped), or that bundle is not enabled in the environment CI runs. The console only lists commands from loaded bundles.
What this error means
php bin/console <name> fails with "Command \"<name>\" is not defined." or "There are no commands defined in the \"...\" namespace.", commonly for maker or fixtures commands under APP_ENV=test.
In Application.php line 663:
Command "make:entity" is not defined.Common causes
The bundle is a dev dependency skipped in CI
MakerBundle and fixtures live in require-dev. A composer install --no-dev in CI omits them, so their commands do not exist.
The bundle is not enabled for this environment
Commands only register when their bundle is enabled for the current APP_ENV in config/bundles.php.
How to fix it
Install dev dependencies where the command lives
- Confirm the command's bundle is in
require-dev. - Install with dev dependencies for jobs that need it.
- List available commands to verify it now registers.
composer install --no-interaction
php bin/console listEnable the bundle for the environment
Ensure the bundle is enabled for the env CI uses in config/bundles.php.
// config/bundles.php
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],How to prevent it
- Install dev dependencies for jobs that run maker or fixtures commands.
- Keep bundle environment maps aligned with the commands each job needs.
- Run
bin/console listearly to confirm required commands exist.