From 4db38ee45201ed9fb9bf0eb1ecb5007e64b40ca9 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 8 Jan 2024 16:20:42 +0000 Subject: [PATCH] Updated PHPStan --- build/server-phar.php | 12 +++++++++++- composer.json | 2 +- composer.lock | 12 ++++++------ 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/build/server-phar.php b/build/server-phar.php index 0665c89d5..8b4d410ce 100644 --- a/build/server-phar.php +++ b/build/server-phar.php @@ -32,6 +32,7 @@ use function getcwd; use function getopt; use function implode; use function ini_get; +use function is_string; use function microtime; use function preg_quote; use function realpath; @@ -147,8 +148,17 @@ function main() : void{ }else{ $build = 0; } + if(isset($opts["out"])){ + if(!is_string($opts["out"])){ + echo "--out cannot be specified multiple times" . PHP_EOL; + exit(1); + } + $pharPath = $opts["out"]; + }else{ + $pharPath = getcwd() . DIRECTORY_SEPARATOR . "PocketMine-MP.phar"; + } foreach(buildPhar( - $opts["out"] ?? getcwd() . DIRECTORY_SEPARATOR . "PocketMine-MP.phar", + $pharPath, dirname(__DIR__) . DIRECTORY_SEPARATOR, [ 'resources', diff --git a/composer.json b/composer.json index bcec3a72b..953f06931 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "symfony/filesystem": "~6.4.0" }, "require-dev": { - "phpstan/phpstan": "1.10.50", + "phpstan/phpstan": "1.10.55", "phpstan/phpstan-phpunit": "^1.1.0", "phpstan/phpstan-strict-rules": "^1.2.0", "phpunit/phpunit": "~10.3.0 || ~10.2.0 || ~10.1.0" diff --git a/composer.lock b/composer.lock index 24d36cd5f..0a2539521 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "894648a63ed7cd84303937208d1684af", + "content-hash": "d7a3fceea557add1b8cb461554db1ee7", "packages": [ { "name": "adhocore/json-comment", @@ -1380,16 +1380,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.50", + "version": "1.10.55", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "06a98513ac72c03e8366b5a0cb00750b487032e4" + "reference": "9a88f9d18ddf4cf54c922fbeac16c4cb164c5949" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/06a98513ac72c03e8366b5a0cb00750b487032e4", - "reference": "06a98513ac72c03e8366b5a0cb00750b487032e4", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9a88f9d18ddf4cf54c922fbeac16c4cb164c5949", + "reference": "9a88f9d18ddf4cf54c922fbeac16c4cb164c5949", "shasum": "" }, "require": { @@ -1438,7 +1438,7 @@ "type": "tidelift" } ], - "time": "2023-12-13T10:59:42+00:00" + "time": "2024-01-08T12:32:40+00:00" }, { "name": "phpstan/phpstan-phpunit",