From 4005ff4d32972121fde11a2323a7d52fd7fbc490 Mon Sep 17 00:00:00 2001 From: Robert Goldsmith Date: Wed, 9 Aug 2017 17:27:17 +0100 Subject: [PATCH] Fix a precedence issue whee supplying your own ConfigLoader to the BasicResolver resulted in a WindowsConfigLoader being instantiated instead. --- lib/BasicResolver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/BasicResolver.php b/lib/BasicResolver.php index 901094a..7cdb9e3 100644 --- a/lib/BasicResolver.php +++ b/lib/BasicResolver.php @@ -49,9 +49,9 @@ final class BasicResolver implements Resolver { public function __construct(Cache $cache = null, ConfigLoader $configLoader = null) { $this->cache = $cache ?? new ArrayCache; - $this->configLoader = $configLoader ?? \stripos(PHP_OS, "win") === 0 + $this->configLoader = $configLoader ?? (\stripos(PHP_OS, "win") === 0 ? new WindowsConfigLoader - : new UnixConfigLoader; + : new UnixConfigLoader); $this->questionFactory = new QuestionFactory;