Added cached Instantiator to be used in production instead of the Runtime version

Runtime Instantiator is dangerous to be used in Production, and you probably should not need to code your own implementation of a cached one everytime you need to use Lazy Loading. Solution, use this one instead.

Original solution by Dries Vanlerberghe.
Code sponsored by Capgemini.
:-D
On 29 Jun 2014 21:28, "Jakub Zalas" <notifications@github.com> wrote:

> In
> src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/CachedInstantiator.php:
>
> > +use ProxyManager\Configuration;
> > +use ProxyManager\Factory\LazyLoadingValueHolderFactory;
> > +use ProxyManager\FileLocator\FileLocator;
> > +use ProxyManager\GeneratorStrategy\FileWriterGeneratorStrategy;
> > +use ProxyManager\Proxy\LazyLoadingInterface;
> > +use Symfony\Component\DependencyInjection\ContainerInterface;
> > +use Symfony\Component\DependencyInjection\Definition;
> > +use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\InstantiatorInterface;
> > +
> > +/**
> > + * Lazy loading proxy generator (Using cached Proxy to improve performance).
> > + */
> > +class CachedInstantiator implements InstantiatorInterface
> > +{
> > +    /**
> > +     * @var \ProxyManager\Factory\LazyLoadingValueHolderFactory
>
> Actually, the use statement is already there ;)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/symfony/symfony/pull/11245/files#r14331334>.
>