From 86a6b3271518742dc39761228687a5107551d279 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Sun, 30 Jul 2023 23:49:11 +0100 Subject: [PATCH] fix: `-v` option --- composer.json | 3 ++- src/Plugins/Verbose.php | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 src/Plugins/Verbose.php diff --git a/composer.json b/composer.json index 2d6f6e85..aba12927 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "require-dev": { "pestphp/pest-dev-tools": "^2.12.0", "pestphp/pest-plugin-type-coverage": "^2.0.0", - "symfony/process": "^6.3.0" + "symfony/process": "^6.3.2" }, "minimum-stability": "dev", "prefer-stable": true, @@ -103,6 +103,7 @@ "Pest\\Plugins\\Profile", "Pest\\Plugins\\Retry", "Pest\\Plugins\\Snapshot", + "Pest\\Plugins\\Verbose", "Pest\\Plugins\\Version", "Pest\\Plugins\\Parallel" ] diff --git a/src/Plugins/Verbose.php b/src/Plugins/Verbose.php new file mode 100644 index 00000000..e37938a3 --- /dev/null +++ b/src/Plugins/Verbose.php @@ -0,0 +1,38 @@ +hasArgument('-'.$level, $arguments)) { + $arguments = $this->popArgument('-'.$level, $arguments); + } + } + + if ($this->hasArgument('--quiet', $arguments)) { + return $this->popArgument('--quiet', $arguments); + } + + return $arguments; + } +}