Search code examples
phpstormphp-7.1phpstorm-10

PHP 7.1 support in PhpStorm 10


I am using PhpStorm 10.0 but the new php 7.1 syntax is not correctly parsed.

For instance, the following getter is considered invalid syntax:

public function notes(): ?string
{
    return $this->notes;
}

Is it possible to make PhpStorm 10.0 php 7.1-aware or do I need to upgrade to the new version?


Solution

  • Is it possible to make PhpStorm 10.0 php 7.1-aware

    No.

    or do I need to upgrade to the new version?

    Yes.

    You need at very least 2016.2.2 for such syntax to be supported (latest at the moment is 2017.2.1).

    https://stackoverflow.com/a/45483094/783119