8000 [Validator] Sequence constraint can not be applied onto class as an attribute · Issue #44531 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Validator] Sequence constraint can not be applied onto class as an attribute #44531

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sidz opened this issue Dec 9, 2021 · 0 comments
Closed

Comments

@sidz
Copy link
Contributor
sidz commented Dec 9, 2021

Symfony version(s) affected

5.4 \ 6.0

Description

Sequence constraint can not be applied onto class as an attribute.

How to reproduce

<?php

#[Assert\Sequence([
    new NotBlank()
])]
class SomeClass {
}

Possible Solution

No response

Additional Context

More details in PR: #44448

@sidz sidz added the Bug label Dec 9, 2021
nicolas-grekas added a commit that referenced this issue Dec 15, 2021
…lass as an attribute (sidz)

This PR was squashed before being merged into the 5.4 branch.

Discussion
----------

[Validator] Allow Sequence constraint to be applied onto class as an attribute

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | #44531
| License       | MIT
| Doc PR        | N/A

This PR allows to apply `Sequentially` constraint as an attribute onto class target.

Looks like it was missed on translating annotations to attributes.

![image](https://user-images.githubusercontent.com/1302230/144623891-98bde6b2-2376-4ac0-93fc-58b43a0b0f94.png)
![image](https://user-images.githubusercontent.com/1302230/144623958-7d5fe384-771a-4711-8c28-0e9bddfc4c41.png)

Commits
-------

8c1e746 [Validator] Allow Sequence constraint to be applied onto class as an attribute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0