# Composer: Your requirements could not be resolved to an installable set of packages — how to fix it

> Your requirements could not be resolved to an installable set of packages means Composer found no set of versions that fits composer.json and the machine it runs on. The Problem lines under it name the cause: Root composer.json requires php ^8.3 but your php version (8.2.x) does not satisfy that requirement is a PHP version mismatch, it is missing from your system is a missing extension, and the rest are conflicting constraints. Match PHP versions, set config.platform.php, install the extension, or find the blocker with composer why-not.

Source: https://livops.dev/en/guides/error-composer-requirements-could-not-be-resolved

By Livops team, the people who build and run Livops. Updated 1 December 2026.

The error, from `composer update`, `composer require`, or `composer install` without a lock file (names and versions vary)[1][2]:

```text
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires php ^8.3 but your php version (8.2.29) does not satisfy that requirement.
  Problem 2
    - Root composer.json requires PHP extension ext-intl * but it is missing from your system. Install or enable PHP's intl extension.
```

When the requirement comes from a dependency rather than your own `composer.json`, the line names the package and puts the reason after an arrow[2][3]:

```text
    - acme/pdf-tools 2.1.0 requires ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.
```

And when `composer install` cannot use the lock file on this machine, the headline is a different one, with the same kind of Problem lines under it[1]:

```text
Your lock file does not contain a compatible set of packages. Please run composer update.
```

This page explains what Composer checks, how to read the Problem lines, the four causes from the most common, and how to check a project before you deploy it.

## What does the error mean?

Composer treats PHP itself, its extensions and some system libraries as **platform packages**: `php`, `ext-*` such as `ext-mbstring`, and `lib-*`. No code is installed for them; their versions come from the environment Composer runs in, and Composer cannot update or remove them[5]. A `"php": ">=7.4"` requirement is checked against the PHP that runs the `composer` command[5]. `composer show --platform` lists what your environment provides[5].

When no combination of package versions fits all requirements, Composer stops with `Your requirements could not be resolved to an installable set of packages.`[1] and numbers the reasons as Problem 1, Problem 2 and so on[4]. `install` with a `composer.lock` uses the exact versions in the lock instead of resolving them[6]; when those do not fit this machine, the headline is `Your lock file does not contain a compatible set of packages`[1].

| The Problem line says | Look at |
| --- | --- |
| `Root composer.json requires php … but your php version (…) does not satisfy that requirement` | Your PHP version (cause 1) |
| `<package> requires php … -> your php version (…) does not satisfy that requirement` | A lock or a package for a newer PHP (cause 2) |
| `… it is missing from your system. Install or enable PHP's … extension.` | A missing extension (cause 3) |
| `found … but it conflicts with …`, or `… but these were not loaded` | Conflicting constraints (cause 4) |

After an extension problem Composer adds a hint: the `.ini` files PHP loaded, `php --ini` to see which files the command-line PHP uses, and the `--ignore-platform-req=ext-…` option[4]. After a problem caused by the lock, it suggests `--with-all-dependencies (-W)`[4].

## Causes, most common first

### 1. The PHP that runs Composer is older than your composer.json asks for

Your laptop has PHP 8.4, the server or CI has 8.2, and `composer.json` says `"php": "^8.3"`. A new Laravel 13 app is exactly that: Laravel 13 requires PHP 8.3 or higher[10], and the skeleton's `composer.json` requires `"php": "^8.3"`[11].

**Fix:** run the PHP version the project asks for, where Composer runs and where the app runs. Check both sides:

```sh
php -v
composer show --platform
```

If the project really must run on the older PHP, lower `require.php` and update the packages that need the newer one (cause 4 shows how to find them).

### 2. composer.lock was resolved for a newer PHP

`composer update` on a laptop with PHP 8.4 can lock releases that require 8.4. The server's `composer install` then fails with the lock file headline, or with `<package> requires php >=8.4 -> your php version (8.2.29) does not satisfy that requirement`[3].

