Cannot update to PHP 7.3 due to friendsofphp/php-cs-fixer requirements

Hi Craig & Digitalstrartup community,

At first A HAPPY NEW YEAR TO ALL OF YOU GUYS pulling your hair enjoying Magento.

Craig in recent days I tried to upgrade my PHP to 7.3. I followed this posts, The process was pretty simple. Copy and paste your command :slight_smile: using a superuser.

I haven’t spotted any issues during the upgrade. Then I upgraded one of my Amnasty modules. When I run the bin/magento setup:upgrade command the following warring message was shown.

The error doesn’t look to be related to Amnasty extension. Maybe the friendsofphp/php-cs-fixer v2.13.3 is Magento itself related? :thinking:

I never installed it.
Can you give me a tip on how to fix it?
Check what this is responsible for? I’m guessing that I should upgrade the frindsofphp/php-cs-fixer to a newer version which is compatible with php7.3 and than upgrade my php.

(I forgot to mention that prior to the upgrade I contacted all my 3rd party module releasers and asked them if their modules are compatible with PHP 7.3. All confirmed that their products are compatible with PHP 7.3)

Thank you.

I found something about it here: https://packagist.org/packages/friendsofphp/php-cs-fixer

I’m guessing it is a part of my composer. So if I run this command:

composer require friendsofphp/php-cs-fixer

It should upgrade my version for 2.13.3 to 2.16.1.

Happy New Year ::tada::

I’m pretty sure that friendsofphp/php-cs-fixer is a Magento dependency as I’ve found the same entry in my composer.json file in both my 2.2.x and 2.3.x installations. It’s used to automatically fix PHP Coding Standards issues.

The latest stable version is 2.16.1 released back in November. So, you might want to try updating that, as your version of 2.13.3 was released back in April. Once that blocker is out the way then you should be good to go.

Normally when a “blocker” appears like this, it’s because a “lock” has been put on the version. Something that I briefly touched on in this post entry: Error: "Unable to unserialize value" during composer update.

I suspect your version of friendsofphp/php-cs-fixer is locked to the 2.13.x branch. Therefore, you might have to specify the version number when you run the composer require command for it.

Side Note: I wrote this reply before reading your other post… You got to the same conclusion :+1:

1 Like

Thank you very much.