DASPRiD / container-interop-doctrine

Doctrine factories for container-interop
107 stars 25 forks source link

Pull service from container if available #6

Closed wshafer closed 8 years ago

wshafer commented 8 years ago

Needed a way to pull the the Doctrine Cache from the Service Manager.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.2%) to 26.786% when pulling dceec241cf14bc3d0eb16e75cf54d96e4697cb5f on wshafer:master into f10e0533301bb36e76f57d8a1ca6d3f27d47d13b on DASPRiD:master.

DASPRiD commented 8 years ago

There's no need for this. Just have this entry in your container config:

return [
    'dependencies' => [
        'factories' => [
            'doctrine.cache.orm_default' => \Your\Cache\Factory::class,
        ],
    ],
];
wshafer commented 8 years ago

Perfect. I see it now. Thanks for the heads up.