-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
phpcs --standard=PSR1,PSR2,PSR12 pharstub.php
----------------------------------------------------------------------
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.
See halt-compiler vs phar.stub
kwhat and jrfnl