Can't install mpdf using composer in php 7.2.9 - php

I'm trying to install mpdf using composer command :
composer require mpdf/mpdf
but I am getting this error:
Problem 1
- Conclusion: don't install mpdf/mpdf v7.1.5
- Conclusion: don't install mpdf/mpdf v7.1.4
- Conclusion: don't install mpdf/mpdf v7.1.3
- Conclusion: don't install mpdf/mpdf v7.1.2
- Conclusion: don't install mpdf/mpdf v7.1.1
- Conclusion: remove setasign/fpdi v2.1.0
- Installation request for mpdf/mpdf ^7.1 -> satisfiable by mpdf/mpdf[v7.1.0, v7.1.1, v7.1.2, v7.1.3, v7.1.4, v7.1.5].
- Conclusion: don't install setasign/fpdi v2.1.0
- mpdf/mpdf v7.1.0 requires setasign/fpdi 1.6.* -> satisfiable by setasign/fpdi[1.6.0, 1.6.1, 1.6.2].
- Can only install one of: setasign/fpdi[1.6.0, v2.1.0].
- Can only install one of: setasign/fpdi[1.6.1, v2.1.0].
- Can only install one of: setasign/fpdi[1.6.2, v2.1.0].
- Installation request for setasign/fpdi (locked at v2.1.0) -> satisfiable by setasign/fpdi[v2.1.0].
Installation failed, reverting ./composer.json to its original content.
this is my composer.json
{
"lynx39/lara-pdf-merger": "1.0.*",
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.1.3",
"codedge/laravel-fpdf": "^1.2",
"crabbly/fpdf-laravel": "^1.0",
"cyber-duck/laravel-excel": "^1.2",
"dompdf/dompdf": "^0.8.2",
"fideloper/proxy": "^4.0",
"jurosh/pdf-merge": "^2.0",
"laravel/framework": "5.6.*",
"laravel/passport": "^7.0",
"laravel/tinker": "^1.0",
"maatwebsite/excel": "^3.0",
"mpdf/mpdf": "^7.1",
"paragonie/random_compat": "2.*",
"phpoffice/phpspreadsheet": "^1.4",
"phpoffice/phpword": "^0.15.0",
"rguedes/pdfmerger": "^1.0",
"setasign/fpdi-fpdf": "^2.0",
"tecnickcom/tc-lib-pdf": "dev-master"
},
"require-dev": {
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/" } }, "autoload-dev": { "psr-4": { "Tests\\": "tests/" } }, "extra": { "laravel": { "dont-discover": [ ] } }, "scripts": { "post-root-package-install": [ "#php-r\"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
Any solution??

mPDF 7.x is not compatible with setasign/fpdi in version 2.x - use version 1.6.
For setasign/fpdi 2.x upgrade to mPDF 8.x.

Related

I failed to install my laravel 8 app on live server with PHP 7.3

I tried to upload my laravel 8 app on remote server with ubuntu 18
and PHP 7.3.26-1+ubuntu18.04.1+deb.sury.org+1
but I got error running composer :
composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
No lock file found. Updating dependencies instead of installing from lock file. Use composer update over composer install if you do not have a lock file.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires unicodeveloper/laravel-emoji 1.0.* -> satisfiable by unicodeveloper/laravel-emoji[1.0.0].
- Conclusion: don't install laravel/framework v8.26.1 (conflict analysis result)
- unicodeveloper/laravel-emoji 1.0.0 requires illuminate/support 5.* -> satisfiable by illuminate/support[v5.0.0, ..., 5.8.x-dev].
- Only one of these can be installed: illuminate/support[dev-master, v5.0.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev], laravel/framework[v8.26.1, 8.x-dev]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
- Root composer.json requires laravel/framework ^8.26.1 -> satisfiable by laravel/framework[v8.26.1, 8.x-dev].
On my local server (also ubuntu 18 ) I have PHP 7.4.13
In composer.json of my project :
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"cviebrock/eloquent-sluggable": "^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"grimzy/laravel-mysql-spatial": "^5.0",
"guzzlehttp/guzzle": "^7.0.1",
"inacho/php-credit-card-validator": "^1.0",
"intervention/image": "^2.5",
"jenssegers/agent": "^2.6",
"laravel/fortify": "^1.7",
"laravel/framework": "^8.26.1",
"laravel/sanctum": "^2.8",
"laravel/tinker": "^2.5",
"laravelcollective/html": "^6.2",
"mews/purifier": "^3.3",
"mobiledetect/mobiledetectlib": "^2.8",
"pragmarx/countries-laravel": "^0.7.0",
"spatie/browsershot": "^3.41",
"spatie/geocoder": "^3.10",
"spatie/laravel-image-optimizer": "^1.6",
"spatie/laravel-permission": "^3.18",
"toin0u/geocoder-laravel": "^4.4",
"twilio/sdk": "^6.15",
"wboyz/laravel-enum": "^0.2.1",
"webpatser/laravel-uuid": "^3.0",
"unicodeveloper/laravel-emoji": "1.0.*",
"yajra/laravel-datatables-oracle": "^9.15"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^0.0.5",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"files": [
"app/library/helper.php"
],
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"post-update-cmd": [
"#php artisan cache:clear"
],
"post-install-cmd": [
"#php artisan cache:clear"
],
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover --ansi"
],
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate --ansi"
]
}
}
Is it issue of PHP 7.3/PHP 7.4 difference and how it can be fixed ?
Thanks!
Maybe you could use this package instead:
https://github.com/spatie/emoji
It requires php ^7.2|^8.0 so should work on both your environments.

