Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[DependencyInjection] Allow autoconfigured calls in PHP #9659

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

Closed
javiereguiluz opened this issue Apr 22, 2018 · 3 comments
Closed

[DependencyInjection] Allow autoconfigured calls in PHP #9659

javiereguiluz opened this issue Apr 22, 2018 · 3 comments

Comments

@javiereguiluz
Copy link
Member

symfony/symfony#26768

You can now call PHP methods when using registerForAutoconfiguration():

$container->registerForAutoconfiguration(LoggerAwareInterface::class)
    ->addMethodCall('setLogger', array(new Reference(LoggerInterface::class)));
@carsonbot
Copy link
Collaborator

Thank you for this issue.
There has not been a lot of activity here for a while. Has this been resolved?

@carsonbot
Copy link
Collaborator

Could I get an answer? If I do not hear anything I will assume this issue is resolved or abandoned. Please get back to me <3

@javiereguiluz
Copy link
Member Author

Let's close this as "won't fix". We barely have any example using registerForAutoconfiguration() and this new feature is nice because it will just work when some developer tries to use it. It's more about the removal of an artificial shortcoming rather than a new feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants