2

I am running on PHP v 7.4 after an upgrade from the 7.1 version I am having issues on install mpdf v8.0.4 since its compatible with php 7.4 version

The error facing after ruuning composer update

 mpdf/mpdf[v7.0.0-beta1, ..., v7.0.0-beta2] require php ^5.6 || ~7.0.0 || ~7.1.0 -> your php version (7.4.19) does not satisfy that requirement.

running these two commands turns unsuccessfully

composer require mpdf/mpdf v8.0.4
composer require mpdf/mpdf dev-php7-support 
Toots
  • 47
  • 3
  • 12
  • how about updating your `composer.json` manually and then running `composer update` ? – apokryfos Jul 07 '22 at 16:44
  • what to update in the composer.json file? – Toots Jul 07 '22 at 16:46
  • You should have `"mpdf/mpdf": "^7"` or something in there right now you can change the `^7` to `^8` – apokryfos Jul 07 '22 at 16:49
  • when i tried to run this command: "composer require mpdf/mpdf: ^8 i got an error - Invalid arguments - Could not find package 8 – Toots Jul 07 '22 at 17:26
  • Try modifying your composer.json file – apokryfos Jul 07 '22 at 17:33
  • like what exactly to change and update – Toots Jul 07 '22 at 18:03
  • Open your `composer.json` file. Search for the line that says `"mpdf/mpdf": "^7"` or something like that and change the "^7..." part to "^8" – apokryfos Jul 07 '22 at 18:16
  • 1
    Regarding the error message _"Invalid arguments - Could not find package 8"_: You're running the composer command on a Windows command prompt. `^` is an **escape character**, a meta-character, there (compare Q&A [_Using composer require without quotes_](https://stackoverflow.com/q/72877159/367456) for more info and alternatives, check the comments there): `composer require "mpdf/mpdf" "^8"` (or leave the version constraint out: `composer require "mpdf/mpdf"` and composer should find the fitting version). – hakre Jul 07 '22 at 22:30

0 Answers0