Composer: requires ext-X * but It Is Missing from Your System in CI
Composer checks each package's platform requirements against the runner's PHP. When a package requires ext-something that is not loaded, the install aborts with "the requested PHP extension ext-X is missing from your system".
What this error means
Composer install/update fails listing one or more ext-* requirements as missing, e.g. "ext-soap" or "ext-bcmath". The same install succeeds locally where those extensions are enabled.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- acme/api 2.0.0 requires ext-soap * -> it is missing from your system.
Install or enable PHP's soap extension.Common causes
The required extension is not enabled on the runner
A package declares ext-X in its require block. If the runner PHP does not have that extension loaded, Composer refuses to install.
A transitive dependency added a new extension requirement
An upgraded dependency may newly require an extension, so a previously-green install starts failing on the missing ext-*.
How to fix it
Enable the extension in CI
Add the exact extension on setup-php so it is present before install.
- uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: soap, bcmathInstall it in a Docker image
apt-get update && apt-get install -y libxml2-dev
docker-php-ext-install soap bcmath
php -m | grep -E 'soap|bcmath'Find which package needs it
- Read the "Problem" block - it names the package and the
ext-*it requires. - Run
composer why-not php-soapstyle checks to trace the requirement. - Enable the extension rather than ignoring the platform requirement.
How to prevent it
- Mirror production extensions in CI via setup-php so installs match runtime.
- Run
composer check-platform-reqsto catch missing extensions early. - Avoid blanket
--ignore-platform-reqs; install the real extension instead.