Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
[Validator] Improve documentation forUniqueEntity constraint#21197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:7.3
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
604f8fe tob1a3e1aCompareUniqueEntity constraintUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Nice. Looking at my pull request, I think it would also be helpful to mention which version of Symfony introduced this feature. |
| ``identifierFieldNames`` | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| **type**: ``array`` **default**: ``[]`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The type should be**type**: ``array`` | ``string`` [:ref:`default option <validation-default-option>`]
It accept string when not combined identifier. Like:identifierFieldNames: 'id'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't think so because the property is typed with?array in the UniqueEntity class:https://github.com/symfony/doctrine-bridge/blob/7.3/Validator/Constraints/UniqueEntity.php#L60
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Now, I see that in the end I didn't do it likefields argument.
@xabbuh@javiereguiluz could it be possible to review this PR please? |
I've just found this hidden option and wanted to share, but then realised that this PR already existed to add this. Can I help get this over the line? It looks like the checks are failing because a code block mentions the Doctrine classes that aren't found in this project, perhaps? |
Replace#14458 and#20166
I'm targeting
7.3because i don't know if changes made in7.1are transferred to 7.3. Otherwise, let me know and I'll change it.