Mautic Community Forums

Supporty Symfony lazy services

My idea is: While updating the developer docs, I found that Mautic supports defining a service as lazy however Symfony’s ProxyManager Bridge is required or the service is instantiated as normal. See Lazy Services (Symfony 4.4 Docs). It doesn’t look like symfony/proxy-manager-bridge is included in composer.json or and no other dependency is pulling it in searching composer.lock.

I think these groups of people would benefit from this idea: Developers

Why I think they would benefit from this idea: Some services are expensive to “boot” yet only used in specific circumstances. Configuring lazy services could add some performance by creating proxy classes that wrap around the service and “boot” when actually used.

Any code or resources to support this idea: see Lazy Services (Symfony 4.4 Docs)

Are you willing to work on this idea?: I’m unable to at this time.

What skills and resources do you need to explore this further? A developer to include the ProxyManager bridge as a vendor and test lazy loading a service.