Errors not showing up with PHP 7.2
holtjohnson opened this issue · 1 comments
holtjohnson commented
While trying to lint the code below containing an error I don't see any indication of an error in the gutter or in the status bar.
If I turn on debugging in Sublime Linter and open up the console I see:
SublimeLinter: php: front-page.php ['/usr/local/bin/php', '-l', '-n', '-d', 'display_errors=On', '-d', 'log_errors=Off']
SublimeLinter: php output:
Parse error: syntax error, unexpected 'endwhile' (T_ENDWHILE), expecting end of file in Standard input code on line 16
Errors parsing Standard input code
If I instead use PHP v5.6.30 Sublime Linter works, but I noticed the PHP CLI gives a different parse error.
SublimeLinter: php: front-page.php ['/usr/bin/php', '-l', '-n', '-d', 'display_errors=On', '-d', 'log_errors=Off']
SublimeLinter: php output:
Parse error: parse error in - on line 16
Errors parsing -
I don't know when they changed it but PHP v7.2.0 appears to have a newer & more detailed error message format. I looked at the regex for this plugin and it doesn't appear to match the newer error output.
Environment Details:
OS: Mac OSX 10.12.5
PHP: v7.2.0
Sublime Text Build: 3126
SublimeLinter version: v3.8.0+1
SublimeLinter-php version: v1.1.0
jfcherng commented