Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem with php-cs-fixer after upgrade php to version 8

After upgrade to php8 I have a problem with php-cs-fixer which I installed globally via composer. Right now I can not use php-cs-fixer because every time I get:

PHP needs to be a minimum version of PHP 5.6.0 and maximum version of PHP 7.4.*.
To ignore this requirement please set `PHP_CS_FIXER_IGNORE_ENV`.

For php upgrade and usage different version of php I use https://github.com/shivammathur/homebrew-php

For previous version of php (7.4) everything works fine.

like image 635
knubbe Avatar asked Apr 01 '26 11:04

knubbe


2 Answers

The first version of php-cs-fixer to support PHP 8 was Version 2.18 released on 18th Jan 2021.

like image 193
knubbe Avatar answered Apr 30 '26 06:04

knubbe


https://cs.symfony.com/doc/usage.html#environment-options

PHP_CS_FIXER_IGNORE_ENV=1 php php-cs-fixer.phar fix /path/to/dir

like image 34
FulgerX2007 Avatar answered Apr 30 '26 05:04

FulgerX2007



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!