composer install - Your requirements could not be resolved to an installable set of packages

composer install - Your requirements could not be resolved to an installable set of packages

  1. Blog
  2. 15 November 2026
  3. 3 min read

Stefan Bogdanescu

Founder & Senior Architect

composer install - Your requirements could not be resolved to an installable set of packages

When you run composer install and immediately hit a wall with the error "Your requirements could not be resolved to an installable set of packages," it is rarely a mystery bug in Composer itself. The error output provides a precise breakdown of why the resolution failed, but reading the stack trace can be overwhelming if you don't know what specific constraint caused the collision.

In the scenario provided, the root cause is explicitly stated in the first line of "Problem 1": your PHP version (7.0.22) does not satisfy that requirement.

The error logs show that several dependencies, such as symfony/event-dispatcher v4.0.1, require PHP ^7.1.3. This caret constraint means the package is compatible with any version greater than or equal to 7.1.3 but less than 8.0.0. Since your environment is running PHP 7.0.22, which predates even the latest stable releases of PHP 7.0, Composer cannot find a version of those packages that supports such an outdated runtime.

While you can technically modify the composer.json file to lower these requirements (e.g., changing "php": ">=5.6.4" to something older), this is generally a bad idea for modern Laravel projects. Packages like maatwebsite/excel, pusher/pusher-php-server, and symfony/http-kernel rely on features introduced in PHP 7.1 or later. Downgrading your lock file requirements only invites security vulnerabilities, missing bug fixes, and compatibility issues with future versions of the framework.

The most direct solution is to upgrade your PHP version. If you are running this on a production server using a control panel like cPanel or Plesk, the version might be stuck at 7.0 because it was installed long ago. In that case, you must manually update the PHP version in your hosting settings. Once the server is updated to PHP 7.1 or higher (preferably 7.4 or 8.x depending on your Laravel version), simply running composer install again will resolve the dependency chain automatically.

If you are unable to upgrade the PHP version immediately, there is a temporary workaround involving Composer's platform override feature. You can tell Composer to pretend that your system has a newer PHP version so it can proceed with the installation. This is useful for development environments where you cannot change the system PHP but need to test dependencies.

To apply this fix, run the following command:

composer install --platform-reqs="php/7.1"

However, this approach has significant limitations. It does not actually upgrade your runtime PHP; it only tricks Composer into ignoring the check during installation. If you are running unit tests or using tools that rely on native extensions (like OpenSSL or PCRE) which were updated in PHP 7.1, those scripts may fail at runtime even if Composer claims success. Therefore, this should be treated as a stopgap measure until the underlying environment is upgraded.

Another potential pitfall occurs when the composer.lock file exists but contains versions incompatible with your current PHP setup. If you cloned a repository from another developer or pulled code from a backup where PHP was newer, the lock file will reflect those stricter requirements. You can try regenerating this by deleting the vendor directory and the composer.lock file before running install again. Be aware that if you have modified any dependency versions manually in composer.json, regenerating the lock file might revert those changes to match the default repository constraints, potentially breaking custom configurations you intended to keep.

Finally, ensure that your composer.json does not explicitly restrict PHP versions for specific packages that are outdated. In the provided example, laravel/framework is locked at 5.4.*. Laravel 5.4 officially dropped support for PHP 7.0 in late 2016 and requires PHP 7.1 or higher for all subsequent patches. The package definitions on Packagist have likely been updated since then to reflect this, which explains why even the base framework is now demanding a newer PHP version than what is listed in your current composer.json. Updating your PHP version is the only sustainable path forward to ensure security and stability.

Our network