Entities retrieved via EntityManager->getRepository() are not properly type hinted
Previously, with
$entity = $entityManager->getRepository(\App\Entity\EntityClass::class)->find(1)
PhpStorm would know that $entity is an instance of EntityClass or null. Now it's being understood as EntityClass|mixed|null|object which leads the undefined method inspection to highlight method calls on these objects (if the option to highlight method calls on mixed or object is enabled, which it should to keep the inspection useful).
Annotations like /** @var EntityClass $entity */ do help, but feel unnecessary, since it did work before, at least when injecting EntityManagerInterface into the method itself (iirc correctly, it did not work when getting the entity manager in the constructor).
I cannot remember whether it first appeared after upgrading to 2022.1, or after upgrading to the Premium version of the Symfony Support plugin.
Environment:
PhpStorm 2022.1 Build #PS-221.5080.224, built on April 13, 2022 Runtime version: 11.0.14.1+1-b2043.25 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 5.4.0-107-generic GC: G1 Young Generation, G1 Old Generation Memory: 4096M Cores: 24 Registry: undo.documentUndoLimit=500 ide.windowSystem.autoShowProcessPopup=true run.processes.with.pty=TRUE ide.images.show.chessboard=true
Non-Bundled Plugins: rocks.blackcat.vcl (0.7.2) me.ihxq.acejump.lite (1.2) com.ultrahob.zerolength.plugin (0.95) com.perl5 (2022.1) com.materkey.codepoints (1.0.2) com.jetbrains.fast.mouse.scroll (1.5.9) com.jan.evendarker (1.0) com.intellij.plugins.html.instantEditing (221.5080.169) net.king2500.plugins.PhpAdvancedAutoComplete (1.1.0) com.kalessil.phpStorm.phpInspectionsUltimate-mp (2021.5) de.espend.idea.php.toolbox (6.1.0) de.espend.idea.php.annotation (8.2.0) fr.adrienbrault.idea.symfony2plugin (2022.1.222) lv.midiana.misc.phpstorm-plugins.deep-keys (2022.02.20.001) ru.adelf.idea.dotenv (2022.1) A move tab left and right using the keyboard plugin - by momomo.com (12.550)
Current Desktop: KDE