**Fix: tell Composer which PHP you deploy on.** `config.platform` fakes platform packages so you can emulate production: no package requiring more than that PHP can be installed, whatever PHP you run locally[7]. Set it to the server's exact version, then update the lock:

```json
{
  "config": {
    "platform": {
      "php": "8.2.29"
    }
  }
}
```

```sh
composer update
```

Use the full version: with `{"php": "7.4"}`, no package that needs 7.4.1 as a minimum is used[7]. The flip side is that dependencies are no longer checked against your real PHP: on a PHP older than the one you declared, packages install fine and then fail at run time[7]. That is why Composer recommends running `check-platform-reqs` as part of the deployment[7] (see below). At run time, the autoloader's platform check stops an app on the wrong PHP with a line such as `Your Composer dependencies require a PHP version ">= 8.3.0". You are running 8.2.29.`[8]; by default it checks the PHP version only, and `"platform-check": true` makes it check extensions too[7].

### 3. A PHP extension is missing

`ext-intl`, `ext-gd`, `ext-bcmath` and the like are required by your `composer.json` or by a package, and the PHP running Composer does not have them loaded. Laravel itself needs a list of extensions, among them Ctype, cURL, DOM, Fileinfo, Mbstring, OpenSSL, PDO, Tokenizer and XML[10].

**Fix:** install or enable the extension for the same PHP version that runs Composer and the app. `php -m` prints the loaded modules, and `php --ini` the configuration files the command-line PHP reads[9]:

```sh
php -m | grep -i intl
php --ini
```

`--ignore-platform-req=ext-foo` gets past it temporarily, but Composer's docs say to install required extensions in the long run: ignore one now, and a package added a month later that needs it can break production unnoticed[7]. The opposite case, an extension you have locally but production does not, is handled with `{"ext-foo": false}` in `config.platform`, which hides it from Composer[7].

### 4. Two requirements conflict

Two packages, or a package and your own `composer.json`, ask for versions that cannot both be installed. The Problem lines then say `found … but it conflicts with your root composer.json require` or `these were not loaded, likely because it conflicts with another require`[2].

**Fix: ask Composer what blocks it.** `composer why-not` (also `prohibits`) lists the packages that stop a given package and version from being installed, and works for platform packages too, for example to check whether the server can move to another PHP[6]:

```sh
composer why-not laravel/framework 13.0
composer why-not php 8.2
```

`-r` follows the chain up to your `composer.json`, and `-t` prints it as a tree[6]. Then loosen the constraint the output names, or let Composer move the locked dependencies too[6]:

```sh
composer update laravel/framework --with-all-dependencies
```

When a package's upper bound on PHP is the only obstacle, `--ignore-platform-req=php+` ignores just that bound: a package that requires `php: ^7` can then install on PHP 8, but still not on 5.6[6]. Use it knowing the package's authors have not said it works there.

## How to check before you deploy

Run these with the PHP version you deploy on. `check-platform-reqs` checks that your PHP and extensions match the requirements of the installed packages, and unlike `install` and `update` it ignores `config.platform` and checks the real ones; `--lock` reads the lock file and `--no-dev` skips dev requirements[6]. `validate` checks that `composer.json` is valid and that the lock is up to date with it[6].

```sh
composer validate
composer check-platform-reqs --lock --no-dev
```

## On Livops

