I have a new project in yii2, I downloaded yii2 using composer and when I try to download the extension it tells me to upgrade my PHP from 5 to 5.6 or higher. Then I upgraded it to 7.1.3 the old projects works fine and the phpMyAdmin too afterwards I tried to install the extension again. It gives me the same message.
Problem 1
sebastian/version 2.0.1 requires php >=5.6 -> your PHP version (5.5.34) does not satisfy that requirement.
sebastian/version 2.0.1 requires php >=5.6 -> your PHP version (5.5.34) does not satisfy that requirement.
Installation request for sebastian/version (installed at 2.0.1) -> satisfiable by sebastian/version[2.0.1].
What is wrong here?
Related
I recently installed php (8.1.7) and composer (2.3.7) and laravel 9;
Now I am getting this error while running the command
composer update
on a laravel project, I searched a lot but couldn't find exact solution, all of them were not discussing the issue of phpunit/phpunit.
The error looks like this:
Problem 1
- phpunit/phpunit[6.0.0, ..., 6.5.14] require php ^7.0 -> your php version (8.1.7) does not satisfy that requirement.
- Root composer.json requires phpunit/phpunit ~6.0 -> satisfiable by phpunit/phpunit[6.0.0, ..., 6.5.14].```
You have to upgrade your phpunit version to correspond with your php 8.1.7 (choose between phpunit version 9 or 8, according to the official documentation) or downgrade your php version to works with phpunit 6.*.
That's it !
I have a problem with installing some of the composer packages on my project.
Problem 1
- Installation request for spatie/image-optimizer 1.1.5 -> satisfiable by spatie/image-optimizer[1.1.5].
- spatie/image-optimizer 1.1.5 requires php ^7.2 -> your PHP version (7.1.14) does not satisfy that requirement.
Problem 2
- Installation request for spatie/laravel-feed 2.2.1 -> satisfiable by spatie/laravel-feed[2.2.1].
- spatie/laravel-feed 2.2.1 requires php ^7.2 -> your PHP version (7.1.14) does not satisfy that requirement.
Problem 3
- Installation request for spatie/laravel-newsletter 4.5.0 -> satisfiable by spatie/laravel-newsletter[4.5.0].
- spatie/laravel-newsletter 4.5.0 requires php ~7.2 -> your PHP version (7.1.14) does not satisfy that requirement.
Problem 4
- Installation request for spatie/laravel-referer 1.4.0 -> satisfiable by spatie/laravel-referer[1.4.0].
- spatie/laravel-referer 1.4.0 requires php ^7.2 -> your PHP version (7.1.14) does not satisfy that requirement.
Problem 5
- Installation request for spatie/laravel-sitemap 5.3.0 -> satisfiable by spatie/laravel-sitemap[5.3.0].
- spatie/laravel-sitemap 5.3.0 requires php ^7.2 -> your PHP version (7.1.14) does not satisfy that requirement.
Problem 6
- spatie/image-optimizer 1.1.5 requires php ^7.2 -> your PHP version (7.1.14) does not satisfy that requirement.
- spatie/image 1.7.2 requires spatie/image-optimizer ^1.0 -> satisfiable by spatie/image-optimizer[1.1.5].
- Installation request for spatie/image 1.7.2 -> satisfiable by spatie/image[1.7.2].
Even though my PHP version is 7.2.1 these packages are not passing the composer.json validation i.e. cannot be installed. The PHP CLI version is 7.2.1 as well. (checked them all with using the standard procedures phpinfo() and php -v.
I am using MAMP PRO version 4.4.1 and the latest configurable PHP version from the listed versions is 7.2.1 (which is okay since the requirements for these packages ranges from 7.1 to 7.2.
https://github.com/spatie/image-optimizer/blob/master/composer.json#L19
https://github.com/spatie/laravel-newsletter/blob/master/composer.json#L20
https://github.com/spatie/laravel-feed/blob/master/composer.json#L33
https://github.com/spatie/laravel-referer/blob/master/composer.json#L19
https://github.com/spatie/laravel-sitemap/blob/master/composer.json#L19
As I already said the PHP versions are looking good both on the Apache side and CLI side and from the MAMP PRO GUI as well.
PHP 7.2.1 (cli) (built: Jan 15 2018 12:20:50) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies
MAMP PRO config:
MAMP PRO host related config:
Upgrading PHP to version 7.3 might resolve this issue but I would like to skip that because it has to be done manual without the help of MAMP PRO (since my MAMP PRO version is licensed and I'll need another license to get the built-in PHP versions in it).
Thanks!
Not sure what would cause this except a custom version defined in your composer.json:
{
"config": {
"platform": {
"php": "7.1.14"
}
},
To work around this problem you could tell composer to ignore the version:
composer require spatie/image-optimizer --ignore-platform-reqs
I have a website built on Silverstripe 3.5.6 and I need to update it to 3.6.6 because it has php 7.0.
The documentation is very twisted and I don't understand anything. Basically what I tried was to open composer.json and change framework,cms versions from 3.5.6 to 3.6.6 and then via Terminal launch the "composer update" command, and I tought this will load the corresponding versions, but I get this error back:
- Installation request for silverstripe/framework 3.6.6#stable -> satisfiable by silverstripe/framework[3.6.6].
- silverstripe/framework 3.6.6 requires php >= 5.3.3, <7.2 -> your PHP version (7.2.11) does not satisfy that requirement.
Problem 2
- Installation request for silverstripe/reports 3.6.6#stable ->
satisfiable by silverstripe/reports[3.6.6].
- silverstripe/reports 3.6.6 requires php >=5.3.3,<7.2 -> your PHP
version (7.2.11) does not satisfy that requirement.
Problem 3
- silverstripe/framework 3.6.6 requires php >= 5.3.3, <7.2 -> your PHP
version (7.2.11) does not satisfy that requirement.
- silverstripe/display-logic 1.5.0 requires silverstripe/framework
^3.1
-> satisfiable by silverstripe/framework[3.6.6].
- Installation request for silverstripe/display-logic 1.5.0 -> satisfiable by silverstripe/display-logic[1.5.0].
From the log you posted:
silverstripe/framework 3.6.6 requires php >= 5.3.3, <7.2 -> your PHP
version (7.2.11) does not satisfy that requirement.
Silverstripe 3.x (prior to 3.7.0) only supports PHP 7 versions before 7.2. If you want to use PHP 7.2, you will need to upgrade to SilverStripe 3.7+ or Silverstripe 4.x.
I have them both vanilla setup. Laravel setups up fine. But when i run composer install i get;
> Problem 1
- This package requires php ^7.1.3 but your PHP version (7.0.11) does not satisfy that requirement.
Problem 2
- Installation request for doctrine/inflector v1.3.0 -> satisfiable by doctrine/inflector[v1.3.0].
- doctrine/inflector v1.3.0 requires php ^7.1 -> your PHP version (7.0.11) does not satisfy that requirement.
Problem 3
....
Problem 24
- Installation request for sebastian/diff 3.0.1 -> satisfiable by sebastian/diff[3.0.1].
- sebastian/diff 3.0.1 requires php ^7.1 -> your PHP version (7.0.11) does not satisfy that requirement.
Problem 25
- laravel/framework v5.6.26 requires php ^7.1.3 -> your PHP version (7.0.11) does not satisfy that requirement.
- laravel/tinker v1.0.7 requires illuminate/console ~5.1 -> satisfiable by laravel/framework[v5.6.26].
- Installation request for laravel/tinker v1.0.7 -> satisfiable by laravel/tinker[v1.0.7].
A total of 25 problems when running composer on laravel...
I have understood so much my php version differs in minor version, but what can i do to fix it?
Thanks!
I think your laravel version wants php version >= 7.1.3 but your installed version is 7.0.11.
If you have installed latest laravel version i.e(5.6) then it should match following requirements:
PHP >= 7.1.3
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
Ctype PHP Extension
JSON PHP Extension
Please check laravel installation guide https://laravel.com/docs/5.6/installation#installation
Yea, there where mismatches in version. Strangley enough i downloaded another phpversion 7.2.xx. And it almost worked like a charm. They have some strange things going on eg. the extensions config directive s never prefixed with "php_" in the ini file and it is very easy to miss, so you will need to add it yourswelf also there are no extension dir config by default, you also need that one. Its commented out, another workhour to find this this.
Thanks for your reply!
I am updating to Laravel 5.5. which uses PHP 7.0 version. I need to do setup on my local machine and on AWS as well. First, locally WAMP server is installed which comes with PHP 7.0 ... I've selected it and when localhost is opened I get the message that the PHP version is 7.0.10 ... After changing version numbers for Laravel and PHP in composer.json, I did update and got this message:
Problem 1
This package requires php >=7.0 but your PHP version (5.6.25) does not satisfy that requirement. Problem 2
laravel/framework v5.5.2 requires php >=7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
laravel/framework v5.5.1 requires php >=7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
laravel/framework v5.5.0 requires php >=7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
Installation request for laravel/framework 5.5.* -> satisfiable by laravel/framework[v5.5.0, v5.5.1, v5.5.2].
It is written that I still use 5.6. How can I change this?
According to #iainn Apache is using PHP 7, but the CLI (which Composer uses) is still using 5.6 hence, trying to uninstall and install composer again and select the correct php version (7.0) while setup. Check below screenshot
You're getting an error from composer. Try using
'composer install --ignore-platform-reqs'
to setup your project folder.
Just change varible enviroment on your computer
add path php you would you like to use