php-openapi / yii2-openapi

REST API application generator for Yii2, openapi 3.0 YAML -> Yii2
MIT License
2 stars 0 forks source link

`make fix-style` stopped working #8

Open SOHELAHMED7 opened 2 weeks ago

SOHELAHMED7 commented 2 weeks ago

When running on PHP 7.4

$ make fix-style
vendor/bin/indent --tabs composer.json
vendor/bin/indent --spaces .php_cs.dist
vendor/bin/php-cs-fixer fix src/ --diff

Fatal error: Uncaught ErrorException: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 7.4.33. in /app/vendor/composer/platform_check.php:24
Stack trace:
#0 [internal function]: {closure}(256, 'Composer detect...', '/app/vendor/com...', 24, Array)
#1 /app/vendor/composer/platform_check.php(24): trigger_error('Composer detect...', 256)
#2 /app/vendor/composer/autoload_real.php(25): require('/app/vendor/com...')
#3 /app/vendor/autoload.php(25): ComposerAutoloaderInit5c37f0b685571bf4ca99e1190308b0e2::getLoader()
#4 /app/vendor/friendsofphp/php-cs-fixer/php-cs-fixer(99): require_once('/app/vendor/aut...')
#5 /app/vendor/bin/php-cs-fixer(115): include('/app/vendor/fri...')
#6 {main}
  thrown in /app/vendor/composer/platform_check.php on line 24
make: *** [Makefile:18: fix-style] Error 255

When running on PHP 8.0

$ make fix-style
vendor/bin/indent --tabs composer.json
vendor/bin/indent --spaces .php_cs.dist
vendor/bin/php-cs-fixer fix src/ --diff

Fatal error: Uncaught ErrorException: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 8.0.30. in /app/vendor/composer/platform_check.php:24
Stack trace:
#0 [internal function]: {closure}(256, 'Composer detect...', '/app/vendor/com...', 24)
#1 /app/vendor/composer/platform_check.php(24): trigger_error('Composer detect...', 256)
#2 /app/vendor/composer/autoload_real.php(25): require('/app/vendor/com...')
#3 /app/vendor/autoload.php(25): ComposerAutoloaderInit5c37f0b685571bf4ca99e1190308b0e2::getLoader()
#4 /app/vendor/friendsofphp/php-cs-fixer/php-cs-fixer(100): require_once('/app/vendor/aut...')
#5 /app/vendor/bin/php-cs-fixer(119): include('/app/vendor/fri...')
#6 {main}
  thrown in /app/vendor/composer/platform_check.php on line 24
make: *** [Makefile:18: fix-style] Error 255

When running on PHP 8.1

$ make fix-style
vendor/bin/indent --tabs composer.json
vendor/bin/indent --spaces .php_cs.dist
vendor/bin/php-cs-fixer fix src/ --diff
PHP needs to be a minimum version of PHP 5.6.0 and maximum version of PHP 8.0.*.
Current PHP version: 8.1.29.
To ignore this requirement please set `PHP_CS_FIXER_IGNORE_ENV`.
If you use PHP version higher than supported, you may experience code modified in a wrong way.
Please report such cases at https://github.com/FriendsOfPHP/PHP-CS-Fixer .
make: *** [Makefile:18: fix-style] Error 1
SOHELAHMED7 commented 2 weeks ago

This issue was produced due to old vendor directory.

If a PHP version is changed as mentioned in contributing docs then following operations must be performed:

rm -rf vendor
rm -rf composer.lock
composer install

I will also add this to docs.