Skip to content

Conversation

@zorn-v
Copy link
Contributor

@zorn-v zorn-v commented Jan 5, 2024

Currently, if you are using phpstan in your project you'll get

Access to an undefined property Symfony\Component\Validator\Constraint::$message

error on any new generated validator

Copy link
Contributor

@drieschel drieschel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it and it works. 👍

Do you think it makes sense also to add the type to the $message property in src/Resources/skeleton/validator/Constraint.tpl.php in this mr?

public string $message = 'The value "{{ value }}" is not valid.';

@weaverryan
Copy link
Member

Thanks @zorn-v!

@weaverryan weaverryan merged commit 425573c into symfony:main Jan 10, 2024
@jrushlow jrushlow mentioned this pull request Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants