Merge branch 'stable'

This commit is contained in:
Dylan K. Taylor 2021-08-20 23:08:17 +01:00
commit 668df85e3f
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
8 changed files with 95 additions and 92 deletions

View File

@ -1,6 +1,6 @@
{
"name": "pocketmine/pocketmine-mp",
"description": "A server software for Minecraft: Pocket Edition written in PHP",
"description": "A server software for Minecraft: Bedrock Edition written in PHP",
"type": "project",
"homepage": "https://pmmp.io",
"license": "LGPL-3.0",
@ -53,7 +53,7 @@
"webmozart/path-util": "^2.3"
},
"require-dev": {
"phpstan/phpstan": "0.12.92",
"phpstan/phpstan": "0.12.95",
"phpstan/phpstan-phpunit": "^0.12.6",
"phpstan/phpstan-strict-rules": "^0.12.2",
"phpunit/phpunit": "^9.2"

14
composer.lock generated
View File

@ -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": "6aa42d767f14ce036f410d0001fd3845",
"content-hash": "db2d0f1b7626686a7d1d368052ff9a0a",
"packages": [
{
"name": "adhocore/json-comment",
@ -1919,16 +1919,16 @@
},
{
"name": "phpstan/phpstan",
"version": "0.12.92",
"version": "0.12.95",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "64d4c5dc8ea96972bc18432d137a330239a5d2b2"
"reference": "4ffddfe86e85dcc494a47e5f3dcfd1a2dccdce58"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/64d4c5dc8ea96972bc18432d137a330239a5d2b2",
"reference": "64d4c5dc8ea96972bc18432d137a330239a5d2b2",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/4ffddfe86e85dcc494a47e5f3dcfd1a2dccdce58",
"reference": "4ffddfe86e85dcc494a47e5f3dcfd1a2dccdce58",
"shasum": ""
},
"require": {
@ -1959,7 +1959,7 @@
"description": "PHPStan - PHP Static Analysis Tool",
"support": {
"issues": "https://github.com/phpstan/phpstan/issues",
"source": "https://github.com/phpstan/phpstan/tree/0.12.92"
"source": "https://github.com/phpstan/phpstan/tree/0.12.95"
},
"funding": [
{
@ -1979,7 +1979,7 @@
"type": "tidelift"
}
],
"time": "2021-07-10T13:53:49+00:00"
"time": "2021-08-20T12:53:41+00:00"
},
{
"name": "phpstan/phpstan-phpunit",

View File

@ -9,6 +9,7 @@ includes:
- tests/phpstan/configs/phpstan-bugs.neon
- tests/phpstan/configs/pthreads-bugs.neon
- tests/phpstan/configs/runtime-type-checks.neon
- tests/phpstan/configs/spl-fixed-array-sucks.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
- vendor/phpstan/phpstan-strict-rules/rules.neon

View File

@ -237,7 +237,7 @@ class Config{
/**
* Sets the options for the JSON encoding when saving
*
* @return Config $this
* @return $this
* @throws \RuntimeException if the Config is not in JSON
* @see json_encode
*/
@ -254,7 +254,7 @@ class Config{
/**
* Enables the given option in addition to the currently set JSON options
*
* @return Config $this
* @return $this
* @throws \RuntimeException if the Config is not in JSON
* @see json_encode
*/
@ -271,7 +271,7 @@ class Config{
/**
* Disables the given option for the JSON encoding when saving
*
* @return Config $this
* @return $this
* @throws \RuntimeException if the Config is not in JSON
* @see json_encode
*/

View File

@ -1,5 +1,5 @@
@echo off
TITLE PocketMine-MP server software for Minecraft: Pocket Edition
TITLE PocketMine-MP server software for Minecraft: Bedrock Edition
cd /d %~dp0
if exist bin\php\php.exe (

View File

@ -126,7 +126,7 @@ parameters:
path: ../../../src/block/DragonEgg.php
-
message: "#^Parameter \\#2 \\$y of method pocketmine\\\\world\\\\World\\:\\:getBlockAt\\(\\) expects int, float\\|int given\\.$#"
message: "#^Parameter \\#2 \\$y of method pocketmine\\\\world\\\\World\\:\\:getBlockAt\\(\\) expects int, float\\|int\\<0, max\\> given\\.$#"
count: 1
path: ../../../src/block/DragonEgg.php
@ -555,11 +555,6 @@ parameters:
count: 1
path: ../../../src/entity/projectile/Projectile.php
-
message: "#^Parameter \\#1 \\$objectOrClass of class ReflectionClass constructor expects class\\-string\\<T of object\\>\\|T of object, string given\\.$#"
count: 1
path: ../../../src/event/HandlerListManager.php
-
message: "#^Parameter \\#1 \\$json of function json_decode expects string, string\\|false given\\.$#"
count: 1

View File

@ -25,11 +25,6 @@ parameters:
count: 1
path: ../../../src/entity/projectile/Projectile.php
-
message: "#^Parameter \\#1 \\$read of function socket_select expects array\\<resource\\>\\|null, array\\<int, Socket\\> given\\.$#"
count: 1
path: ../../../src/network/query/DedicatedQueryNetworkInterface.php
-
message: "#^Parameter \\#1 \\$ of closure expects TValue, TValue given\\.$#"
count: 2
@ -40,71 +35,6 @@ parameters:
count: 1
path: ../../../src/utils/Promise.php
-
message: "#^Match arm comparison between string and '§3' is always false\\.$#"
count: 1
path: ../../../src/utils/Terminal.php
-
message: "#^Match arm comparison between string and '§4' is always false\\.$#"
count: 1
path: ../../../src/utils/Terminal.php
-
message: "#^Match arm comparison between string and '§5' is always false\\.$#"
count: 1
path: ../../../src/utils/Terminal.php
-
message: "#^Match arm comparison between string and '§6' is always false\\.$#"
count: 1
path: ../../../src/utils/Terminal.php
-
message: "#^Match arm comparison between string and '§7' is always false\\.$#"
count: 1
path: ../../../src/utils/Terminal.php
-
message: "#^Match arm comparison between string and '§8' is always false\\.$#"
count: 1
path: ../../../src/utils/Terminal.php
-
message: "#^Match arm comparison between string and '§9' is always false\\.$#"
count: 1
path: ../../../src/utils/Terminal.php
-
message: "#^Match arm comparison between string and '§a' is always false\\.$#"
count: 1
path: ../../../src/utils/Terminal.php
-
message: "#^Match arm comparison between string and '§b' is always false\\.$#"
count: 1
path: ../../../src/utils/Terminal.php
-
message: "#^Match arm comparison between string and '§c' is always false\\.$#"
count: 1
path: ../../../src/utils/Terminal.php
-
message: "#^Match arm comparison between string and '§d' is always false\\.$#"
count: 1
path: ../../../src/utils/Terminal.php
-
message: "#^Match arm comparison between string and '§e' is always false\\.$#"
count: 1
path: ../../../src/utils/Terminal.php
-
message: "#^Match arm comparison between string and '§f' is always false\\.$#"
count: 1
path: ../../../src/utils/Terminal.php
-
message: "#^Parameter \\#1 \\$ of closure expects TMemberType, TMemberType given\\.$#"
count: 1
@ -121,7 +51,7 @@ parameters:
path: ../../../src/world/format/io/region/RegionLoader.php
-
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotNull\\(\\) with int and string will always evaluate to true\\.$#"
count: 1
path: ../../phpunit/block/BlockTest.php
message: "#^Parameter \\#2 \\$count of function array_fill expects int\\<0, max\\>, int given\\.$#"
count: 2
path: ../../../src/world/generator/noise/Noise.php

View File

@ -0,0 +1,77 @@
parameters:
ignoreErrors:
-
message: "#^Cannot call method getFullBlock\\(\\) on pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\.$#"
count: 1
path: ../../../src/world/World.php
-
message: "#^Cannot call method isEmptyFast\\(\\) on pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\.$#"
count: 1
path: ../../../src/world/World.php
-
message: "#^Cannot call method collectGarbage\\(\\) on pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\.$#"
count: 1
path: ../../../src/world/format/Chunk.php
-
message: "#^Method pocketmine\\\\world\\\\format\\\\HeightArray\\:\\:getValues\\(\\) should return array\\<int, int\\> but returns array\\<int, int\\|null\\>\\.$#"
count: 1
path: ../../../src/world/format/HeightArray.php
-
message: "#^Cannot call method getBlockLayers\\(\\) on pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\.$#"
count: 1
path: ../../../src/world/format/io/FastChunkSerializer.php
-
message: "#^Cannot call method getBlockLightArray\\(\\) on pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\.$#"
count: 1
path: ../../../src/world/format/io/FastChunkSerializer.php
-
message: "#^Cannot call method getBlockSkyLightArray\\(\\) on pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\.$#"
count: 1
path: ../../../src/world/format/io/FastChunkSerializer.php
-
message: "#^Cannot call method getEmptyBlockId\\(\\) on pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\.$#"
count: 1
path: ../../../src/world/format/io/FastChunkSerializer.php
-
message: "#^Cannot call method getBlockLayers\\(\\) on pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\.$#"
count: 1
path: ../../../src/world/format/io/leveldb/LevelDB.php
-
message: "#^Cannot call method isEmptyAuthoritative\\(\\) on pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\.$#"
count: 1
path: ../../../src/world/format/io/leveldb/LevelDB.php
-
message: "#^Cannot call method getBlockLayers\\(\\) on pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\.$#"
count: 1
path: ../../../src/world/light/BlockLightUpdate.php
-
message: "#^Cannot call method setBlockLightArray\\(\\) on pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\.$#"
count: 1
path: ../../../src/world/light/BlockLightUpdate.php
-
message: "#^Parameter \\#1 \\$subChunk of method pocketmine\\\\world\\\\light\\\\BlockLightUpdate\\:\\:scanForLightEmittingBlocks\\(\\) expects pocketmine\\\\world\\\\format\\\\SubChunk, pocketmine\\\\world\\\\format\\\\SubChunk\\|null given\\.$#"
count: 1
path: ../../../src/world/light/BlockLightUpdate.php
-
message: "#^Cannot call method getBlockLightArray\\(\\) on pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\.$#"
count: 1
path: ../../../src/world/light/LightPopulationTask.php
-
message: "#^Cannot call method getBlockSkyLightArray\\(\\) on pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\.$#"
count: 1
path: ../../../src/world/light/LightPopulationTask.php