Skip to content
Latchkey

Symfony "requires ext-X" missing PHP extension in CI

composer or a Symfony component requires a PHP extension (intl, pdo_pgsql, gd, amqp) that is not enabled on the runner. The install or boot fails until you enable the extension, typically via setup-php.

What this error means

composer install fails with "Problem 1 ... requires ext-intl * but it is missing from your system", or the app throws a class-not-found for an extension's classes at boot.

Composer
Problem 1
  - Root composer.json requires PHP extension ext-intl * but it is missing from your system.
    Install or enable PHP's intl extension.

Common causes

The extension is not enabled on the runner PHP

setup-php installs a base PHP without every extension. Symfony features (intl for translation, pdo_pgsql for Postgres) need their extensions explicitly enabled.

The composer platform does not match the runtime

A config.platform override or a different local PHP hid the requirement, so it only appears on the CI runner.

How to fix it

Enable the required extensions in setup-php

  1. List the extensions your app needs (check composer.json require and your DB driver).
  2. Add them to the setup-php extensions input.
  3. Re-run install so composer sees the extensions present.
.github/workflows/ci.yml
- uses: shivammathur/setup-php@v2
  with:
    php-version: '8.3'
    extensions: intl, pdo_pgsql, gd, mbstring, xml

Verify what composer requires

Ask composer to report platform requirements so you enable exactly what is missing.

Terminal
composer check-platform-reqs

How to prevent it

  • Declare required ext-* in composer.json so gaps are explicit.
  • Enable those extensions in setup-php for every job.
  • Run composer check-platform-reqs in CI to catch missing extensions early.

Frequently asked questions

What causes ""the requested PHP extension ext-X is missing""?
setup-php installs a base PHP without every extension. Symfony features (intl for translation, pdo_pgsql for Postgres) need their extensions explicitly enabled.
How do I fix "the requested PHP extension ext-X is missing"?
Enable the required extensions in setup-php

Related guides

References

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