From 656346bd045c4488f5ed21139503d93e3c198355 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 13 Feb 2021 17:48:03 +0100 Subject: [PATCH] Ensured mezzio-swoole config provider is dynamically loaded --- config/config.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/config.php b/config/config.php index cf9eb86b..2b562874 100644 --- a/config/config.php +++ b/config/config.php @@ -8,14 +8,16 @@ use Laminas\ConfigAggregator; use Laminas\Diactoros; use Mezzio; use Mezzio\ProblemDetails; +use Mezzio\Swoole\ConfigProvider as SwooleConfigProvider; +use function class_exists; use function Shlinkio\Shlink\Common\env; return (new ConfigAggregator\ConfigAggregator([ Mezzio\ConfigProvider::class, Mezzio\Router\ConfigProvider::class, Mezzio\Router\FastRouteRouter\ConfigProvider::class, - Mezzio\Swoole\ConfigProvider::class, + class_exists(SwooleConfigProvider::class) ? SwooleConfigProvider::class : new ConfigAggregator\ArrayProvider([]), ProblemDetails\ConfigProvider::class, Diactoros\ConfigProvider::class, Common\ConfigProvider::class,