- **PHP is detected.** Livops recognises Laravel and plain PHP projects and fills in their install, build and start commands; see [Frameworks and livops.json](https://livops.dev/en/docs/frameworks). Which PHP versions it runs, and how the version is taken from `composer.json`, is on [Laravel hosting](https://livops.dev/en/hosting/laravel-hosting).
- **Make the lock fit that PHP.** Set `config.platform.php` to the version the project runs on, run `composer update`, and commit `composer.lock`. Then the deploy installs what you tested.
- **When the install fails**, the build log has Composer's Problem lines, and the assistant's button next to the failed build reads the log and explains it. See [Install failed](https://livops.dev/en/docs/error-install) and [AI assistant](https://livops.dev/en/docs/assistant).
- **The install command is yours to change**, in **Settings → Install** or with `install` in `livops.json`. Do not make `--ignore-platform-reqs` permanent there: the error only moves to run time.
- **An extension that is not there.** If the repository has a `Dockerfile`, it is used, and in it you install what the project needs.

A PHP web app costs **39 credits a month**; a queue worker or a cron job **19**. When the install passes but PHP runs out of memory later: [Allowed memory size of 134217728 bytes exhausted](https://livops.dev/en/guides/error-php-allowed-memory-size-exhausted). The rest of a PHP deploy: [PHP hosting](https://livops.dev/en/hosting/php-hosting).

## Questions

**What does Root composer.json requires php but your php version does not satisfy that requirement mean?**

Your own composer.json asks for a PHP version, for example ^8.3, and the PHP that runs Composer is older, for example 8.2. Composer checks the requirement against the PHP running the command, so either run a newer PHP or change the requirement and the packages that need it.

**Why does it install on my laptop but fail on the server?**

The two run different PHP versions or have different extensions. composer.lock was resolved with the laptop's PHP, so it can hold releases that need a newer PHP than the server has. Compare php -v and php -m on both, or set config.platform.php to the server's version and update the lock.

**Should I use --ignore-platform-reqs?**

Only as a temporary step. It forces the installation even though the machine does not meet the requirements, so the failure moves to run time, where Composer's platform check or the code itself stops. Install the extension or match the PHP version instead.

**What does config.platform.php do?**

It tells Composer to resolve dependencies as if PHP were that version, whatever PHP you run. It does not change your PHP. Set it to the exact version your server runs, and run composer check-platform-reqs where the app runs, because that command checks the real PHP and extensions.

**How do I find which package blocks an upgrade or a PHP version?**

Run composer why-not with the package and the version, for example composer why-not php 8.2 or composer why-not laravel/framework 13.0. It lists the packages that block it. Add -r to follow the chain up to your composer.json.

**Which php.ini does Composer use?**

The one the command-line PHP loads, which can differ from the web server's. php --ini prints it and any extra .ini files, and Composer's own hint after an extension problem lists the same files.

**How do I fix it on Livops?**

Make composer.json and composer.lock fit the PHP version the project runs on, push, and deploy again. The build log shows Composer's Problem lines, and the assistant's button next to a failed build explains them.

## Sources

1. [Composer source — src/Composer/Installer.php](https://github.com/composer/composer/blob/main/src/Composer/Installer.php). Checked 1 December 2026.
2. [Composer source — src/Composer/DependencyResolver/Problem.php](https://github.com/composer/composer/blob/main/src/Composer/DependencyResolver/Problem.php). Checked 1 December 2026.
3. [Composer source — src/Composer/DependencyResolver/Rule.php](https://github.com/composer/composer/blob/main/src/Composer/DependencyResolver/Rule.php). Checked 1 December 2026.
4. [Composer source — src/Composer/DependencyResolver/SolverProblemsException.php](https://github.com/composer/composer/blob/main/src/Composer/DependencyResolver/SolverProblemsException.php). Checked 1 December 2026.
5. [Composer docs — Composer platform dependencies](https://getcomposer.org/doc/articles/composer-platform-dependencies.md). Checked 1 December 2026.
6. [Composer docs — Command-line interface](https://getcomposer.org/doc/03-cli.md). Checked 1 December 2026.
7. [Composer docs — Config (platform, platform-check)](https://getcomposer.org/doc/06-config.md). Checked 1 December 2026.
8. [Composer source — src/Composer/Autoload/AutoloadGenerator.php](https://github.com/composer/composer/blob/main/src/Composer/Autoload/AutoloadGenerator.php). Checked 1 December 2026.
9. [PHP manual — Command line options](https://www.php.net/manual/en/features.commandline.options.php). Checked 1 December 2026.
10. [Laravel docs — Deployment, server requirements (13.x, docs source)](https://github.com/laravel/docs/blob/13.x/deployment.md). Checked 1 December 2026.
11. [Laravel application skeleton — composer.json (13.x)](https://github.com/laravel/laravel/blob/13.x/composer.json). Checked 1 December 2026.
