From 12cb4b48c926eb361bf2d3d63f910cef6f22dd33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B0=D0=B2=D0=B5=D0=BB?= Date: Wed, 7 Oct 2020 14:50:11 +0300 Subject: [PATCH] case-independent environment --- src/Component/Environment.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Component/Environment.php b/src/Component/Environment.php index 0a21109..e7a0d86 100644 --- a/src/Component/Environment.php +++ b/src/Component/Environment.php @@ -44,6 +44,8 @@ class Environment */ public function __construct(string $value) { + $value = strtoupper($value); + if (!in_array($value, self::AVAILABLE_VALUES)) { throw new InvalidArgumentException(sprintf('Incorrect environment provided: %s', $value)); }