phpstorm-attributes
phpstorm-attributes copied to clipboard
PhpStorm specific attributes
this is normal  But I define it as a constant, he can't code hint  My phpstorm is installed on windows11, the version is PhpStorm 2022.1.4
There is nothing in the README that states how to set the type nullable or use a join / intersection type. I assume it is the same as for phpdoc...
Suggestion to add an attribute to ensure an instance has a class attribute. ```php class ExpectsAttribute { public function __construct( #[ExpectedAttribute(CustomAttribute::class)] object $instance, ) { $this->instance = $instance; } }...
PHPStan is flagging items like this because the only tag in this project does not include all of the changes. 
Right now if I have following attribute ``` class Shema { #[ArrayShape(['string' => Property::class])] public array $properties; } $schema->properties['prop1'] = new Property(); $shcema->properties['prop2'] = new Property(); ``` PHPStorm (PhpStorm 2023.3.4)...
Hey! Since there is a Pure annotation, shouldn't there be an ImPure annotation, or at least a way to set the opposite pure state? This is supported by PHPStan: >...
I can't seem to find any. The example provided in this repos readme is way too shallow to be useful in the vast majority of real-world usecases. How do I...
Message: `ERROR: TooManyArguments - foo.php:3:2 - Class JetBrains\PhpStorm\Pure has no __construct, but arguments were passed (see https://psalm.dev/026)` ```foo.php
Our codebase is annotated with `#[ExpectedValues]` and for a custom analyzer I want to read some of these but that's not possible. https://github.com/JetBrains/phpstorm-attributes/blob/411f40e9d39088e16a0475d00cc91931315120fa/src/ExpectedValues.php#L40 Please change the attributes so that the...
ExpectedValues do not support enum class, sample code below ```php use JetBrains\PhpStorm\ExpectedValues; enum Color:string { case RED='red'; case BLUE='blue'; } function test(#[ExpectedValues(valuesFromClass: Color::class)] string $color):string { return $color; } test();//autocomplete...