Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[FrameworkBundle] Skip auto-validation for empty auto_mapping #44698

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
wants to merge 3 commits into from
Closed

[FrameworkBundle] Skip auto-validation for empty auto_mapping #44698

wants to merge 3 commits into from

Conversation

ro0NL
Copy link
Contributor

@ro0NL ro0NL commented Dec 18, 2021

Q A
Branch? 6.1
Bug fix? yes/no
New feature? yes/no
Deprecations? no
Tickets Fix #44693
License MIT
Doc PR symfony/symfony-docs#...

I can confirm this fixes the issue on our side at 4.4.

I created this PR mostly to see what tests do on your side. 🤞 I'm not planning to digest this feature any further :)

I let you decide as of which branch to disable auto-validation ;)

@carsonbot
Copy link

Hey!

I think @jschaedl has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

Copy link
Contributor

@ogizanagi ogizanagi left a comment

Choose a reason for hiding this comment

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

Sorry, can't dig much right now, but, with this patch, would:

framework:
    validation:
        auto_mapping: []

still allow enabling auto mapping per-case by adding the @Assert\EnableAutoMapping annotation/attribute ?

And would

framework:
    validation:
        auto_mapping:
            App\Entity\: []

still auto validate App\Entity\ ns while requiring to add @Assert\EnableAutoMapping for the other ns?

IIRC, this would be the expected behavior.

…pingConfigurationPass.php

Co-authored-by: Maxime Steinhausser <[email protected]>
@ro0NL
Copy link
Contributor Author

ro0NL commented Dec 21, 2021

still allow enabling auto mapping per-case by adding the @Assert\EnableAutoMapping annotation/attribute ?

yeah, no 😭 What bugs me more at this point is why nobody is noticing. That includes me now.

@ro0NL ro0NL closed this Dec 21, 2021
@ro0NL ro0NL deleted the patch-1 branch December 21, 2021 10:39
@alanpoulain
Copy link
Contributor

Probably related? I had this kind of issue a long time ago...
#32278
doctrine/DoctrineBundle#988

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.

[FrameworkBundle] validator.auto_mapping always applies something
4 participants