From 95812252d6969c300d18e9dc1c339114c2b75b1c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 6 Nov 2019 22:48:08 +0000 Subject: [PATCH 1/4] NetworkBinaryStream: fix a mistake in doc for putEntityRuntimeId() --- src/pocketmine/network/mcpe/NetworkBinaryStream.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/network/mcpe/NetworkBinaryStream.php b/src/pocketmine/network/mcpe/NetworkBinaryStream.php index ba48a129b..32a3629e9 100644 --- a/src/pocketmine/network/mcpe/NetworkBinaryStream.php +++ b/src/pocketmine/network/mcpe/NetworkBinaryStream.php @@ -378,7 +378,7 @@ class NetworkBinaryStream extends BinaryStream{ } /** - * Writes an EntityUniqueID + * Writes an EntityRuntimeID * * @param int $eid */ From 932418b951684f57a02e8202a0a3a663e1a1b3a1 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 7 Nov 2019 18:22:21 +0000 Subject: [PATCH 2/4] fixing some PHPStan complaints about bootstrap this isn't an ideal fix, but it'll do. --- phpstan.neon | 58 ++--------------------------------- src/pocketmine/PocketMine.php | 4 ++- tests/phpstan/bootstrap.php | 24 +++++++++++++++ 3 files changed, 30 insertions(+), 56 deletions(-) create mode 100644 tests/phpstan/bootstrap.php diff --git a/phpstan.neon b/phpstan.neon index f5178b81c..eeae576fe 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -2,6 +2,9 @@ parameters: level: 1 + autoload_files: + - tests/phpstan/bootstrap.php + - src/pocketmine/PocketMine.php paths: - src reportUnmatchedIgnoredErrors: false #no other way to silence platform-specific non-warnings @@ -10,61 +13,6 @@ parameters: message: "#^pocketmine\\\\Player\\:\\:__construct\\(\\) does not call parent constructor from pocketmine\\\\entity\\\\Human\\.$#" path: src/pocketmine/Player.php - - - message: "#^Function pocketmine\\\\critical_error not found while trying to analyse it \\- autoloading is probably not configured properly\\.$#" - count: 1 - path: src/pocketmine/PocketMine.php - - - - message: "#^Function pocketmine\\\\check_platform_dependencies not found while trying to analyse it \\- autoloading is probably not configured properly\\.$#" - count: 1 - path: src/pocketmine/PocketMine.php - - - - message: "#^Function pocketmine\\\\emit_performance_warnings not found while trying to analyse it \\- autoloading is probably not configured properly\\.$#" - count: 1 - path: src/pocketmine/PocketMine.php - - - - message: "#^Function pocketmine\\\\set_ini_entries not found while trying to analyse it \\- autoloading is probably not configured properly\\.$#" - count: 1 - path: src/pocketmine/PocketMine.php - - - - message: "#^Function pocketmine\\\\server not found while trying to analyse it \\- autoloading is probably not configured properly\\.$#" - count: 1 - path: src/pocketmine/PocketMine.php - - - - message: "#^Function check_platform_dependencies not found\\.$#" - count: 1 - path: src/pocketmine/PocketMine.php - - - - message: "#^Function critical_error not found\\.$#" - count: 6 - path: src/pocketmine/PocketMine.php - - - - message: "#^Function set_ini_entries not found\\.$#" - count: 1 - path: src/pocketmine/PocketMine.php - - - - message: "#^Function emit_performance_warnings not found\\.$#" - count: 1 - path: src/pocketmine/PocketMine.php - - - - message: "#^Function pocketmine\\\\server not found\\.$#" - count: 1 - path: src/pocketmine/PocketMine.php - - - - message: "#^Constant MIN_PHP_VERSION not found\\.$#" - count: 2 - path: src/pocketmine/PocketMine.php - - message: "#^pocketmine\\\\block\\\\[A-Za-z\\d]+\\:\\:__construct\\(\\) does not call parent constructor from pocketmine\\\\block\\\\Block\\.$#" path: src/pocketmine/block diff --git a/src/pocketmine/PocketMine.php b/src/pocketmine/PocketMine.php index bf01d54fa..bf3912e9e 100644 --- a/src/pocketmine/PocketMine.php +++ b/src/pocketmine/PocketMine.php @@ -291,5 +291,7 @@ namespace pocketmine { exit($exitCode); } - \pocketmine\server(); + if(!defined('pocketmine\_PHPSTAN_ANALYSIS')){ + \pocketmine\server(); + } } diff --git a/tests/phpstan/bootstrap.php b/tests/phpstan/bootstrap.php new file mode 100644 index 000000000..10b2da0fc --- /dev/null +++ b/tests/phpstan/bootstrap.php @@ -0,0 +1,24 @@ + Date: Sat, 9 Nov 2019 17:33:25 +0000 Subject: [PATCH 3/4] updated build/php submodule --- build/php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/php b/build/php index 8666ae5ad..185d74199 160000 --- a/build/php +++ b/build/php @@ -1 +1 @@ -Subproject commit 8666ae5add7a8b5213d68b491ebf0de211998cc9 +Subproject commit 185d7419914005530298bd5e069449bdf4c0be56 From 025cb73bf5d13af95425998c074322c412ccea8e Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 9 Nov 2019 17:34:04 +0000 Subject: [PATCH 4/4] update travis pthreads --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2525a1f80..dcc2e1298 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ before_script: - echo | pecl install channel://pecl.php.net/yaml-2.0.4 - git clone https://github.com/pmmp/pthreads.git - cd pthreads - - git checkout 6ca019c58b4fa09ee2ff490f2444e34bef0773d0 + - git checkout 1b7da492b944146fa9680f6399bd9c6c6c6095e0 - phpize - ./configure - make