Fix "Your requirements could not be resolved to an installable set of packages" (Composer)
Your requirements could not be resolved to an installable set of packages.
- Root composer.json requires php ^8.3 but your php version (8.2.12) does not satisfy that requirement.
- laravel/framework[v12.0.0, ..., v12.40.0] require php ^8.2 -> your php version (8.1.27) does not satisfy that requirement.
- Root composer.json requires PHP extension ext-intl * but it is missing from your system. Install or enable PHP's intl extension.
- Your lock file does not contain a compatible set of packages. Please run composer update.
- Conclusion: don't install laravel/framework v12.0.0
Composer cannot find any combination of versions that meets every constraint: PHP version too old, missing ext-* extension, or two incompatible packages. Read the "Problem 1" lines, install the right PHP version or the requested extension, or update the blocking package with -W.
What this error means
Each package declares what it needs in its composer.json: a PHP version ("php": "^8.2"), extensions ("ext-intl": "*") and other packages with version constraints. Composer looks for a set of versions that satisfies everything at once, taking the platform into account, meaning the PHP and extensions of the machine running Composer. If none exists, it stops before touching vendor/ and lists each blocker under "Problem 1", "Problem 2"… The variant "Your lock file does not contain a compatible set of packages" shows up with composer install when composer.lock was created for another platform.
Common causes
- PHP version too old: the project or a dependency requires PHP 8.3 while the CLI uses 8.2, often because several PHP versions are installed (Herd, MAMP, XAMPP, Homebrew, system packages).
- Missing PHP extension:
ext-intl,ext-gd,ext-zip,ext-bcmathorext-sodiumis not installed or not enabled in the CLIphp.ini. - Incompatible constraints between packages: a library does not accept yet the new major version of Laravel or Symfony you are asking for.
- Lock file created on another platform:
composer.lockgenerated on a PHP 8.4 machine then installed on a PHP 8.2 server. - Minimum stability: the requested package only exists as a
devorbetaversion whileminimum-stabilityisstable.
Step-by-step fix
-
Read the "Problem" lines
Each problem says exactly what blocks: "requires php ^8.3 but your php version (8.2.12)", "requires PHP extension ext-intl", or two packages whose constraints contradict each other. Handle them in order.
-
Check the PHP used by Composer
composer --versionshows the version and path of the PHP it uses, which can differ from the web server’s.composer check-platform-reqslists each PHP and extension requirement with its status.composer --version php -v php -m composer check-platform-reqs -
Install the missing extension
The method depends on the OS. On Windows, find
php.iniwithphp --iniand remove the;in front of the extension line. Restart PHP-FPM or Apache afterwards for the web server.# Ubuntu / Debian (match your PHP version) sudo apt install php8.3-intl php8.3-zip php8.3-gd sudo systemctl restart php8.3-fpm # Windows: in php.ini extension=intl extension=zip # Check php -m | grep -i intl -
Unblock a conflict between packages
composer why-notexplains why a version cannot be installed. Then update the blocking package with its dependencies (-W), or wait for a compatible version.composer why-not laravel/framework ^12.0 composer update vendor/package --with-all-dependencies composer require vendor/package:^3.0 -W -
Align the lock file with the production platform
Declare the server’s PHP version in
config.platform: Composer will resolve versions for that PHP, even if your machine is newer. Then runcomposer updateand commit the newcomposer.lock.{ "require": { "php": "^8.3", "ext-intl": "*" }, "config": { "platform": { "php": "8.3.0" } } } -
--ignore-platform-reqs: only if you know the riskThis option pretends your PHP and extensions satisfy everything: the install succeeds, but the code can crash at runtime (missing function, unsupported syntax). It only makes sense if Composer runs in a different environment than the runtime (for example a Docker build image without extensions). Prefer the version that targets a single extension, then check the real environment.
composer install --ignore-platform-req=ext-intl # then, in the runtime environment composer check-platform-reqs
Did this fix work for you?
Confirm it in one click: it will rise for the next developers stuck on the same error.
Keep it from coming back
- Use the same PHP version locally, in CI and in production, and pin it in
config.platform.php. - Declare in
requirethe PHP version and everyext-*extension your code needs, so the error shows up at install time and not in production. - Commit
composer.lock, runcomposer install(notupdate) on deploy, and addcomposer check-platform-reqsto CI.
Frequently asked questions
Why does Composer see PHP 8.1 when php -v shows 8.3?
Composer may be using another PHP binary (alias, path in PATH, composer.bat script), or the project’s config.platform.php value forces an old version. composer --version and composer config platform show it.
What is the difference between composer install and composer update here?
install installs exactly what is in composer.lock and fails if it does not fit your platform. update recalculates versions from composer.json and rewrites the lock file.
Is it dangerous to use --ignore-platform-reqs?
Yes in production: you install code written for another PHP or that calls missing extensions, and errors will only show up at runtime. Fix the platform or config.platform instead.
Useful tools for this error
More PHP & Laravel errors
- Fix "419 Page Expired" in Laravel (CSRF token mismatch)
- Fix "Allowed memory size of 134217728 bytes exhausted" in PHP
- Fix "Target class [X] does not exist" and "Class not found" in Laravel
- Fix "SQLSTATE[HY000] [2002] Connection refused" in Laravel
- Fix "No application encryption key has been specified" in Laravel
- Fix "laravel.log could not be opened in append mode: Permission denied"
- Fix "Vite manifest not found at: public/build/manifest.json" in Laravel