PHP storm don't recognize php8.1 features
I have a problem with using some of the php8.1 features like this one:
public function __construct(
private readonly TestClass $test,
private readonly AnotherClass $anotherClass
) {
}
In composer.json php version is set to be 8.1
Have you changed the projects settings in PHPStorm and made the 8.1 the interpreter?
I don't have 8.1 in the interpreter
Only 8.0
@knubbe Then you will get issues with php 8.1 syntax.
Try updating to php 8.1
@Tray2 It's not related with cli interpreter because it's work without setting that up
You will have to inform PHP storm which PHP version you are using.
Open Settings > PHP and make sure PHP Language Level and CLI Interpreter are both set to PHP 8.1.
I fixed it. It's related to .idea folder ;)
@knubbe please tell me how did you do it
Please or to participate in this conversation.