Closed BernardA closed 2 years ago
Hi @BernardA,
I'm not sure but this issue could probably be related to mine: [Bug] Broken parse of property types since v1.8.1
(worked fine under v1.8.0
). Check if you still have the false positive error while downgrading the version of intelephense to 1.8.0
.
If you get the following results, I think our issues are the same: | Intelephense version | Bug |
---|---|---|
1.8.0 | No | |
1.8.1 | Yes | |
1.8.2 | Yes |
How downgrade a VS Code extension to a previous version? Just like this:
Regards.
I went backwards to 1.8.0 and the problem was already there. Nice try though.
It would seem that intelephense is not smart enough to know that User
is referring to the User::class.
I needed to add type hint as below:
/**
* @var User $user
*/
if (!is_object($user = $token->getUser())) {
return $deserializeObject;
}
...
Describe the bug Shows error
undefined method
when method actually exists.To Reproduce
On App\Stage\DeserializeStage
On App\Entity\User
Expected behavior Should not error, as the methods does exist.
Screenshots If applicable, add screenshots to help explain your problem.
Platform and version Mac OS intelephense v 1.8.2