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 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 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/src/pocketmine/network/mcpe/NetworkBinaryStream.php b/src/pocketmine/network/mcpe/NetworkBinaryStream.php index 5b87a2d26..0c4cdd563 100644 --- a/src/pocketmine/network/mcpe/NetworkBinaryStream.php +++ b/src/pocketmine/network/mcpe/NetworkBinaryStream.php @@ -437,7 +437,7 @@ class NetworkBinaryStream extends BinaryStream{ } /** - * Writes an EntityUniqueID + * Writes an EntityRuntimeID * * @param int $eid */ 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 @@ +