From 2427e5b434c8936b2f5238dee4cdce6875ddb9f9 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Tue, 24 Oct 2023 17:07:35 +0300 Subject: [PATCH] Adding composer deps; Better PHPStan support --- .gitignore | 1 + composer.json | 3 ++- deploy.inc.php | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6e92f57 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +tags diff --git a/composer.json b/composer.json index 6fbc21f..2abcb19 100644 --- a/composer.json +++ b/composer.json @@ -5,9 +5,10 @@ "require": { "php": ">=7.4", "amphp/amp" : "~v2.6.2", + "amphp/process" : "~v1.1.4", "phpseclib/phpseclib" : "~2.0.30" }, "autoload": { "classmap": ["deploy.inc.php"] } - } \ No newline at end of file + } diff --git a/deploy.inc.php b/deploy.inc.php index 65e373f..13ca427 100644 --- a/deploy.inc.php +++ b/deploy.inc.php @@ -1,6 +1,8 @@ getExitStatus(); + // @phpstan-ignore-next-line if($res === false) throw new Exception("Fatal error executing($status): $cmd"); if(($opts & DEPLOY_OPT_ERR_OK) == 0 && $status !== 0)