phptools-docs icon indicating copy to clipboard operation
phptools-docs copied to clipboard

Cannot implicitly convert 'Doctrine\ORM\T|null' to xxxx

Open hsnfirdaus opened this issue 1 year ago • 7 comments

image

How can i get rid of this message in vscode? I think before extension update. It doesn't give any warning?

hsnfirdaus avatar Jun 15 '23 10:06 hsnfirdaus

Thank you for reporting this.

May I just ask you, where is T defined? I guess it would be in the doc comment above the getReference() definition.

jakubmisek avatar Jun 15 '23 14:06 jakubmisek

found it, I'll try to fix it as soon as possible

(for me: https://github.com/doctrine/orm/blob/1adb5c0c701c8f96af6a06f36d24baa052230466/lib/Doctrine/ORM/EntityManagerInterface.php#LL186C21-L186C33)

jakubmisek avatar Jun 15 '23 14:06 jakubmisek

found it, I'll try to fix it as soon as possible

(for me: https://github.com/doctrine/orm/blob/1adb5c0c701c8f96af6a06f36d24baa052230466/lib/Doctrine/ORM/EntityManagerInterface.php#LL186C21-L186C33)

Yes, that's it. It's problem in this extension right, not in doctrine side?

hsnfirdaus avatar Jun 15 '23 14:06 hsnfirdaus

right, the extension just didn't handle the combination of function @template T, interfaces, @psalm-return, and {inheritDoc} :)

jakubmisek avatar Jun 15 '23 15:06 jakubmisek

@jakubmisek Is this resolved? I'm still encounter this issue...

hsnfirdaus avatar Jan 14 '24 11:01 hsnfirdaus

@hsnfirdaus please try clearing vendor cache:

vscode's command palette > Clear /vendor/ cache ...

jakubmisek avatar Jan 14 '24 15:01 jakubmisek

@jakubmisek already tried that..., the warning still showing...

hsnfirdaus avatar Jan 15 '24 04:01 hsnfirdaus