Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

nafeeur10's avatar

Can't install any package in Laravel 6 Application

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

  Problem 1
    - fzaninotto/faker is locked to version v1.9.2 and an update of this package was not requested.
    - fzaninotto/faker v1.9.2 requires php ^5.3.3 || ^7.0 -> your php version (8.0.9) does not satisfy that requirement.
  Problem 2
    - Root composer.json requires wulfheart/pretty_routes ^0.3.0 -> satisfiable by wulfheart/pretty_routes[0.3.0].
    - wulfheart/pretty_routes 0.3.0 requires illuminate/contracts ^8.0 -> found illuminate/contracts[v8.0.0, ..., v8.55.0] but these were not loaded, likely because it conflicts with another require.
  Problem 3
    - dompdf/dompdf v0.8.6 requires php ^7.1 -> your php version (8.0.9) does not satisfy that requirement.
    - barryvdh/laravel-dompdf v0.8.7 requires dompdf/dompdf ^0.8 -> satisfiable by dompdf/dompdf[v0.8.6].
    - barryvdh/laravel-dompdf is locked to version v0.8.7 and an update of this package was not requested.


Installation failed, reverting ./composer.json and ./composer.lock to their original content.

For all packages is error is giving. How can I solve this?

0 likes
2 replies
jlrdw's avatar

Always update composer and clear composer cache. This is normally caused by a dependency mismatch. So look into the composer.json file an ensure you have correct dependency numbers (versions).

Just suggestion.

Edit:

Also check composer.json and look at the line:

"require": {
        "php": "^7.2.5|^8.0",

If |^8.0" part is missing, put it in there.

2 likes
Snapey's avatar

Looks like you have a couple of packages locked at versions that are not PHP8 compatible. Try updating them individually first, or remove them and re-install.

If that does not work, you may need to switch to php7 then upgrade packages then switch to php8

Please or to participate in this conversation.