Skip to content

make fix-style stopped working #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SOHELAHMED7 opened this issue Jun 28, 2024 · 1 comment · Fixed by #9
Closed

make fix-style stopped working #8

SOHELAHMED7 opened this issue Jun 28, 2024 · 1 comment · Fixed by #9
Assignees

Comments

@SOHELAHMED7
Copy link
Member

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
Copy link
Member Author

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.

@SOHELAHMED7 SOHELAHMED7 reopened this Jun 28, 2024
@cebe cebe closed this as completed in #9 Nov 12, 2024
cebe added a commit that referenced this issue Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant