tooeo / psalm-plugin-jms
Checking JMS annotation
Installs: 59 627
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 2
Type:psalm-plugin
Requires
- php: ^8
- vimeo/psalm: ^5.13
Requires (Dev)
- codeception/codeception: ^4.1
- phpunit/phpunit: ^9.5.5
- psalm/plugin-phpunit: ^0.18.4
- squizlabs/php_codesniffer: ^3.3
- weirdan/codeception-psalm-module: ^0.13.1
- weirdan/prophecy-shim: ^2.0
This package is auto-updated.
Last update: 2024-10-30 02:16:26 UTC
README
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.
Installation
composer require --dev tooeo/psalm-plugin-jms
vendor/bin/psalm-plugin enable tooeo/psalm-plugin-jms