Closed gregurco closed 6 years ago
For now we create service per each client and all these clients are not lazy. This functionality appeared in Symfony 2.3: http://symfony.com/doc/master/service_container/lazy_services.html
So, I propose to add option to define client (and the service as a result) lazy.
eight_points_guzzle: # (de)activate logging/profiler; default: %kernel.debug% logging: true clients: api_payment: base_url: "http://api.domain.tld" lazy: true # default: false
In this case client service will be instantiated as ProxyClass and Client class will be instantiated when it will be called. In some cases it can reduce the memory consumption and give more options to users of bundle.
For now we create service per each client and all these clients are not lazy. This functionality appeared in Symfony 2.3: http://symfony.com/doc/master/service_container/lazy_services.html
So, I propose to add option to define client (and the service as a result) lazy.
In this case client service will be instantiated as ProxyClass and Client class will be instantiated when it will be called. In some cases it can reduce the memory consumption and give more options to users of bundle.