sublimetext-codeformatter icon indicating copy to clipboard operation
sublimetext-codeformatter copied to clipboard

Error with PHP 8

Open TKLCZ opened this issue 4 years ago • 4 comments

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

TKLCZ avatar Mar 14 '21 10:03 TKLCZ

+1

QNET17 avatar Mar 17 '21 17:03 QNET17

Same problem.

amirhamza05 avatar Nov 13 '21 07:11 amirhamza05

+1

keizo3 avatar Dec 02 '21 03:12 keizo3

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

nekromoff avatar Feb 13 '22 19:02 nekromoff