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

[DependencyInjection] Fix cloned lazy services not sharing their dependencies when dumped with PhpDumper#59723

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

Conversation

pvandommelen
Copy link
Contributor

QA
Branch?6.4
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix#59706
LicenseMIT

Fixes referenced services not being shared when lazy services are cloned before being initialized. Adds tests for both the ghost and proxy scenario's.

This makes the inlining behaviour more conservative, which impacts the outputs of some other test cases.

First commit adds a test, second commit has the fix. Third commit also considers the proxy case, which is also affected. I can squash if necessary.

Targeted 6.4, but this also applies to 7.x.

@pvandommelenpvandommelenforce-pushed theshare_lazy_service_dependency branch 3 times, most recently fromcba91d9 to9ea5995CompareFebruary 7, 2025 14:25
@pvandommelen
Copy link
ContributorAuthor

Updated. I don't think the failing tests are related.

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment
edited
Loading

Choose a reason for hiding this comment

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

LGTM thanks, just some CS tweaks needed.

@pvandommelen
Copy link
ContributorAuthor

Resolved style comments

@nicolas-grekas
Copy link
Member

Note that when using native proxies, cloning will trigger initialization.
You should not rely on the current behavior when cloning.

(The patch is still fixing a valid concern since we're not coupled to one implementation)

@nicolas-grekasnicolas-grekasforce-pushed theshare_lazy_service_dependency branch fromc93c0d5 toa60cff5CompareFebruary 10, 2025 08:06
@nicolas-grekas
Copy link
Member

Thank you@pvandommelen.

@nicolas-grekasnicolas-grekas merged commit0247b1b intosymfony:6.4Feb 10, 2025
8 of 9 checks passed
@pvandommelenpvandommelen deleted the share_lazy_service_dependency branchFebruary 10, 2025 08:08
@pvandommelen
Copy link
ContributorAuthor

Thanks for the quick reviews!

This was referencedFeb 26, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@stofstofstof left review comments

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@GromNaNGromNaNGromNaN approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

5 participants
@pvandommelen@nicolas-grekas@GromNaN@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp