You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
7 | ERROR | [x] PHP keywords must be lowercase; expected
| | "__halt_compiler" but found "__HALT_COMPILER"
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
The problem is that despite what the documentation would suggest, this function must be upper case for include phar:///path/archive.phar/public/index.php to work from the phar stub. Seriously, I cannot make this stuff up:
PHP message: PHP Warning: include(): Failed opening 'public/index.php' for inclusion (include_path='phar:///tmp/archive.phar:.:/usr/share/php7:/usr/share/php') in /tmp/archive.phar on line 6"
Switching __halt_compiler() to __HALT_COMPILER() resolves this issue.
gsherwood
changed the title
PSR1,PSR2,PSR12 complains __HALT_COMPILER is uppercase
Generic.PHP.LowerCaseKeyword complains __HALT_COMPILER is uppercase
Feb 18, 2020
phpcs --standard=PSR1,PSR2,PSR12 pharstub.php
The problem is that despite what the documentation would suggest, this function must be upper case for
include phar:///path/archive.phar/public/index.php
to work from the phar stub. Seriously, I cannot make this stuff up:Switching
__halt_compiler()
to__HALT_COMPILER()
resolves this issue.See halt-compiler vs phar.stub
The text was updated successfully, but these errors were encountered: