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

[VarExporter] Add Hydrator::hydrate() and preserve PHP references when using it#46452

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

Merged
nicolas-grekas merged 1 commit intosymfony:6.2fromnicolas-grekas:ve-hydrator
May 27, 2022

Conversation

@nicolas-grekas
Copy link
Member

@nicolas-grekasnicolas-grekas commentedMay 24, 2022
edited
Loading

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

To make it easy to hydrate already created objects (usually created without calling the constructor.)

  • AddHydrator::hydrate()
  • Preserve PHP references also when usingHydrator::hydrate() orInstantiator::instantiate()
  • Add support for hydrating from native (array) casts

@carsonbotcarsonbot added this to the6.2 milestoneMay 24, 2022
@carsonbotcarsonbot changed the title[DependencyInjection][ProxyManager] Use lazy-loading ghost object proxies when possible[DependencyInjection] [ProxyManager] Use lazy-loading ghost object proxies when possibleMay 24, 2022
@nicolas-grekasnicolas-grekas changed the title[DependencyInjection] [ProxyManager] Use lazy-loading ghost object proxies when possible[VarExporter] Add Hydrator::hydrate() and preserve PHP references when using itMay 25, 2022
@nicolas-grekas
Copy link
MemberAuthor

Does the psalm failure make sense to anyone?

@stof
Copy link
Member

This error is because Psalm sees the returned value as being of typeobject, and not as being of typeT (it fails to see that the instantiation bypassing the constructor actually produces an instance of the class name passed as argument). Given the magic happening in that instantiation, I would say that this is totally fine (and won't be reported for next PRs, as our CI only reportsnew issues detecting by psalm, not all of them)

nicolas-grekas reacted with thumbs up emoji

@nicolas-grekasnicolas-grekasforce-pushed theve-hydrator branch 3 times, most recently froma7fe0e4 toef25192CompareMay 27, 2022 09:11
@nicolas-grekas
Copy link
MemberAuthor

/cc @symfony/mergers this PR is ready and blocking#46458 if you have some time for a review 🙏

@carsonbotcarsonbot changed the title[VarExporter] Add Hydrator::hydrate() and preserve PHP references when using it[DependencyInjection] Add Hydrator::hydrate() and preserve PHP references when using itMay 27, 2022
@nicolas-grekasnicolas-grekas merged commit6cd0da0 intosymfony:6.2May 27, 2022
@nicolas-grekasnicolas-grekas deleted the ve-hydrator branchMay 27, 2022 13:01
@lyrixx
Copy link
Member

Why does Carson bot changed the title? This is wrong to me

@Nyholm
Copy link
Member

Carson listens to "updates" on the PR. It names the title according to the (grey) labels.

When this PR was merged, Nicolas did a push ("update").

lyrixx reacted with thumbs up emoji

@carsonbotcarsonbot changed the title[DependencyInjection] Add Hydrator::hydrate() and preserve PHP references when using it[VarExporter] Add Hydrator::hydrate() and preserve PHP references when using itMay 29, 2022
@nicolas-grekas
Copy link
MemberAuthor

Labels updated

@fabpotfabpot mentioned this pull requestOct 24, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@OskarStarkOskarStarkOskarStark left review comments

@stofstofstof approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

6.2

Development

Successfully merging this pull request may close these issues.

6 participants

@nicolas-grekas@stof@lyrixx@Nyholm@OskarStark@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp