downgrade mockery from laravel - laravel

I have laravel 7.20.0 which require php > 7.2.5. I have CentOS8 with php 7.2.24.
My problem is that when i run:
composer install
i receive followed problem:
- mockery/mockery 1.4.1 requires php ^7.3 || ^8.0 -> your PHP version (7.2.24) does not satisfy that requirement.
- Installation request for mockery/mockery 1.4.1 -> satisfiable by mockery/mockery[1.4.1].
Is it possible just to downgrade mockery?
Thanks in advance

Related

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

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

jenssegers/mongodb dependecies issues with Laravel Sail - ext-mongodb

I'm trying to setup MongoDB in a Laravel Jetstream + Sail.
What I'm doing is trying to install the following packages:
mongodb/mongodb
jenssegers/mongodb
but I get the following errors :
Problem 1
- jenssegers/mongodb[v3.8.0, ..., v3.8.2] require mongodb/mongodb ^1.6 -> satisfiable by mongodb/mongodb[1.6.0, ..., 1.9.x-dev (alias of dev-master)].
- mongodb/mongodb 1.9.x-dev is an alias of mongodb/mongodb dev-master and thus requires it to be installed too.
- mongodb/mongodb dev-master requires ext-mongodb ^1.10.0 -> it is missing from your system. Install or enable PHP's mongodb extension.
- mongodb/mongodb[1.6.0, ..., v1.6.x-dev] require php ^5.6 || ^7.0 -> your php version (8.0.2) does not satisfy that requirement.
- mongodb/mongodb[1.7.0-beta1, ..., v1.7.x-dev] require php ^7.0 -> your php version (8.0.2) does not satisfy that requirement.
- mongodb/mongodb[1.8.0-RC1, ..., v1.8.x-dev] require ext-mongodb ^1.8.1 -> it is missing from your system. Install or enable PHP's mongodb extension.
- Root composer.json requires jenssegers/mongodb ^3.8 -> satisfiable by jenssegers/mongodb[v3.8.0, v3.8.1, v3.8.2].
like suggested in this: Why does composer complain about the ext-mongo extension?
I added to my composer.json the following
"provide" : {
"ext-mongo": "*"
},
But nothing changed, I also tried adding the package:
"soyuka/stubs-mongodb": "^1.0",
But same problems.
Thanks
Mauro
The solution was to publish Sail docker files and add:
php8.0-mongodb
in /docker/8.0/DockerFile
Building and running:
sail composer require jenssegers/mongodb

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

I can't install laravel 6 even my php is 7.2

I working on my local computer(server). This is first time to install Laravel 6. By typing this command,
Laravel new project
The said
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- This package requires php ^7.2 but your HHVM version does not satisfy that requirement.
Problem 2
- Installation request for doctrine/lexer 1.2.0 -> satisfiable by doctrine/lexer[1.2.0].
- doctrine/lexer 1.2.0 requires php ^7.2 -> your PHP version (7.1.26) does not satisfy that requirement.
Problem 3
- Installation request for laravel/framework v6.14.0 -> satisfiable by laravel/framework[v6.14.0].
- laravel/framework v6.14.0 requires php ^7.2 -> your PHP version (7.1.26) does not satisfy that requirement.
Problem 4
- Installation request for laravel/tinker v2.2.0 -> satisfiable by laravel/tinker[v2.2.0].
- laravel/tinker v2.2.0 requires php ^7.2 -> your PHP version (7.1.26) does not satisfy that requirement.
Problem 5
- Installation request for monolog/monolog 2.0.2 -> satisfiable by monolog/monolog[2.0.2].
- monolog/monolog 2.0.2 requires php ^7.2 -> your PHP version (7.1.26) does not satisfy that requirement.
Problem 6
- Installation request for symfony/css-selector v5.0.4 -> satisfiable by symfony/css-selector[v5.0.4].
- symfony/css-selector v5.0.4 requires php ^7.2.5 -> your PHP version (7.1.26) does not satisfy that requirement.
Problem 7
- Installation request for symfony/mime v5.0.4 -> satisfiable by symfony/mime[v5.0.4].
- symfony/mime v5.0.4 requires php ^7.2.5 -> your PHP version (7.1.26) does not satisfy that requirement.
Problem 8
- Installation request for symfony/service-contracts v2.0.1 -> satisfiable by symfony/service-contracts[v2.0.1].
- symfony/service-contracts v2.0.1 requires php ^7.2.5 -> your PHP version (7.1.26) does not satisfy that requirement.
Problem 9
- Installation request for symfony/translation-contracts v2.0.1 -> satisfiable by symfony/translation-contracts[v2.0.1].
- symfony/translation-contracts v2.0.1 requires php ^7.2.5 -> your PHP version (7.1.26) does not satisfy that requirement.
Problem 10
- Installation request for phpdocumentor/reflection-docblock 5.0.0 -> satisfiable by phpdocumentor/reflection-docblock[5.0.0].
- phpdocumentor/reflection-docblock 5.0.0 requires php ^7.2 -> your PHP version (7.1.26) does not satisfy that requirement.
Problem 11
- Installation request for phpunit/php-code-coverage 7.0.10 -> satisfiable by phpunit/php-code-coverage[7.0.10].
- phpunit/php-code-coverage 7.0.10 requires php ^7.2 -> your PHP version (7.1.26) does not satisfy that requirement.
Problem 12
- Installation request for phpunit/phpunit 8.5.2 -> satisfiable by phpunit/phpunit[8.5.2].
- phpunit/phpunit 8.5.2 requires php ^7.2 -> your PHP version (7.1.26) does not satisfy that requirement.
Problem 13
- Installation request for sebastian/global-state 3.0.0 -> satisfiable by sebastian/global-state[3.0.0].
- sebastian/global-state 3.0.0 requires php ^7.2 -> your PHP version (7.1.26) does not satisfy that requirement.
Problem 14
- Installation request for sebastian/type 1.1.3 -> satisfiable by sebastian/type[1.1.3].
- sebastian/type 1.1.3 requires php ^7.2 -> your PHP version (7.1.26) does not satisfy that requirement.
Problem 15
- doctrine/lexer 1.2.0 requires php ^7.2 -> your PHP version (7.1.26) does not satisfy that requirement.
- egulias/email-validator 2.1.15 requires doctrine/lexer ^1.0.1 -> satisfiable by doctrine/lexer[1.2.0].
- Installation request for egulias/email-validator 2.1.15 -> satisfiable by egulias/email-validator[2.1.15].
I am using wamp server
My composer version is
CLI version
How can I fix this? thank you in advance!
It seems like your command line is using a different version of PHP (it seems HHVM).
Try type
where php
in a command prompt and check if the given path is the same inside the WAMP installation folder

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