From 8cb48bfe1d63d93704a196d5f8781d32f34e1f79 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jul 2021 12:48:11 +0100 Subject: [PATCH 01/10] Bump phpunit/phpunit from 9.5.6 to 9.5.7 (#4322) Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.5.6 to 9.5.7. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.6...9.5.7) --- updated-dependencies: - dependency-name: phpunit/phpunit dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 5aed81110..2f213b707 100644 --- a/composer.lock +++ b/composer.lock @@ -1495,16 +1495,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.6", + "version": "9.5.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "fb9b8333f14e3dce976a60ef6a7e05c7c7ed8bfb" + "reference": "d0dc8b6999c937616df4fb046792004b33fd31c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fb9b8333f14e3dce976a60ef6a7e05c7c7ed8bfb", - "reference": "fb9b8333f14e3dce976a60ef6a7e05c7c7ed8bfb", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0dc8b6999c937616df4fb046792004b33fd31c5", + "reference": "d0dc8b6999c937616df4fb046792004b33fd31c5", "shasum": "" }, "require": { @@ -1582,7 +1582,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.6" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.7" }, "funding": [ { @@ -1594,7 +1594,7 @@ "type": "github" } ], - "time": "2021-06-23T05:14:38+00:00" + "time": "2021-07-19T06:14:47+00:00" }, { "name": "sebastian/cli-parser", From 59b84532286f733162e6c6e40c8a61e40d571535 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 22 Jul 2021 21:04:15 +0100 Subject: [PATCH 02/10] Player: added extra debug message for XUID mismatches --- src/pocketmine/Player.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 5582645b0..4f6bd07e2 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -2087,6 +2087,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ $checkXUID = (bool) $this->server->getProperty("player.verify-xuid", true); $kickForXUIDMismatch = function(string $xuid) use ($checkXUID) : bool{ if($checkXUID && $this->xuid !== $xuid){ + $this->server->getLogger()->debug($this->getName() . " XUID mismatch: expected '$xuid', but got '$this->xuid'"); if($this->kick("XUID does not match (possible impersonation attempt)", false)){ //TODO: Longer term, we should be identifying playerdata using something more reliable, like XUID or UUID. //However, that would be a very disruptive change, so this will serve as a stopgap for now. From 61528393c2f72dd721e3f1e30089cb0ddb17ee2a Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 22 Jul 2021 21:14:31 +0100 Subject: [PATCH 03/10] Player: rewrite the confusing documentation of getUniqueId() --- src/pocketmine/Player.php | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 4f6bd07e2..ae2af5f76 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -483,19 +483,15 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ } /** - * Returns the player's UUID. This should be preferred over their Xbox user ID (XUID) because UUID is a standard - * format which will never change, and all players will have one regardless of whether they are logged into Xbox - * Live. + * Returns the player's UUID. This should be the preferred method to identify a player. + * It does not change if the player changes their username. * - * The UUID is comprised of: - * - when logged into XBL: a hash of their XUID (and as such will not change for the lifetime of the XBL account) - * - when NOT logged into XBL: a hash of their name + clientID + secret device ID. + * All players will have a UUID, regardless of whether they are logged into Xbox Live or not. However, note that + * non-XBL players can fake their UUIDs. * - * WARNING: UUIDs of players **not logged into Xbox Live** CAN BE FAKED and SHOULD NOT be trusted! - * - * (In the olden days this method used to return a fake UUID computed by the server, which was used by plugins such - * as SimpleAuth for authentication. This is NOT SAFE anymore as this UUID is now what was given by the client, NOT - * a server-computed UUID.) + * WARNING: DO NOT trust this before PlayerLoginEvent. Before PlayerLoginEvent, the player hasn't yet been + * authenticated, and any of their data might be faked. However, you can use it for things like checking bans at any + * time (since it doesn't make sense to impersonate a banned player anyway). */ public function getUniqueId() : ?UUID{ return parent::getUniqueId(); From 3af18917f00d7d44b54227d54c77ca61e9549f86 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 22 Jul 2021 22:14:14 +0100 Subject: [PATCH 04/10] Player: remove note about bans from getUniqueId() while it's true that you might be able to skip the CPU waste from verifying a player's login just to find out that they are banned, this is generally a minority case anyway, so it doesn't make a lot of difference overall. This additional note is essentially a recommendation premature optimisation, which will likely lead to people making security mistakes. --- src/pocketmine/Player.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index ae2af5f76..225859aa8 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -490,8 +490,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ * non-XBL players can fake their UUIDs. * * WARNING: DO NOT trust this before PlayerLoginEvent. Before PlayerLoginEvent, the player hasn't yet been - * authenticated, and any of their data might be faked. However, you can use it for things like checking bans at any - * time (since it doesn't make sense to impersonate a banned player anyway). + * authenticated, and any of their data might be faked. */ public function getUniqueId() : ?UUID{ return parent::getUniqueId(); From 5844b59b120c69465ae82f95d06d4395700a1ea3 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 23 Jul 2021 12:53:30 +0100 Subject: [PATCH 05/10] Fixed incorrect encoding of NpcDialoguePacket this is in fact an ActorUniqueID, but for some reason written as a uint64 instead of a varint. --- src/pocketmine/network/mcpe/protocol/NpcDialoguePacket.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/network/mcpe/protocol/NpcDialoguePacket.php b/src/pocketmine/network/mcpe/protocol/NpcDialoguePacket.php index 7e2f88476..6aaa484f2 100644 --- a/src/pocketmine/network/mcpe/protocol/NpcDialoguePacket.php +++ b/src/pocketmine/network/mcpe/protocol/NpcDialoguePacket.php @@ -64,7 +64,7 @@ class NpcDialoguePacket extends DataPacket/* implements ClientboundPacket*/{ public function getActionJson() : string{ return $this->actionJson; } protected function decodePayload() : void{ - $this->npcActorUniqueId = $this->getEntityUniqueId(); + $this->npcActorUniqueId = $this->getLLong(); //WHY NOT USING STANDARD METHODS, MOJANG $this->actionType = $this->getVarInt(); $this->dialogue = $this->getString(); $this->sceneName = $this->getString(); @@ -73,7 +73,7 @@ class NpcDialoguePacket extends DataPacket/* implements ClientboundPacket*/{ } protected function encodePayload() : void{ - $this->putEntityUniqueId($this->npcActorUniqueId); + $this->putLLong($this->npcActorUniqueId); $this->putVarInt($this->actionType); $this->putString($this->dialogue); $this->putString($this->sceneName); From 9477034a4ae58cc5c12b8278c14a8e46a43992b2 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 23 Jul 2021 13:03:27 +0100 Subject: [PATCH 06/10] Release 3.22.1 --- changelogs/3.22.md | 9 +++++++++ src/pocketmine/VersionInfo.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/changelogs/3.22.md b/changelogs/3.22.md index 31e7c4c25..7d83b5a0d 100644 --- a/changelogs/3.22.md +++ b/changelogs/3.22.md @@ -9,3 +9,12 @@ Plugin developers should **only** update their required API to this version if y # 3.22.0 - Added support for Minecraft: Bedrock Edition 1.17.10. - Removed compatibility with earlier versions. + +# 3.22.1 +- Added a giant yellow startup warning if using OPcache JIT on PHP 8.0. JIT is currently considered highly unstable and not recommended for production use. +- When using a bad PHP binary, the bootstrap will now report the used `php.ini` path. This can be useful for debugging issues with extension loading when the wrong `php.ini` file is loaded for some reason. +- Fixed `start.cmd` causing the wrong `php.ini` to be loaded on Windows when a global PHP installation is used. +- A debug message is now logged containing expected vs. actual XUID of players when an XUID mismatch is detected. +- Improved the documentation for `Player->getUniqueId()`. +- Fixed a mistake in the documentation of `PlayerAuthInputFlags`. +- Fixed incorrect encoding of `NpcDialoguePacket`. diff --git a/src/pocketmine/VersionInfo.php b/src/pocketmine/VersionInfo.php index 7c3a81c86..e476a57ee 100644 --- a/src/pocketmine/VersionInfo.php +++ b/src/pocketmine/VersionInfo.php @@ -34,5 +34,5 @@ const _VERSION_INFO_INCLUDED = true; const NAME = "PocketMine-MP"; const BASE_VERSION = "3.22.1"; -const IS_DEVELOPMENT_BUILD = true; +const IS_DEVELOPMENT_BUILD = false; const BUILD_NUMBER = 0; From dc56a9947342a9c129aa07d85d277f71ebe7048f Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 23 Jul 2021 13:03:27 +0100 Subject: [PATCH 07/10] 3.22.2 is next --- src/pocketmine/VersionInfo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/VersionInfo.php b/src/pocketmine/VersionInfo.php index e476a57ee..64db47414 100644 --- a/src/pocketmine/VersionInfo.php +++ b/src/pocketmine/VersionInfo.php @@ -33,6 +33,6 @@ if(defined('pocketmine\_VERSION_INFO_INCLUDED')){ const _VERSION_INFO_INCLUDED = true; const NAME = "PocketMine-MP"; -const BASE_VERSION = "3.22.1"; -const IS_DEVELOPMENT_BUILD = false; +const BASE_VERSION = "3.22.2"; +const IS_DEVELOPMENT_BUILD = true; const BUILD_NUMBER = 0; From ef31a9fc6665124ab978dfc5c39e1f69871bedea Mon Sep 17 00:00:00 2001 From: Dylan T Date: Fri, 23 Jul 2021 13:32:18 +0100 Subject: [PATCH 08/10] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 99a016aef..730d6e811 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -20,8 +20,9 @@ assignees: '' * PocketMine-MP: * PHP: +* Using JIT: yes/no (delete as appropriate) * Server OS: -* Game version: PE/Win10 (delete as appropriate) +* Game version: Android/iOS/Win10/Xbox/PS4/Switch (delete as appropriate) ### Plugins From 81c5b83bd9725df92c359b1377438c025c682cab Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 23 Jul 2021 15:54:17 +0100 Subject: [PATCH 09/10] actions: test on 8.0 --- .github/workflows/main.yml | 21 ++- phpstan.php8.neon | 4 + tests/phpstan/configs/php8.neon | 297 ++++++++++++++++++++++++++++++++ 3 files changed, 314 insertions(+), 8 deletions(-) create mode 100644 phpstan.php8.neon create mode 100644 tests/phpstan/configs/php8.neon diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 38ebe7a90..3b82eb1e5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: image: [ubuntu-20.04] - php: [7.4.20] + php: [7.4.20, 8.0.7] steps: - uses: actions/checkout@v2 #needed for build.sh @@ -36,8 +36,13 @@ jobs: strategy: fail-fast: false matrix: - image: [ubuntu-20.04] - php: [7.4.20] + include: + - php: 8.0.7 + config: phpstan.php8.neon + image: ubuntu-20.04 + - php: 7.4.20 + config: phpstan.neon.dist + image: ubuntu-20.04 steps: - uses: actions/checkout@v2 @@ -77,7 +82,7 @@ jobs: run: php composer.phar install --prefer-dist --no-interaction - name: Run PHPStan - run: ./vendor/bin/phpstan analyze --no-progress --memory-limit=2G + run: ./vendor/bin/phpstan analyze --no-progress --memory-limit=2G -c ${{ matrix.config }} phpunit: name: PHPUnit tests @@ -87,7 +92,7 @@ jobs: fail-fast: false matrix: image: [ubuntu-20.04] - php: [7.4.20] + php: [7.4.20, 8.0.7] steps: - uses: actions/checkout@v2 @@ -137,7 +142,7 @@ jobs: fail-fast: false matrix: image: [ubuntu-20.04] - php: [7.4.20] + php: [7.4.20, 8.0.7] steps: - uses: actions/checkout@v2 @@ -189,7 +194,7 @@ jobs: fail-fast: false matrix: image: [ubuntu-20.04] - php: [7.4.20] + php: [7.4.20, 8.0.7] steps: - uses: actions/checkout@v2 @@ -274,7 +279,7 @@ jobs: - name: Setup PHP and tools uses: shivammathur/setup-php@2.9.0 with: - php-version: 7.4 + php-version: 8.0 tools: php-cs-fixer - name: Run PHP-CS-Fixer diff --git a/phpstan.php8.neon b/phpstan.php8.neon new file mode 100644 index 000000000..2d5932c02 --- /dev/null +++ b/phpstan.php8.neon @@ -0,0 +1,4 @@ +includes: + - phpstan.neon.dist + - tests/phpstan/configs/php8.neon + diff --git a/tests/phpstan/configs/php8.neon b/tests/phpstan/configs/php8.neon new file mode 100644 index 000000000..b56ff625f --- /dev/null +++ b/tests/phpstan/configs/php8.neon @@ -0,0 +1,297 @@ +parameters: + ignoreErrors: + - + message: "#^Call to method getName\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" + count: 3 + path: ../../../plugins/LiveXYZ/src/LiveXYZ/LiveXYZ.php + + - + message: "#^Call to method sendMessage\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" + count: 2 + path: ../../../plugins/LiveXYZ/src/LiveXYZ/LiveXYZ.php + + - + message: "#^Cannot cast mixed to int\\.$#" + count: 2 + path: ../../../plugins/LiveXYZ/src/LiveXYZ/LiveXYZ.php + + - + message: "#^Class pocketmine\\\\player\\\\Player not found\\.$#" + count: 1 + path: ../../../plugins/LiveXYZ/src/LiveXYZ/LiveXYZ.php + + - + message: "#^PHPDoc tag @var above assignment does not specify variable name\\.$#" + count: 1 + path: ../../../plugins/LiveXYZ/src/LiveXYZ/LiveXYZ.php + + - + message: "#^Property LiveXYZ\\\\LiveXYZ\\:\\:\\$mode \\(string\\) does not accept mixed\\.$#" + count: 1 + path: ../../../plugins/LiveXYZ/src/LiveXYZ/LiveXYZ.php + + - + message: "#^Call to method getWorld\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" + count: 1 + path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php + + - + message: "#^Call to method getX\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" + count: 1 + path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php + + - + message: "#^Call to method getY\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" + count: 1 + path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php + + - + message: "#^Call to method getYaw\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" + count: 2 + path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php + + - + message: "#^Call to method getZ\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" + count: 1 + path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php + + - + message: "#^Call to method isClosed\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" + count: 1 + path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php + + - + message: "#^Call to method sendPopup\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" + count: 1 + path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php + + - + message: "#^Call to method sendTip\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" + count: 1 + path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php + + - + message: "#^Parameter \\$player of method LiveXYZ\\\\ShowDisplayTask\\:\\:__construct\\(\\) has invalid typehint type pocketmine\\\\player\\\\Player\\.$#" + count: 1 + path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php + + - + message: "#^Property LiveXYZ\\\\ShowDisplayTask\\:\\:\\$player has unknown class pocketmine\\\\player\\\\Player as its type\\.$#" + count: 1 + path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php + + - + message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" + count: 1 + path: ../../../src/pocketmine/MemoryManager.php + + - + message: "#^Parameter \\#1 \\$stream of function fwrite expects resource, resource\\|false given\\.$#" + count: 1 + path: ../../../src/pocketmine/MemoryManager.php + + - + message: "#^Parameter \\#1 \\$string of function base64_decode expects string, mixed given\\.$#" + count: 5 + path: ../../../src/pocketmine/Player.php + + - + message: "#^Parameter \\#1 \\$array of function array_filter expects array, array\\\\|false given\\.$#" + count: 1 + path: ../../../src/pocketmine/Server.php + + - + message: "#^Parameter \\#1 \\$string of function strtolower expects string, mixed given\\.$#" + count: 1 + path: ../../../src/pocketmine/Server.php + + - + message: "#^Parameter \\#1 \\$num of function round expects float\\|int, mixed given\\.$#" + count: 1 + path: ../../../src/pocketmine/command/defaults/StatusCommand.php + + - + message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" + count: 2 + path: ../../../src/pocketmine/command/defaults/TimingsCommand.php + + - + message: "#^Parameter \\#1 \\$stream of function fseek expects resource, resource\\|false given\\.$#" + count: 1 + path: ../../../src/pocketmine/command/defaults/TimingsCommand.php + + - + message: "#^Parameter \\#1 \\$stream of function stream_get_contents expects resource, resource\\|false given\\.$#" + count: 1 + path: ../../../src/pocketmine/command/defaults/TimingsCommand.php + + - + message: "#^Parameter \\#1 \\$objectOrClass of class ReflectionClass constructor expects class\\-string\\\\|T of object, string given\\.$#" + count: 1 + path: ../../../src/pocketmine/event/HandlerList.php + + - + message: "#^Parameter \\#2 \\$array of function array_map expects array, array\\|false given\\.$#" + count: 1 + path: ../../../src/pocketmine/lang/BaseLang.php + + - + message: "#^Parameter \\#2 \\$string of function explode expects string, mixed given\\.$#" + count: 1 + path: ../../../src/pocketmine/level/format/io/leveldb/LevelDB.php + + - + message: "#^Parameter \\#1 \\$array of function array_filter expects array, array\\\\|false given\\.$#" + count: 1 + path: ../../../src/pocketmine/level/format/io/region/McRegion.php + + - + message: "#^Parameter \\#1 \\$string of function str_split expects string, string\\|false given\\.$#" + count: 1 + path: ../../../src/pocketmine/network/mcpe/VerifyLoginTask.php + + - + message: "#^Parameter \\#1 \\$socket of class pocketmine\\\\network\\\\rcon\\\\RCONInstance constructor expects resource, Socket given\\.$#" + count: 1 + path: ../../../src/pocketmine/network/rcon/RCON.php + + - + message: "#^Parameter \\#1 \\$socket of function socket_close expects Socket, resource given\\.$#" + count: 3 + path: ../../../src/pocketmine/network/rcon/RCON.php + + - + message: "#^Parameter \\#1 \\$socket of function socket_write expects Socket, resource given\\.$#" + count: 1 + path: ../../../src/pocketmine/network/rcon/RCON.php + + - + message: "#^Property pocketmine\\\\network\\\\rcon\\\\RCON\\:\\:\\$socket \\(resource\\) does not accept Socket\\.$#" + count: 1 + path: ../../../src/pocketmine/network/rcon/RCON.php + + - + message: "#^Parameter \\#1 \\$client of method pocketmine\\\\network\\\\rcon\\\\RCONInstance\\:\\:disconnectClient\\(\\) expects resource, resource\\|Socket given\\.$#" + count: 2 + path: ../../../src/pocketmine/network/rcon/RCONInstance.php + + - + message: "#^Parameter \\#1 \\$client of method pocketmine\\\\network\\\\rcon\\\\RCONInstance\\:\\:readPacket\\(\\) expects resource, resource\\|Socket given\\.$#" + count: 1 + path: ../../../src/pocketmine/network/rcon/RCONInstance.php + + - + message: "#^Parameter \\#1 \\$client of method pocketmine\\\\network\\\\rcon\\\\RCONInstance\\:\\:writePacket\\(\\) expects resource, resource\\|Socket given\\.$#" + count: 3 + path: ../../../src/pocketmine/network/rcon/RCONInstance.php + + - + message: "#^Parameter \\#1 \\$read of function socket_select expects array\\\\|null, array\\ given\\.$#" + count: 1 + path: ../../../src/pocketmine/network/rcon/RCONInstance.php + + - + message: "#^Parameter \\#1 \\$socket of function socket_accept expects Socket, resource given\\.$#" + count: 1 + path: ../../../src/pocketmine/network/rcon/RCONInstance.php + + - + message: "#^Parameter \\#1 \\$socket of function socket_close expects Socket, resource given\\.$#" + count: 1 + path: ../../../src/pocketmine/network/rcon/RCONInstance.php + + - + message: "#^Parameter \\#1 \\$socket of function socket_getpeername expects Socket, resource given\\.$#" + count: 2 + path: ../../../src/pocketmine/network/rcon/RCONInstance.php + + - + message: "#^Parameter \\#1 \\$socket of function socket_getpeername expects Socket, resource\\|Socket given\\.$#" + count: 1 + path: ../../../src/pocketmine/network/rcon/RCONInstance.php + + - + message: "#^Parameter \\#1 \\$socket of function socket_last_error expects Socket\\|null, resource given\\.$#" + count: 2 + path: ../../../src/pocketmine/network/rcon/RCONInstance.php + + - + message: "#^Parameter \\#1 \\$socket of function socket_read expects Socket, resource given\\.$#" + count: 4 + path: ../../../src/pocketmine/network/rcon/RCONInstance.php + + - + message: "#^Parameter \\#1 \\$socket of function socket_set_block expects Socket, resource given\\.$#" + count: 1 + path: ../../../src/pocketmine/network/rcon/RCONInstance.php + + - + message: "#^Parameter \\#1 \\$socket of function socket_set_option expects Socket, resource given\\.$#" + count: 1 + path: ../../../src/pocketmine/network/rcon/RCONInstance.php + + - + message: "#^Parameter \\#1 \\$socket of function socket_shutdown expects Socket, resource given\\.$#" + count: 1 + path: ../../../src/pocketmine/network/rcon/RCONInstance.php + + - + message: "#^Parameter \\#1 \\$socket of function socket_write expects Socket, resource given\\.$#" + count: 1 + path: ../../../src/pocketmine/network/rcon/RCONInstance.php + + - + message: "#^Parameter \\#1 \\$string of function mb_strtoupper expects string, mixed given\\.$#" + count: 1 + path: ../../../src/pocketmine/plugin/PluginDescription.php + + - + message: "#^Parameter \\#1 \\$data of function unserialize expects string, mixed given\\.$#" + count: 1 + path: ../../../src/pocketmine/scheduler/AsyncTask.php + + - + message: "#^Parameter \\#1 \\$string of function strtolower expects string, mixed given\\.$#" + count: 1 + path: ../../../src/pocketmine/updater/AutoUpdater.php + + - + message: "#^Parameter \\#2 \\$timestamp of function date expects int\\|null, mixed given\\.$#" + count: 1 + path: ../../../src/pocketmine/updater/AutoUpdater.php + + - + message: "#^Parameter \\#1 \\$ of callable callable\\(resource\\)\\: void expects resource, CurlHandle given\\.$#" + count: 1 + path: ../../../src/pocketmine/utils/Internet.php + + - + message: "#^Parameter \\#2 \\$offset of function substr expects int, mixed given\\.$#" + count: 1 + path: ../../../src/pocketmine/utils/Internet.php + + - + message: "#^Parameter \\#3 \\$length of function substr expects int\\|null, mixed given\\.$#" + count: 1 + path: ../../../src/pocketmine/utils/Internet.php + + - + message: "#^Parameter \\#1 \\$string of function trim expects string, string\\|false given\\.$#" + count: 1 + path: ../../../src/pocketmine/utils/Timezone.php + + - + message: "#^Strict comparison using \\=\\=\\= between array\\ and false will always evaluate to false\\.$#" + count: 1 + path: ../../../src/pocketmine/utils/Timezone.php + + - + message: "#^Parameter \\#2 \\$array of function array_map expects array, mixed given\\.$#" + count: 1 + path: ../../../src/pocketmine/utils/Utils.php + + - + message: "#^Strict comparison using \\=\\=\\= between array and false will always evaluate to false\\.$#" + count: 1 + path: ../../../src/pocketmine/utils/Utils.php + From 85effa52401323ba9945b83dd2ad1c451a98a59d Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 23 Jul 2021 15:56:06 +0100 Subject: [PATCH 10/10] Remove junk from php8 baseline --- tests/phpstan/configs/php8.neon | 80 --------------------------------- 1 file changed, 80 deletions(-) diff --git a/tests/phpstan/configs/php8.neon b/tests/phpstan/configs/php8.neon index b56ff625f..132895422 100644 --- a/tests/phpstan/configs/php8.neon +++ b/tests/phpstan/configs/php8.neon @@ -1,85 +1,5 @@ parameters: ignoreErrors: - - - message: "#^Call to method getName\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" - count: 3 - path: ../../../plugins/LiveXYZ/src/LiveXYZ/LiveXYZ.php - - - - message: "#^Call to method sendMessage\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" - count: 2 - path: ../../../plugins/LiveXYZ/src/LiveXYZ/LiveXYZ.php - - - - message: "#^Cannot cast mixed to int\\.$#" - count: 2 - path: ../../../plugins/LiveXYZ/src/LiveXYZ/LiveXYZ.php - - - - message: "#^Class pocketmine\\\\player\\\\Player not found\\.$#" - count: 1 - path: ../../../plugins/LiveXYZ/src/LiveXYZ/LiveXYZ.php - - - - message: "#^PHPDoc tag @var above assignment does not specify variable name\\.$#" - count: 1 - path: ../../../plugins/LiveXYZ/src/LiveXYZ/LiveXYZ.php - - - - message: "#^Property LiveXYZ\\\\LiveXYZ\\:\\:\\$mode \\(string\\) does not accept mixed\\.$#" - count: 1 - path: ../../../plugins/LiveXYZ/src/LiveXYZ/LiveXYZ.php - - - - message: "#^Call to method getWorld\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" - count: 1 - path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php - - - - message: "#^Call to method getX\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" - count: 1 - path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php - - - - message: "#^Call to method getY\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" - count: 1 - path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php - - - - message: "#^Call to method getYaw\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" - count: 2 - path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php - - - - message: "#^Call to method getZ\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" - count: 1 - path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php - - - - message: "#^Call to method isClosed\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" - count: 1 - path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php - - - - message: "#^Call to method sendPopup\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" - count: 1 - path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php - - - - message: "#^Call to method sendTip\\(\\) on an unknown class pocketmine\\\\player\\\\Player\\.$#" - count: 1 - path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php - - - - message: "#^Parameter \\$player of method LiveXYZ\\\\ShowDisplayTask\\:\\:__construct\\(\\) has invalid typehint type pocketmine\\\\player\\\\Player\\.$#" - count: 1 - path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php - - - - message: "#^Property LiveXYZ\\\\ShowDisplayTask\\:\\:\\$player has unknown class pocketmine\\\\player\\\\Player as its type\\.$#" - count: 1 - path: ../../../plugins/LiveXYZ/src/LiveXYZ/ShowDisplayTask.php - - message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" count: 1