Composer "the requested PHP extension X is missing" in CI
Packages declare platform requirements like ext-intl or ext-gd. Composer checks the running PHP for those extensions and refuses to install a set that needs one the system does not provide, naming the missing extension so you can enable it.
What this error means
composer install fails with "Root composer.json requires PHP extension ext-intl * but it is missing from your system" (or names a dependency requiring it). Enabling the extension in CI resolves it.
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 installed/enabled in the CI PHP build
The runner’s PHP lacks the extension a package requires, so the platform check fails.
A new dependency added a fresh extension requirement
An updated or added package now requires an extension the CI image never enabled.
How to fix it
Enable the extension in CI
Add the named extension to the PHP setup step so the platform check passes.
- uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: intl, gd, mbstring
- run: composer install --no-interactionInstall it directly if not using setup-php
Install and enable the extension package on the runner.
# Debian/Ubuntu
sudo apt-get update
sudo apt-get install -y php8.3-intl
composer install --no-interactionHow to prevent it
- List every required extension in the CI PHP setup so installs do not fail on a missing one.
- Keep the CI PHP extension set in sync with what your packages and code require.
- Avoid blanket --ignore-platform-reqs, which only hides a real missing extension.