Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP7 language support for PhpStorm

I know PHP7 isn't released yet, however I would like to start trying it out, and to do this I would ideally like to keep using PhpStorm. The problem naturally is that it doesn't yet have language support for it.

I have compiled the PHP7 source and added it as an interpreter to PhpStorm, which surprisingly it accepted, however this made no impact on the language level. So my guess is the interpreter is for debugging and the IDE uses its own parser to debug code.

Has anyone found a way to get support for PHP7 into the IDE? even if its the messiest solution in the world, it would be enough.

like image 658
Flosculus Avatar asked Apr 19 '15 14:04

Flosculus


1 Answers

That's not possible with current versions on PhpStorm -- it has to be natively supported by IDE.

Support for PHP7 will come only in v10 (e.g. no mention for v9 in current roadmap -- no need to support something that is still work in progress, especially since v10 will be released close to PHP7 target dates).

UPDATE ( 21/05/2015 ):

Based on today's tickets it's quite possible that PHP 7 support will actually be added in PhpStorm v9.

UPDATE ( 22/05/2015 ):

Master ticket: https://youtrack.jetbrains.com/issue/WI-27468 (check linked tickets for particular features).

UPDATE ( 08/07/2015 ):

PhpStorm v9 has been released with very basic PHP7 support.


I have compiled the PHP7 source and added it as an interpreter to PhpStorm, which surprisingly it accepted, however this made no impact on the language level. So my guess is the interpreter is for debugging and the IDE uses its own parser to debug code.

Generally speaking -- you are correct here.

Interpreter is used to execute and debug your local (or remote via SSH) scripts and other external stuff that required specifying php executable (e.g. PHPUnit tests etc). It is also used by built-in simple web server if it's used to serve your pages.

At the same time specific language level (5.4, 5.5, 5.6 etc) is set separately and requires IDE to know about such new constructs/syntax etc which means it has to be coded first (as IDE has its' own PHP parser/lexer).

like image 98
LazyOne Avatar answered Sep 18 '22 23:09

LazyOne