Download the PHP package ojezu/add-call-to-remote-service-bundle without Composer
On this page you can find all versions of the php package ojezu/add-call-to-remote-service-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ojezu/add-call-to-remote-service-bundle
More information about ojezu/add-call-to-remote-service-bundle
Files in ojezu/add-call-to-remote-service-bundle
Package add-call-to-remote-service-bundle
Short Description Symfony2 bundle that allows injecting method from one service declaration in DI to another
License MIT
Informations about the package add-call-to-remote-service-bundle
OJezu/AddCallToRemoteServiceBundle
This bundle allows adding calls in container to other services, as though they were declared there. Allows some decoupling - the hottest thing in OOP.
Symfony 3.4 and 4.0 Note
As of version 3.4 and 4.0 of Symfony, Dependency Injector is able to find all tagged services on its own:
http://symfony.com/doc/current/service_container/tags.html#reference-tagged-services
This Bundle still works, and can be useful in some cases, e.g. when it's impossible to overwrite or modify declaration of the "parent" class.
Installation
Usage
Register this bundle in app/appKernel.php:
Now, instead of:
You can do this!
'@'
will resolve to acme.children.foo
and acme.children.bar
respectively!
Questions
Why argument.0
, argument.1
, argument.2.foo
and not an array?
Symfony/DependencyInjector does not support that. All tag attributes must be scalars, because of XML format supported and used internally by DependencyInjector.
Will this load my services when they are unneeded?
No! This bundle modifies only definitions of services in container, it does not need to (and does not) load referenced services.
License
MIT
All versions of add-call-to-remote-service-bundle with dependencies
symfony/http-kernel Version ^3.0 || ^2.7
symfony/property-access Version ^3.0 || ^2.7