akalongman / sublimetext-codeformatter

Code Formatter plugin for ST2/ST3
MIT License
771 stars 131 forks source link

Error with PHP 8 #410

Open TKLCZ opened 3 years ago

TKLCZ commented 3 years ago

Hello, the formatting doesn't work with PHP 8. Screenshot with error message attached below. With PHP 7 everything works correctly. 2021-03-14

QNET17 commented 3 years ago

+1

amirhamza05 commented 2 years ago

Same problem.

keizo3 commented 2 years ago

+1

nekromoff commented 2 years ago

See this solution that works:

  1. Install PHP7.4 along any v8+
  2. Add/edit path: "php_path": "/usr/bin/php7.4", // Path for PHP executable, e.g. "/usr/lib/php" or "C:/Program Files/PHP/php.exe". If empty, uses command "php" from system environments` in the package user settings

You might need to change executable path for php_fmt as well: https://github.com/nanch/phpfmt_stable/issues/77