From 910416eedb3b7325ff42330ae78333c955737fbd Mon Sep 17 00:00:00 2001 From: Dariusz Ruminski Date: Wed, 26 Oct 2022 21:52:36 +0200 Subject: [PATCH] DX: drop deprecated BashScriptExecutor --- src/BashScriptExecutor.php | 50 -------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 src/BashScriptExecutor.php diff --git a/src/BashScriptExecutor.php b/src/BashScriptExecutor.php deleted file mode 100644 index 6fd344b..0000000 --- a/src/BashScriptExecutor.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Keradus\CliExecutor; - -/** - * @deprecated, use `\Keradus\CliExecutor\ScriptExecutor` instead - */ -final class BashScriptExecutor -{ - /** - * @var ScriptExecutor - */ - private $scriptExecutor; - - /** - * @param string[] $scriptParts - */ - public function __construct(array $scriptParts, string $cwd) - { - @trigger_error('`\Keradus\CliExecutor\BashScriptExecutor` is deprecated, use `\Keradus\CliExecutor\ScriptExecutor` instead.', E_USER_DEPRECATED); - $this->scriptExecutor = new ScriptExecutor($scriptParts, $cwd, ['#!/usr/bin/env bash', 'set -e', '']); - } - - /** - * @param string[] $scriptParts - */ - public static function create(array $scriptParts, string $cwd): self - { - return new self($scriptParts, $cwd); - } - - /** - * @throws ExecutionException - */ - public function getResult(): CliResult - { - return $this->scriptExecutor->getResult(); - } -}