We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When you are altering a service you sometimes need to use args of the original service.
An implementation should be quite easy, so a syntax is the only question.
maybe sth like this:
services: application.presenterFactory: factory: App\TestPresenterFactory(%self.factory%) alteration: yes
what do you think? Any better ideas?
The text was updated successfully, but these errors were encountered:
Or this can keep original arguments:
services: application.presenterFactory: factory: App\TestPresenterFactory alteration: yes
Sorry, something went wrong.
Or this can keep original arguments: services: application.presenterFactory: factory: App\TestPresenterFactory alteration: yes
Should this keep the original arguments now?
The docs look like it should – they do not say the arguments are removed, only that they can be removed via reset. (https://doc.nette.org/cs/3.0/di-services#toc-modifikace-sluzeb, https://doc.nette.org/en/3.0/di-services#toc-modification-of-services).
But the code resets the arguments, when new factory/create is specified (
di/src/DI/Extensions/ServicesExtension.php
Line 89 in 086748f
di/src/DI/Definitions/ServiceDefinition.php
Line 74 in 038da8e
What is the intended (default) behavior – reset or keep?
No branches or pull requests
When you are altering a service you sometimes need to use args of the original service.
An implementation should be quite easy, so a syntax is the only question.
maybe sth like this:
what do you think? Any better ideas?
The text was updated successfully, but these errors were encountered: