I have an error when define PHP version in 5.6 on settings.
PhpStorm, in 2018.1.6 version, use Core with PHP 7 and logically use PHP 7 implementations. By example for extends Exception, PhpStorm create an constructor with a third parameter has an instance of Throwable
.
It's very problematic, do you have an idea for solve this problem?
Following the answers, for reproduce, please follow this steps :
- using PHPStorm 2018.1.6
- create an TestException extends \Exception
- create a constructor with autocompletion
PHPStorm extends a PHP 7 version of \Exception and not a PHP 5.6 version of Exception, PHP 7 version integration Throwable interface for previous exception but not PHP 5.6 version.
Use autocomplete function to create constructor:
Constructor implements throwable interface for previous exception: