Skip to content
Latchkey

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.

Composer
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

  1. Add symfony/flex to config.allow-plugins.
  2. Commit composer.json so CI trusts the plugin non-interactively.
  3. Re-run composer install.
composer.json
{
  "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.

Terminal
composer install --prefer-dist --no-interaction --no-progress

How to prevent it

  • Keep symfony/flex in allow-plugins so it runs everywhere non-interactively.
  • Avoid --no-plugins in CI unless you deliberately want recipes skipped.
  • Commit recipe-generated config so the app does not depend on Flex at install time.

Frequently asked questions

What causes ""symfony/flex" has not run"?
Composer 2 requires plugins to be explicitly trusted. Without the allow entry, Flex is skipped in non-interactive CI and its recipes never run.
How do I fix "symfony/flex" has not run?
Allow the Flex plugin in composer.json

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card