10000 [DoctrineBridge] Auto-validation must work if no regex are passed by dunglas · Pull Request #33828 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DoctrineBridge] Auto-validation must work if no regex are passed #33828

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

Merged
merged 1 commit into from
Oct 29, 2019

Conversation

dunglas
Copy link
Member
@dunglas dunglas commented Oct 3, 2019
Q A
Branch? 4.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets n/a
License MIT
Doc PR n/a

Backport of https://github.com/symfony/symfony/pull/32107/files#r295762928.
This behavior if faulty, if no regex are passed, autvalidation must be triggered, as done in PropertyInfoLoader.

Copy link
Member
@xabbuh xabbuh left a comment

Choose a reason for hiding this comment

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

We then need to think about what we do with the loader when no regex is configured in the FrameworkBundle. Otherwise, this change would reopen #31743 again (the change reverted here was part of the bugfix in #31749).

@dunglas
Copy link
Member Author
dunglas commented Oct 15, 2019

At least, the behavior must be consistent between PropertyInfoLoader and this one don't you think?

@dunglas
Copy link
Member Author
dunglas commented Oct 15, 2019

The current behavior makes it harder to use this class when using only the component (without framework bundle). I'm favor of patching FrameworkBundle instead.

@xabbuh
Copy link
Member
xabbuh commented Oct 17, 2019

Deregistering the loader service when no regex is configured would solve that, right?

@dunglas
Copy link
Member Author
dunglas commented Oct 17, 2019

Indeed, it’s what I have in mind.

@dunglas dunglas force-pushed the fix-doctrine-loader branch from 5612e7d to b2d05a0 Compare October 28, 2019 21:49
@dunglas
Copy link
Member Author
dunglas commented Oct 28, 2019

@xabbuh implemented, could you check if it's ok for you now?

@dunglas dunglas force-pushed the fix-doctrine-loader branch from b2d05a0 to 5ed7d6c Compare October 29, 2019 10:03
dunglas added a commit that referenced this pull request Oct 29, 2019
… passed (dunglas)

This PR was squashed before being merged into the 4.3 branch (closes #33828).

Discussion
----------

[DoctrineBridge] Auto-validation must work if no regex are passed

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a

Backport of https://github.com/symfony/symfony/pull/32107/files#r295762928.
This behavior if faulty, if no regex are passed, autvalidation must be triggered, [as done in `PropertyInfoLoader`](https://github.com/symfony/symfony/blob/4.3/src/Symfony/Component/Validator/Mapping/Loader/PropertyInfoLoader.php#L50).

Commits
-------

5ed7d6c [DoctrineBridge] Auto-validation must work if no regex are passed
@dunglas dunglas merged commit 5ed7d6c into symfony:4.3 Oct 29, 2019
@dunglas dunglas deleted the fix-doctrine-loader branch October 29, 2019 10:12
@fabpot fabpot mentioned this pull request Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0