composer get installation error for phpseclib

I am trying to install phpseclib in Laravel for RSA. I have tried following command.
composer require phpseclib/phpseclib
But I do get following error.
Using version ^2.0 for phpseclib/phpseclib
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
The requested package symfony/translation (locked at v4.4.7, required as 4.3.8) is satisfiable by symfony/translation[v4.4.7] but these conflict with your requirements or minimum-stability.
Problem 2
Conclusion: remove symfony/cache-contracts v2.0.1
Conclusion: don't install symfony/cache-contracts v2.0.1
don't install symfony/contracts v1.1.6|don't install symfony/cache-contracts v2.0.1
don't install symfony/contracts v1.1.7|don't install symfony/cache-contracts v2.0.1
don't install symfony/contracts v1.1.8|don't install symfony/cache-contracts v2.0.1
Installation request for symfony/cache-contracts (locked at v2.0.1) -> satisfiable by symfony/cache-contracts[v2.0.1].
Installation request for symfony/translation 4.3.8 -> satisfiable by symfony/translation[v4.3.8].
Conclusion: don't install symfony/translation-contracts v2.0.1|install symfony/contracts v1.1.6|install symfony/contracts v1.1.7|install symfony/contracts v1.1.8
Conclusion: remove symfony/translation-contracts v2.0.1|install symfony/contracts v1.1.6|install symfony/contracts v1.1.7|install symfony/contracts v1.1.8
symfony/translation v4.3.8 requires symfony/translation-contracts ^1.1.6 -> satisfiable by symfony/contracts[v1.1.6, v1.1.7, v1.1.8], symfony/translation-contracts[v1.1.6, v1.1.7, v1.1.9].
Can only install one of: symfony/translation-contracts[v1.1.6, v2.0.1].
Can only install one of: symfony/translation-contracts[v1.1.7, v2.0.1].
Can only install one of: symfony/translation-contracts[v1.1.9, v2.0.1].
Installation request for symfony/translation-contracts (locked at v2.0.1) -> satisfiable by symfony/translation-contracts[v2.0.1].
Installation failed, reverting ./composer.json to its original content.
Given below is the content of composer.json file.
"name": "laravel/laravel",
"type": "project",
"version": "v1.2.0",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2",
"ext-json": "*",
"berkayk/onesignal-laravel": "^1.0",
"doctrine/dbal": "~2.3",
"egulias/email-validator": "^2.1",
"fideloper/proxy": "^4.0",
"infyomlabs/coreui-templates": "6.0.x-dev",
"infyomlabs/laravel-generator": "6.0.x-dev",
"intervention/image": "^2.5",
"laminas/laminas-diactoros": "^2.2",
"laravel/framework": "^6.0",
"laravel/passport": "^7.5",
"laravel/socialite": "^4.3",
"laravel/telescope": "^2.1",
"laravel/tinker": "^1.0",
"laravelcollective/html": "^6.0",
"league/flysystem-aws-s3-v3": "^1.0",
"phpseclib/phpseclib": "^2.0",
"pusher/pusher-php-server": "~4.0",
"spatie/laravel-analytics": "^3.9",
"spatie/laravel-permission": "^3.2",
"symfony/translation": "4.3.8",
"yajra/laravel-datatables-oracle": "~9.0"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.2",
"barryvdh/laravel-ide-helper": "^2.6",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^8.0"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"files": ["app/helpers.php"],
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover --ansi"
],
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate --ansi"
]
}
I have tried for couple of hours to search solution on google and stack overflow but didn't get any success.
Are you sure the given error message is related to phpseclib/phpseclib? That package does not use any Symfony dependencies. And, according to the dependency list of laravel/passport, that library is already installed.
I would assume that you have installed another package in the meantime by adding it to composer.json manually. What happens if you call composer install - does it inform you that the installation is not possible, or that the lock file is out of sync?
You could resolve this by removing symfony/translation from your composer.json, run composer update, and try to reinstall this package afterwards. Because somehow symfony/translation-contracts got installed in v2.0.1 (which is only compatible with Symfony 4.4 or later), while your configuration explicitly tries to load symfony/translation from Symfony 4.3

Can't install backpack genreators.Laravel version 7.10

I have a freshly installed Laravel 7.10.* I want to install the Backpack composer require backpack/generators --dev but cannot install the generators. Here is the error.
Your requirements could not be resolved to an installable set of packages.
Problem 1
Installation request for laravel/framework (locked at v7.10.3, required ^7.0) -> satisfiable by laravel/framework[v7.10.3].
Installation request for backpack/generators ^3.0 -> satisfiable by backck/generators[3.0.0, v3.0.1, v3.x-dev].
Can only install one of: backpack/crud[4.1.x-dev, 4.0.61].
Can only install one of: backpack/crud[4.1.x-dev, 4.0.61].
Can only install one of: backpack/crud[4.1.x-dev, 4.0.61].
Conclusion: install backpack/crud 4.1.x-dev
Installation request for backpack/crud (locked at 4.0.61, required as 4.*) -> satisfiable by backpack/crud[4.0.61].`
Installation failed, reverting ./composer.json to its original content.
This is my composer.json
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5",
"backpack/crud": "4.0.*",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^1.0",
"guzzlehttp/guzzle": "^6.3",
"laravel/framework": "^7.0",
"laravel/tinker": "^2.0"
},
"require-dev": {
"facade/ignition": "^2.0",
"fzaninotto/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover --ansi"
],
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate --ansi"
]
}
}
The problem is that you locked the backpack/crud version as 4.0.*, but for the backpack/generators the satisfiable versions are these: 4.1.0, 4.1.1, 4.1.x-dev
So you should change this line in your composer.json:
"backpack/crud": "4.0.*",
to this:
"backpack/crud": "4.1.*",
then update the composer packages:
composer update
and finally install the generator package:
composer require backpack/generators --dev

composer require iatstuti/laravel-cascade-soft-deletes is not installing on laravel 5.8.35

When i am trying to install this package iatstuti/laravel-cascade-soft-deletes via the command
composer require iatstuti/laravel-cascade-soft-deletes . It is giving me this error
Problem 1
- Installation request for iatstuti/laravel-cascade-soft-deletes ^2.0 -> satisfiable by iatstuti/laravel-cascade-soft-deletes[2.0.0].
- Conclusion: remove laravel/framework v5.8.35
- Conclusion: don't install laravel/framework v5.8.35
- iatstuti/laravel-cascade-soft-deletes 2.0.0 requires illuminate/events ^6.0 -> satisfiable by illuminate/events[v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4].
- don't install illuminate/events v6.0.0|don't install laravel/framework v5.8.35
- don't install illuminate/events v6.0.1|don't install laravel/framework v5.8.35
- don't install illuminate/events v6.0.2|don't install laravel/framework v5.8.35
- don't install illuminate/events v6.0.3|don't install laravel/framework v5.8.35
- don't install illuminate/events v6.0.4|don't install laravel/framework v5.8.35
- Installation request for laravel/framework (locked at v5.8.35, required as 5.8.*) -> satisfiable by laravel/framework[v5.8.35].
can somebody please help me, what to do now? i am stuck, find solutions on net but nothing is working.
I want this package to use softdelete functionality on parent child concept in laravel.
Here is my composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.1.3",
"brian2694/laravel-toastr": "*",
"doctrine/dbal": "*",
"fideloper/proxy": "*",
"guzzlehttp/guzzle": "*",
"laravel/framework": "5.8.*",
"laravel/tinker": "*",
"laravelcollective/html": "*",
"maatwebsite/excel": "*",
"spatie/laravel-permission": "*",
"thestringler-laravel/manipulator": "*",
"barryvdh/laravel-cors": "*"
},
"require-dev": {
"filp/whoops": "*",
"fzaninotto/faker": "*",
"mockery/mockery": "*",
"phpunit/phpunit": "*",
"symfony/css-selector": "*",
"symfony/dom-crawler": "*"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories",
"app/Models"
],
"files": [
"app/Http/Helper/helper.php",
"app/Http/Helper/logActivities.php"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
}
}
The latest version of this package (2.0.0) is a Laravel 6 package. Version 1.5.0 seems to be the Laravel 5 package you want. Since you didn't specify a version to install, composer uses the latest version.
Install 1.5.0 via composer using
composer require iatstuti/laravel-cascade-soft-deletes "1.5.0"

Your requirements could not be resolved to an installable set of packages in laravel 5.7

Unable to install package from laravel 5.7
Using version ^0.8.4 for barryvdh/laravel-dompdf ./composer.json has been updated
Loading composer repositories with package information Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for laravel/passport == 7.2.1.0
-> satisfiable > by laravel/passport[v7.2.1].
- avored/ecommerce 2.0 requires laravel/passport 5.0.*
-> satisfiable by laravel/passport[5.0.x-dev].
- avored/ecommerce 2.0.1 requires laravel/passport 5.0.*
-> satisfiable by laravel/passport[5.0.x-dev].
- Conclusion: don't install laravel/passport 5.0.x-dev
- Installation request for avored/ecommerce 2.*
-> satisfiable by > avored/ecommerce[2.0, 2.0.1].
Installation failed, reverting ./composer.json to its original content.
My composer.json file:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.1.3",
"avored/ecommerce": "2.*",
"avored/module-installer": "1.*",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.7.*",
"laravel/passport": "^7.2",
"laravel/tinker": "^1.0",
"laravelcollective/html": "^5.7",
"unisharp/laravel-filemanager": "^1.8"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0",
"laravel/dusk": "^4.0"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
Delete to this in your composer.json file:
"require": {
"avored/ecommerce": "2.*",
}
Then update composer: composer update
This package(avored/ecommerce) is not compatible with Laravel 5.7
For testing purpose I have try this command(composer require avored/ecommerce) in Laravel 5.5, 5.6 and 5.7
It's worked only Laravel5.5, other 5.6 and 5.7 I also got the same error as yours.
There is a dependency conflict specified on the composer.json file, you are stating that you want "laravel/passport": "^7.2" or later, but as you can seee on the avored composer file it requieres laravel/passport 5.0 so downgrade your dependency requirement.
Also I'm pretty sure passport 5.x is compatible with Laravel 5.6 so you need to downgrade laravel to ^5.6 as well.
Change:
"laravel/framework": "5.7.*",
"laravel/passport": "^7.2",
with:
"laravel/framework": "5.6.*",
"laravel/passport": "^5.0",
And then execute composer update

Categories