psalm / psalm-plugin-symfony

Psalm Plugin for Symfony
MIT License
229 stars 53 forks source link

Symfony 6 stubs are not enabled on Symfony 7 #347

Closed Mika56 closed 4 months ago

Mika56 commented 4 months ago

Hello,

This package provides specific stubs for Symfony 5 and Symfony 6. However, when using Symfony 7, no version-specific stubs are loaded, but it looks to me like Symfony 6 stubs should be compatible.

This yields to issues like this:

ERROR: MixedAssignment - src/Controller/EncryptionController.php:21:13 - Unable to determine the type that $data is being assigned to (see https://psalm.dev/032)
            $data = $form->getData();

  The type of $data is sourced from here - vendor/psalm/plugin-symfony/src/Stubs/common/Component/Form/FormInterface.stubphp:12:22
     * @psalm-return ?T