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] Optimize out "current()" when it's used as service factory#49523

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.3fromnicolas-grekas:di-current
Feb 24, 2023

Conversation

nicolas-grekas
Copy link
Member

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

Sometimes, we need to use the "identity function" as a service factory.
One example is#49513, where we use that to create a "tagged alias".

In PHP, the identity function iscurrent([$foo]).
Let's optimize out such calls.

@carsonbotcarsonbot added this to the6.3 milestoneFeb 24, 2023
@nicolas-grekasnicolas-grekas changed the title[DependencyInjection] Optimize out "current()" when itss used as service factory[DependencyInjection] Optimize out "current()" when it's used as service factoryFeb 24, 2023
$container->compile();
$dumper = new PhpDumper($container);
$dump = $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Service_CurrentFactoryInlining']);
file_put_contents(self::$fixturesPath.'/php/services_current_factory_inlining.php', $dump);
Copy link
Member

Choose a reason for hiding this comment

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

@nicolas-grekas I think this was left here by mistake.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Oops, fixed in29054b1

HypeMC reacted with thumbs up emoji
@nicolas-grekasnicolas-grekas deleted the di-current branchFebruary 24, 2023 23:38
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@HypeMCHypeMCHypeMC left review comments

Assignees
No one assigned
Projects
None yet
Milestone
6.3
Development

Successfully merging this pull request may close these issues.

3 participants
@nicolas-grekas@HypeMC@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp