3

Hello to all users of the forum, I need help.

I upgraded from version 2.3.2-p2 to 2.3.4 and after that the error is occurring:

composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details 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  
    - friendsofphp/php-cs-fixer v2.13.3 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.15) does not satisfy that requirement.  
    - friendsofphp/php-cs-fixer v2.13.2 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.15) does not satisfy that requirement.  
    - friendsofphp/php-cs-fixer v2.13.1 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.15) does not satisfy that requirement.  
    - friendsofphp/php-cs-fixer v2.13.0 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.15) does not satisfy that requirement.  
    - friendsofphp/php-cs-fixer v2.13.3 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.15) does not satisfy that requirement.  
    - Installation request for friendsofphp/php-cs-fixer ~2.13.0 -> satisfiable by friendsofphp/php-cs-fixer[v2.13.0, v2.13.1, v2.13.2, v2.13.3]

.

Anyone who can help me will be grateful.

Hugs

php-cs-fixer error

  • you have try php version downgrade with 7.1.3+ – Rakesh Donga Feb 28 at 15:44
5

The issue is that php-cs-fixer does not support PHP versions above 7.3. php-cs-fixee is only a dev dependencies though, that just fixes code style issues.

So if you are in a production environment you can simple not update / install the dev dependencies with the approripate command.

composer install --no-dev
composer update --no-dev

Or if you want access to these dev tools you can downgrade your PHP version to a support one such as 7.2.

Another option is you can remove the depency from the project in general with

composer remove friendsofphp/php-cs-fixer
| improve this answer | |
3

Probably best idea is to fix it properly via sams answer but if it's something you just want to work around quickly you can also use

composer install --ignore-platform-reqs

which will ignore platform requirements during the installation

| improve this answer | |
1

This solution worked for me. First check which version of Php your SSH is using, type this on Debian/Ubuntu based servers :

php -v

It will confirm you're using Php 7.3.15. It's not right Php version to process those queries. For you case you need php 7.2 CLI, it's the command line interface you are using when you connect by SSH, not the one running Magento, they can be different. Make sure you have the right Php shell installed on your server. If not, install it. For Debian/Ubuntu based servers, type :

sudo apt-get install php7.2 php7.2-cli php7.2-common

Then, you need to be able to use the right php version for this particular query. Type the next query to use Php 7.2 temporarily, just for the actual session. If you disconnect, it will go back to the previous PHP Cli version. Type this query and make sur the link to you php folder is correct.

export PATH=/usr/local/php72/bin:$PATH;

For Plesk users

export PATH=/opt/plesk/php/7.2/bin:$PATH;
| improve this answer | |
0

None of those solutions solved the problem.

The "no-dev" option doesn't update the dev packages, but it requires you to fix the issues anyway.

Removing php-cs-fixer will remove a lot of other dependencies. Then, it will throw another error related to magento2-functional-testing-framework which is also not compatible with PHP 7.3.15.

Removing both will finally allow you to run "composer update", but it will create issues on frontend.

I tried updating those packages to newer versions working with PHP 7.3.15. It is a real nightmare. It keeps leading to new issues related to other dependencies that you have to update as well. At the end, it will crash the system.

My best bet is to downgrade PHP temporarily, or wait for Magento 2.3.5 coming out this month.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.