Checking JMS annotation

Installs: 46 633

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 2


0.1.0 2023-07-26 05:46 UTC


Psalm plugin for checking JMS annotation

Plugin for Psalm wich check JMS serializer annotation&

When you use JMS serializer you need add annotation for properties. And some times you can user classes as a type for properties.

For example:

class SomeTestFile
     * @JMS\Type('\Tooeo\PsalmPluginJms\Tests\Fixtures\JmsDto');
     * @psalm-suppress PropertyNotSetInConstructor
    public string $good;
     * @JMS\Type('array<JmsDto>');
     * @psalm-suppress PropertyNotSetInConstructor
    public string $goodArray;

And you can make a mistake by typing the class name.

So if you don't have enough tests, you can get problems on production. This plugin helps avoid that behavior and prevent creating code with unexist classes in annotations.


composer require --dev tooeo/psalm-plugin-jms
vendor/bin/psalm-plugin enable tooeo/psalm-plugin-jms