PHP 7.1 support in PhpStorm 10

582 views Asked by At

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?

2

There are 2 answers

0
LazyOne On BEST ANSWER

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

0
Martin On

Why are you not on PhpStorm 2017.2? You can't expect support for a version of PHP that came after the program was released (and subsequently superceded).

  • PhpStorm 10 was released in November 2015.

  • PhpStorm 10 was superceded by PhpStorm 2016.1 in March 2016

  • PHP 7.1 was released December 2016.