Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Serializer] [Normalizer] Add to context current class / attribute name for a denormalized object#47182

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

Open
chadyred wants to merge1 commit intosymfony:7.4
base:7.4
Choose a base branch
Loading
fromchadyred:patch-3

Conversation

chadyred
Copy link
Contributor

@chadyredchadyred commentedAug 4, 2022
edited
Loading

QA
Branch?6.2
Bug fix?no
New feature?no
Deprecations?no
Tickets-
LicenseMIT
Doc PR-

Hello,

A simple PR which is simple but useful for solving everything related to the current class and the attribute such as the information in the DocBlock, and in particular, on the generic types powered by PhpStan for an attribute which required more advanced information on its typing (and according to the data received).

For instance :

A ClassFoo is triggered for denormalization --> The type of the attribute to denormalize ismixed BUT with aDocBlock node like@var GenericTypeA<GenericTypeB<Union|Type|null>>. Thus, to resolve the type used at the end of the chain, having the current attribute and the current class helps a lot, especially with another extractor or a piece of homemade code, it is really useful to retrieve information about the class by reflexivity for example through the combinationcurrentClassName:currentAttributeName

…me for a denormalized objectUseful for solving everything related to the current class and the attribute such as the information in the DocBlock, and in particular, on the generic types powered by PhpStan for an attribute which required more advanced information on its typing (and according to the data received).For instance :A ClassFoo is triggered for denormalization --> The type of the attribute to denormalize is `mixed` BUT with a `DocBlock` node like `@var GenericTypeA<GenericTypeB<Union|Type|null>>`. Thus, to resolve the type used at the end of the chain, having the current attribute and the current class helps a lot, especially with another extractor or a piece of homemade code, it is really useful to retrieve information about the class by reflexivity for example through the combination `currentClassName:currentAttributeName`
@chadyredchadyred changed the titleAdd to context current class / attribute name for a denormalized object[Serializer] [Normalizer] Add to context current class / attribute name for a denormalized objectAug 4, 2022
@carsonbot
Copy link

Hey!

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

Cheers!

Carsonbot

@nicolas-grekasnicolas-grekas modified the milestones:6.2,6.3Nov 5, 2022
@nicolas-grekasnicolas-grekas modified the milestones:6.3,6.4May 23, 2023
@nicolas-grekasnicolas-grekas modified the milestones:6.4,7.1Nov 15, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@dunglasdunglasAwaiting requested review from dunglasdunglas is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

3 participants
@chadyred@carsonbot@nicolas-grekas

[8]ページ先頭

©2009-2025 Movatter.jp