Novice
Novice

Reputation: 393

Laravel after migrate problem with new version of PHP

Have problem with Laravel project after migrate to diferent server. Old server has PHP version 7.1.3 now im running at PHP 7.3.11.

But some packages cant be installed for example mpdf/mpdf

report log;

composer require mpdf/mpdf

Problem 1
- Conclusion: dont install mpdf/mpdf v 8.0.4
- Conclusion: dont install mpdf/mpdf v 8.0.3
- Conclusion: dont install mpdf/mpdf v 8.0.2
- Conclusion: dont install mpdf/mpdf v 8.0.1
- Conclusion: remove setasign/fpdi 1.6.2.
- Installation request for mpdf/mpdf ^8.0 -> satisfiable by mpdf/mpdf[v8.0.0, v8.0.1, v8.0.2, v8.0.3, v8.0.4].
- Conclusion: don't install setasign/fpdi 1.6.2
- mpdf/mpdf v8.0.0 requires setasign/fpdi ^2.1 -> satisfiable by setasign/fpdi[v2.1.0, v2.1.1, v2.2.0].
- Can only install one of: setasign/fpdi[v2.1.0, 1.6.2].
- Can only install one of: setasign/fpdi[v2.1.1, 1.6.2].
- Can only install one of: setasign/fpdi[v2.2.0, 1.6.2].
- Installation request for setasign/fpdi (locked at 1.6.2) -> satisfiable by setasign/fpdi[1.6.2].
Installation failed, reverting ./composer.json to its original content.


composer require mpdf/mpdf 7.0

[InvalidArgumentException]
Package mpdf/mpdf at version 7.0 has a PHP requirement incompatible with your PHP version (7.3.11)

composer.json:

"require": {
    "php": ">=7.1.3",
    "mpdf/mpdf": "^7.0",
    "alaouy/youtube": "^2.2",
    "anhskohbo/no-captcha": "3.*",
    "anlutro/l4-settings": "^0.4.6",
    "aws/aws-sdk-php-laravel": "~3.0",
    "components/jquery": "^3.3",
    "components/jqueryui": "^1.12",
    "danielstjules/stringy": "^3.1",
    "fideloper/proxy": "~4.0",
    "illuminate/support": "5.7.0",
    "hashids/hashids": "^3.0",
    "hazestudio/laravel-gopay-sdk": "^0.1.5",
    "intervention/image": "^2.3",
    "jenssegers/agent": "^2.5",
    "laracasts/presenter": "^0.2.1",
    "laravel/framework": "^5.7.0",
    "laravel/socialite": "^3.0",
    "laravelcollective/html": "^5.1",
    "league/fractal": "^0.16.0",
    "paragonie/random_compat": "~1.4",
    "predis/predis": "^1.1",
    "proengsoft/laravel-jsvalidation": "2.3.*",
    "tymon/jwt-auth": "1.0.0-rc.3",
    "webpatser/laravel-countries": "dev-master"
},

any ideas ?

Upvotes: 0

Views: 1897

Answers (2)

dbrumann
dbrumann

Reputation: 17166

mpdf 8.x is blocked by setasign/fpdi 1.6.2. You can run:

composer require "mpdf/mpdf":"^8.0" --update-with-dependencies

to ensure that other dependencies are automatically updated if needed. In some rare cases, when other root dependencies (the ones you define in your composer.json) need to be updated you can even use the option: --update-with-all-dependencies

Upvotes: 4

Krzysztof Szala
Krzysztof Szala

Reputation: 136

Try to update mpdf to version 7.1.7 (at least). mpdf 7.0 doesn't work with php 7.3.


PHP ≥ 5.6.0 and < 7.3.0.
PHP 7.3 is supported since mPDF v7.1.7
PHP mbstring (including mbregex, which needs to be explicitly enabled in some environments) and gd extensions have to be loaded.

https://mpdf.github.io/about-mpdf/requirements-v7.html

Upvotes: 4

Related Questions