Symfony Flex not running during composer install in CI
Composer 2 blocks plugins unless allow-listed. If symfony/flex is not allowed, it silently does not run, so recipes that create config files and .env entries are never applied, leading to missing-config errors later in CI.
What this error means
composer install prints "symfony/flex ... plugin was skipped because it is not in allow-plugins", and later steps fail because recipe-provided config or env keys are absent.
symfony/flex contains a Composer plugin which is currently not in your allow-plugins config.
See https://getcomposer.org/allow-plugins
Do you trust "symfony/flex" to execute code ... [y,n,d,?]Common causes
Flex is not in composer allow-plugins
Composer 2 requires plugins to be explicitly trusted. Without the allow entry, Flex is skipped in non-interactive CI and its recipes never run.
Install runs with plugins disabled
A --no-plugins install (or a hardened CI setting) prevents Flex from executing, so recipe side effects are missing.
How to fix it
Allow the Flex plugin in composer.json
- Add
symfony/flextoconfig.allow-plugins. - Commit
composer.jsonso CI trusts the plugin non-interactively. - Re-run
composer install.
{
"config": {
"allow-plugins": {
"symfony/flex": true,
"symfony/runtime": true
}
}
}Do not disable plugins in the CI install
Install with plugins enabled so Flex can apply recipes; only skip dev dependencies if you intend to.
composer install --prefer-dist --no-interaction --no-progressHow to prevent it
- Keep
symfony/flexinallow-pluginsso it runs everywhere non-interactively. - Avoid
--no-pluginsin CI unless you deliberately want recipes skipped. - Commit recipe-generated config so the app does not depend on Flex at install time.