Display JS and CSS errors in PHP files


We are evaluating PhpStorm.

It seems JS and HTML errors are not displayed in  PHP files.

For instance in a file "test.php" having:

div {
color: bl;


Will only report "bl" is a mismatched property. But no errors on "uhiuh". The same code in test.html report well the error.

Same with javascript in test.php :


Will report only warning for fzefz being undiefined. The same code in test.html will report an error "expression expected".

It seems linked to this issue, but their is no move on it:

So my question is, is it possible to highlight JS/CSS errors on PHP files ? (i tried using using template data language by giving HTML language to the folder containing my php view files which contains mixed php/html/css/js, -https://www.jetbrains.com/help/phpstorm/syntax-highlighting-php-in-js.html- , but it don't display js/css errors).

Does some extensions (i would have prefer natively, for a such wellknow IDE) can provide this ?

I should mentions that in the php files their is PHP too, so i cannot just set those files in HTML because it will loose php errors, completions, etc.

From practical point those php files are symfony view files, so mixing php/html/js/css. This is so common that i d'ont understand why it is not natively correctly handled. Actually i use NetBeans and mixed php/html/js/ccs is very well handled with same reporting than full html files.


I hope their is some way to solution this, because php/symfony is very well handled by PhpStorm.


Please sign in to leave a comment.