Closed georgestephanis closed 7 years ago
The error tooltips don't seem to be displaying for me in the customizer for some reason -- if anyone can take a look at why, that'd be appreciated.
Tooltips now show in the customizer -- I had to bump their z-index to 500000
because of reasons.
So there is no PHP syntax error checking implemented in JS for CodeMirror? What about http://codemirror.net/1/contrib/php/ ?
Hadn't seen that previously, I'm playing with it now. Probably because I was only looking at the CM Core repo.
Thanks!
Ah, that's for the old CodeMirror 1 branch -- current is v5-- I'm exploring to see what's feasible.
I'm sure there's some optimizations involving promises that I can have ^^ do, but for the moment I can't even get the helper to run to do the linting -- I'm not sure what I'm doing wrong, maybe fresh eyes can help?
It makes me really nervous allow arbitrary PHP to be written to the file system, even though it's in a temporary directory. I am dubious as to whether the php
binary will be available, and I think shell_exec
is disabled by many hosts for security reasons. If PHP is to be used for linting, then I think the php_check_syntax()
function should be used instead, but alas it is deprecated was removed from PHP. I don't see a good server-side option here.
I agree completely.
Unfortunately I haven't found a pure JS linter for PHP -- they're all build tool wrappers around a PHP binary.
I'm nuking my work on a PHP linter -- I'm really not happy with it, hopefully we'll find something better if we do anything at all.
Fixes #2
Doesn't offer PHP syntax checking -- we may need to do some sort of ajax command to have the server lint the php code, I'm not seeing much by way of pure JS syntax checking.