bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.61k stars 94 forks source link

Undefined property in ArrayObject #2926

Open thanhtran468 opened 3 months ago

thanhtran468 commented 3 months ago

Describe the bug

<?php

$class = new ArrayObject();

$class->age = 1;

$class->age;

Should not report undefined property error, because it implement from ArrayAccess. Other case: #[AllowDynamicProperties].

bmewburn commented 3 months ago

It still has deprecation warnings for PHP8.2+ which I presume indicates it will become a fatal error in the future, so I think it is valid to show an error here, at least for 8.2+. Will see if it can be suppressed for earlier versions. https://3v4l.org/qK8Hp

Deprecated: Creation of dynamic property ArrayObject::$age is deprecated in /in/qK8Hp on line 6