Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
$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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Oops, fixed in29054b1
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 is
current([$foo])
.Let's optimize out such calls.