composer install Doctrine/DBAL fails in Laravel 9 with PHP 8.2 - laravel

I got an error when trying to install doctrine/dbal in order to add timestamp type according to laravel doc in order to allow changing timestamp column in migration.
Here is the message
composer require doctrine/dbal
Using version ^3.6 for doctrine/dbal
./composer.json has been updated
Running composer update doctrine/dbal
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- nette/schema v1.2.2 requires php >=7.1 <8.2 -> your php version (8.2.2) does not satisfy that requirement.
- league/commonmark 2.3.5 requires league/config ^1.1.1 -> satisfiable by league/config[v1.1.1].
- laravel/framework v9.30.0 requires league/commonmark ^2.2 -> satisfiable by league/commonmark[2.3.5].
- league/config v1.1.1 requires nette/schema ^1.2 -> satisfiable by nette/schema[v1.2.2].
- laravel/framework is locked to version v9.30.0 and an update of this package was not requested.
How can I deal with that ? Installing nette/schema before ?

It's saying that a depency cannot be updated / installed with your PHP version. Pay special atention to this line:
- nette/schema v1.2.2 requires php >=7.1 <8.2 -> your php version (8.2.2) does not satisfy that requirement.
You have to check another nette/schema version that support PHP version 8.2.2 (your version) or downgrade PHP

Related

Composer package conflict when updating guzzlehttp

laravel version is 5.8, When I write this command in cmd,
composer require guzzlehttp/guzzle
I get the below problems:
Using version ^7.5 for guzzlehttp/guzzle
./composer.json has been updated
Running composer update guzzlehttp/guzzle
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 guzzlehttp/guzzle ^7.5, found guzzlehttp/guzzle[dev-master, 7.5.0, 7.5.x-dev] but these were not loaded, likely because it conflicts with another require.
Problem 2
- Root composer.json requires netflie/whatsapp-cloud-api ^1.3 -> satisfiable by netflie/whatsapp-cloud-api[1.3.0].
- netflie/whatsapp-cloud-api 1.3.0 requires guzzlehttp/guzzle ^7.0 -> found guzzlehttp/guzzle[dev-master, 7.0.0-beta.1, ..., 7.5.x-dev] but these were not loaded, likely because it conflicts with another require.
Problem 3
- php-http/guzzle6-adapter v1.1.1 requires guzzlehttp/guzzle ^6.0 -> found guzzlehttp/guzzle[6.0.0, ..., 6.5.x-dev] but it conflicts with your root composer.json require (^7.5).
- nexmo/laravel 1.1.2 requires nexmo/client ^1.0 -> satisfiable by nexmo/client[1.9.1].
- nexmo/client 1.9.1 requires php-http/guzzle6-adapter ^1.0 -> satisfiable by php-http/guzzle6-adapter[v1.1.1].
- nexmo/laravel is locked to version 1.1.2 and an update of this package was not requested.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require guzzlehttp/guzzle:*" to figure out if any version is installable, or "composer require guzzlehttp/guzzle:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
It's troublesome, and it seems like a catch22 situation and I cannot figure out the problem.

Why haven't install predis on laravel 8

According laravel manual https://laravel.com/docs/8.x/redis for install predis, need run: composer require predis/predis. When that command is running (for laravel 8) - appear next Error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- facade/ignition is locked to version 2.4.2 and an update of this package was not requested.
- facade/ignition 2.4.2 requires php ^7.2.5 -> your php version (8.0.0) does not satisfy that requirement.
Problem 2
- facade/ignition-contracts 1.0.1 requires php ^7.1 -> your php version (8.0.0) does not satisfy that requirement.
- nunomaduro/collision v4.3.0 requires facade/ignition-contracts ^1.0 -> satisfiable by facade/ignition-contracts[1.0.1].
- nunomaduro/collision is locked to version v4.3.0 and an update of this package was not requested.
In my composer.json: "php": "^7.2.5|^8.0",
What here is wrong))?
You need to update facade/ignition and nunomaduro/collision first to support PHP 8 in your project.
Running the following commands should update them accordingly.
composer require --dev facade/ignition nunomaduro/collision
composer require predis/predis
i run comand: composer require --dev facade/ignition nunomaduro/collision and have got new Error: Your requirements could not be resolved to an installable set of packages.
Problem 1
- facade/ignition[2.10.0, ..., 2.10.2] require facade/ignition-contracts ^1.0.2 -> found facade/ignition-contracts[1.0.2] but the package is fixed to 1.0.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- Root composer.json requires facade/ignition ^2.10 -> satisfiable by facade/ignition[2.10.0, 2.10.1, 2.10.2].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
I have new laravel 8 project (blog) && use new Vagrant Homestead (with all updates) && i use laravel 8 manual)) may be laravel developers is a little busy and is a little tired to give full instruction in manual). I think may be for Laravel8 Homestead allready is not suitable and need Docker and Sail... But project work (with the exception of predis) Now i use phpredis. May be will try use docker... As for Vagrant&&Homestead - https://laravel.com/docs/8.x/homestead#introduction i don't understand what is problem to use that technology .... god with they)...

