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

Skip to content

Add visibility context option in PropertyNormalizer #44902

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

Conversation

alamirault
Copy link
Contributor

@alamirault alamirault commented Jan 3, 2022

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

This PR is an attempt to fix #39143 request.
It allows to control which object property visibility we want to normalize. By defaut publuc, protected and private properties are normalized but sometime only public are enough

if it's ok for you, I will create PR for docs

@alamirault alamirault requested a review from dunglas as a code owner January 3, 2022 20:39
@carsonbot carsonbot added this to the 6.1 milestone Jan 3, 2022
@alamirault alamirault changed the title Add visibility context option in PropertyNormalizer [Serializer] Add visibility context option in PropertyNormalizer Jan 3, 2022
@carsonbot
Copy link

Hey!

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

Cheers!

Carsonbot

@carsonbot carsonbot changed the title [Serializer] Add visibility context option in PropertyNormalizer Add visibility context option in PropertyNormalizer May 10, 2022
@fabpot fabpot modified the milestones: 6.1, 6.2 May 20, 2022
@alamirault
Copy link
Contributor Author

alamirault commented Jun 7, 2022

@mtarld I made changes and add more flexibility

@christian-kolb
Copy link

@alamirault That's an awesome addition I would love to have as part of the property normalizer.
I found a typo in your changes, but unfortunately hit the wrong button, my bad.
Is there anything I could do to help this PR getting done? 🙂

@alamirault alamirault force-pushed the property-normalizer-visibility-options branch from a236feb to d21315e Compare June 28, 2022 17:26
@alamirault
Copy link
Contributor Author

We need core member review. Maybe @dunglas ?

(Failed tests are not related)

@fabpot
Copy link
Member

fabpot commented Jul 22, 2022

Thank you @alamirault.

@fabpot fabpot force-pushed the property-normalizer-visibility-options branch from d21315e to 8997aee Compare July 22, 2022 08:32
@fabpot fabpot merged commit ac87122 into symfony:6.2 Jul 22, 2022
@alamirault alamirault deleted the property-normalizer-visibility-options branch August 7, 2022 17:21
@fabpot fabpot mentioned this pull request Oct 24, 2022
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.

[Serializer] Configuration to ignore getters in ObjectNormalizer
5 participants