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.
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
- List the extensions your app needs (check
composer.jsonrequire and your DB driver). - Add them to the setup-php
extensionsinput. - Re-run install so composer sees the extensions present.
- uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: intl, pdo_pgsql, gd, mbstring, xmlVerify what composer requires
Ask composer to report platform requirements so you enable exactly what is missing.
composer check-platform-reqsHow to prevent it
- Declare required
ext-*incomposer.jsonso gaps are explicit. - Enable those extensions in setup-php for every job.
- Run
composer check-platform-reqsin CI to catch missing extensions early.