8000 [DependencyInjection] add $lazyLoad context to the generated code for lazy non-shared service by PhpDumper by XuruDragon · Pull Request #30093 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DependencyInjection] add $lazyLoad context to the generated code for lazy non-shared service by PhpDumper #30093

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
merged 1 commit into from
Feb 8, 2019

Conversation

XuruDragon
Copy link
Q A
Branch? 4.1
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #29930
License MIT
Doc PR n/a

Fix #29930 by adding $lazyLoad context to the generated code for lazy non-shared service by PhpDumper

@nicolas-grekas
Copy link
Member

Nice. Could you please add a test case with a fixture in PhpDumperTest.php please (see calls to assertStringEqualsFile for inspiration)

@nicolas-grekas nicolas-grekas added this to the 4.2 milestone Feb 6, 2019
@nicolas-grekas
Copy link
Member

Please rebase for 4.2 also as 4.1 is EOLed.

@XuruDragon
Copy link
Author

Nice. Could you please add a test case with a fixture in PhpDumperTest.php please (see calls to assertStringEqualsFile for inspiration)

I'll add it

@XuruDragon XuruDragon force-pushed the issue-29930 branch 3 times, most recently from 37917d9 to 5c84edf Compare February 6, 2019 17:36
@XuruDragon XuruDragon changed the base branch from 4.1 to 4.2 February 7, 2019 12:23
@XuruDragon XuruDragon force-pushed the issue-29930 branch 5 times, most recently from 98575cc to a16f92d Compare February 7, 2019 17:27
Copy link
Member
@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

small tweak

@nicolas-grekas
Copy link
Member

Another tweak: in PhpDumper on L690:
$factoryCode = $asFile ? ($definition->isShared() ? "\$this->load('%s.php', false)" : "\$this->factories['%s'](false)") : '$this->%s(false)';

@XuruDragon XuruDragon force-pushed the issue-29930 branch 2 times, most recently from c156d03 to df8dd1d Compare February 7, 2019 18:02
…erated factory code for lazy non-shared services

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | symfony#29930
| License       | MIT
| Doc PR        | n/a

Fix symfony#29930  by adding $lazyLoad context to the generated code for lazy non-shared service by PhpDumper
@nicolas-grekas
Copy link
Member

Thank you @XuruDragon.

@nicolas-grekas nicolas-grekas merged commit 98d4dfd into symfony:4.2 Feb 8, 2019
nicolas-grekas added a commit that referenced this pull request Feb 8, 2019
…ed code for lazy non-shared service by PhpDumper (XuruDragon)

This PR was merged into the 4.2 branch.

Discussion
----------

[DependencyInjection] add $lazyLoad context to the generated code for lazy non-shared service by PhpDumper

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29930
| License       | MIT
| Doc PR        | n/a

Fix #29930  by adding $lazyLoad context to the generated code for lazy non-shared service by PhpDumper

Commits
-------

98d4dfd [DependencyInjection] fix #29930 add $lazyLoad flag to the generated factory code for lazy non-shared services
@XuruDragon XuruDragon deleted the issue-29930 branch February 8, 2019 12:32
@fabpot fabpot mentioned this pull request Mar 3, 2019
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.

3 participants
0