From 93238f74ff5964aee27a78508cdfbdba1cd338f6 Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Mon, 18 May 2020 09:20:23 +0100 Subject: [PATCH] Respect flag when resolving tagged definitions --- CHANGELOG.md | 5 +++++ src/Container.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0beaaaa..e68ece8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All Notable changes to `League\Container` will be documented in this file +## 3.3.1 + +### Fixed +- Respect `$new` argument when getting tagged definitions. + ## 3.3.0 ### Added diff --git a/src/Container.php b/src/Container.php index 4fe87a5..cca5fb0 100644 --- a/src/Container.php +++ b/src/Container.php @@ -159,7 +159,7 @@ public function get($id, bool $new = false) } if ($this->definitions->hasTag($id)) { - $arrayOf = $this->definitions->resolveTagged($id); + $arrayOf = $this->definitions->resolveTagged($id, $new); array_walk($arrayOf, function (&$resolved) { $resolved = $this->inflectors->inflect($resolved);