Laravel composer require laravel/ui^2.4 also not working. 1.0 --dev not working too

I am using Laravel 8.0 version.
Problem 1
- facade/ignition is locked to version 2.4.1 and an update of this package was not requested.
- facade/ignition 2.4.1 requires php ^7.2.5 -> your php version (8; overridden via config.platform, actual: 7.2.34) does not satisfy that requirement.
Problem 2
- facade/ignition-contracts 1.0.1 requires php ^7.1 -> your php version (8; overridden via config.platform, actual: 7.2.34) does not satisfy that requirement.
- nunomaduro/collision v4.3.0 requires facade/ignition-contracts ^1.0 -> satisfiable by facade/ignition-contracts[1.0.1].
- nunomaduro/collision is locked to version v4.3.0 and an update of this package was not requested.
enter image description here
You need to pull in laravel/ui v 3.x version 2.x is not compatible with Laravel 8.x
https://github.com/laravel/ui
If you have a "laravel/ui": "^2.4" in your composer.json, remove it and run
composer update
And then pull in the package
composer require laravel/ui
Or you can just update the entry in composer.json to
"require": {
"laravel/ui": "^3.0"
}
And then run
composer update

Problem of Laravel Framework version for using the package mailjet/laravel-mailjet

I've a problem for using mailjet/laravel-mailjet, it seems a problem of versions.
I was using Laravel Framework 5.6.33 and i got
Can only install one of: laravel/framework[v5.6.39, 5.4.x-dev].
i've change my composer.json and now, i'm using Laravel Framework 5.6.39 but i've still the same problem
$ php artisan --version
Laravel Framework 5.6.39
There is the answer when i try to install mailjet/laravel-mailjet
$ composer require mailjet/laravel-mailjet
Using version ^1.1 for mailjet/laravel-mailjet
./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
- Can only install one of: laravel/framework[v5.6.39, 5.4.x-dev].
- Can only install one of: laravel/framework[5.4.x-dev, v5.6.39].
- Can only install one of: laravel/framework[5.4.x-dev, v5.6.39].
- mailjet/laravel-mailjet 1.1.0 requires laravel/framework 5.4.* -> satisfiable by laravel/framework[5.4.x-dev].
- Installation request for mailjet/laravel-mailjet ^1.1 -> satisfiable by mailjet/laravel-mailjet[1.1.0].
- Installation request for laravel/framework 5.6.39 -> satisfiable by laravel/framework[v5.6.39].
the 4th line explains it all.
mailjet/laravel-mailjet 1.1.0 requires laravel/framework 5.4.*
so, you can't use v5.6.39, only 5.4.*

intervention/image fail to download

When typed "composer require intervention/image", received the following error:
Problem 1
- doctrine/inflector v1.2.0 requires php ^7.0 -> your PHP version (5.5.38) does not satisfy that requirement.
- doctrine/inflector v1.2.0 requires php ^7.0 -> your PHP version (5.5.38) does not satisfy that requirement.
- Installation request for doctrine/inflector (installed at v1.2.0) -> satisfiable by doctrine/inflector[v1.2.0].
Any suggestions on how to solve this? Or other better ways to deal with image uploads?
Thanks!
Installation request for doctrine/inflector means intervention/image required doctrine/inflector so it have to be install.
But in order to install doctrine/inflector you need PHP version 7.0 and since you're on PHP version 5.5.38 this requirement failed and the installation can not continue.
You need to upgrade to PHP 7.0

Resources