phpstan-drupal
phpstan-drupal copied to clipboard
Symfony constraints and unknown properties
Using drupal-check I'm getting
Access to an undefined property
Symfony\Component\Validator\Constraint::$alreadyExists.
But my ... > Validation > Constraint > UniqueItem.php I have public $alreadyExists = ... and I'm calling it from ... > Validation > Constraint > UniqueItemValidation.php
Pointing to real-world code UniqueItemValidator.php#L91 to keep the description as simple as possible. I'm not fishing for someone to do my job for me, just hoping to either understand this or report a bug.
I remember looking at this quick when pinged in Slack and asked @DonRichards to open the issue. I thought phpstan-symfoyn would help, but it doesn't so we'll need some kind of rule to check the matching constraint when there is validator analysis