From 7d480517f169fc255d97261fcac34b819e766972 Mon Sep 17 00:00:00 2001 From: Igor Finagin Date: Wed, 27 Oct 2021 00:53:24 +0300 Subject: [PATCH 1/2] [2.x] Can't get value of snake case variables Resolve #231 Usage both of camel and snake case variables. --- src/Console/RunCommand.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Console/RunCommand.php b/src/Console/RunCommand.php index f837bc0..9d61a14 100644 --- a/src/Console/RunCommand.php +++ b/src/Console/RunCommand.php @@ -277,7 +277,10 @@ protected function getOptions() $option[1] = true; } - $options[Str::camel($option[0])] = $option[1]; + $optionKey = $option[0]; + + $options[Str::camel($optionKey)] = $option[1]; + $options[Str::snake($optionKey)] = $option[1]; } return $options; From f9024ae04501178cfa6957a3b2c4f2c767736131 Mon Sep 17 00:00:00 2001 From: Igor Finagin Date: Wed, 27 Oct 2021 00:57:51 +0300 Subject: [PATCH 2/2] [2.x] Can't get value of snake case variables --- src/Console/RunCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Console/RunCommand.php b/src/Console/RunCommand.php index 9d61a14..f2fd321 100644 --- a/src/Console/RunCommand.php +++ b/src/Console/RunCommand.php @@ -278,7 +278,7 @@ protected function getOptions() } $optionKey = $option[0]; - + $options[Str::camel($optionKey)] = $option[1]; $options[Str::snake($optionKey)] = $option[1]; }