junstyle / vscode-php-cs-fixer

PHP CS Fixer extension for VS Code
https://marketplace.visualstudio.com/items?itemName=junstyle.php-cs-fixer
MIT License
357 stars 45 forks source link

Unable to locate autoload.php file in php-cs-fixer.phar #192

Closed susnux closed 2 years ago

susnux commented 2 years ago

Fresh install, tried to run format document:

[
  "/home/xxxxx/.vscode/extensions/junstyle.php-cs-fixer-0.3.8/php-cs-fixer.phar",
  "fix",
  "--using-cache=no",
  "--format=json",
  "--rules=@PER",
  "--path-mode=override",
  "/tmp/pcf-tmp0.17040471142647018/PersonalCalendar.php"
]
PHP Fatal error:  Uncaught RuntimeException: Unable to locate autoload.php file. in /home/xxxxx/.vscode/extensions/junstyle.php-cs-fixer-0.3.8/php-cs-fixer.phar:86
Stack trace:
#0 /home/xxxxx/.vscode/extensions/junstyle.php-cs-fixer-0.3.8/php-cs-fixer.phar(91): {closure}()
#1 {main}
  thrown in /home/xxxxx/.vscode/extensions/junstyle.php-cs-fixer-0.3.8/php-cs-fixer.phar on line 86
susnux commented 2 years ago

Never mind, I was missing the phar extension on my system (php8-phar).