php shell / cli script and namespaces #4232
Unanswered
Nickwiz
asked this question in
Q&A - Ask for help with problems
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When using ALE with PHP as cgi, shell script ... and using
namespace
the first lines can be something like:This produces ALE error:
It complains about the shebang and note that PHP does so if the file is redirected instead of used as an argument, i.e:
OK:
$ php -l -d error_reporting=E_ALL -d display_errors=1 -d log_errors=0 test.php No syntax errors detected in test.php $ php test.php OK $ ./test.php OK
BAD:
Is there an option to rectify for this somewhere? If not, it should perhaps be reported as a bug, but not sure.
I do not know the ALE code and not sure why it redirects the file instead of using it as an argument.
Have not found any options in the Command line options section that could help in this regard.
https://www.php.net/manual/en/features.commandline.options.php
Beta Was this translation helpful? Give feedback.
All reactions