From 5db8b8233c1e895645c5a44472c90681d5caca35 Mon Sep 17 00:00:00 2001 From: maks feltrin Date: Thu, 19 May 2016 13:45:34 +0200 Subject: [PATCH 1/2] pimple protect factory storing object having a callable `__invoke()` method requires using Pimple::protect()....forgot this in my previous commit. --- src/ExpressiveInstaller/Resources/config/container-pimple.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ExpressiveInstaller/Resources/config/container-pimple.php b/src/ExpressiveInstaller/Resources/config/container-pimple.php index 628d020..bd7a597 100644 --- a/src/ExpressiveInstaller/Resources/config/container-pimple.php +++ b/src/ExpressiveInstaller/Resources/config/container-pimple.php @@ -18,7 +18,7 @@ $factory = $c->get($object); } else { $factory = new $object(); - $c[$object] = $factory; + $c[$object] = $c->protect($factory); } return $factory($c, $name); From b900f77d499bca3d40ac2d63121f077bd5fe1d32 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Thu, 1 Sep 2016 08:52:26 -0500 Subject: [PATCH 2/2] Added CHANGELOG for #91 --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73ad462..83bf852 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,9 @@ All notable changes to this project will be documented in this file, in reverse ### Fixed -- Nothing. +- [#91](https://github.com/zendframework/zend-expressive-skeleton/pull/91) fixes + the Pimple factory caching to work correctly with invokable classes used as + factories. ## 1.0.2 - 2016-04-21