From 2a136c78049784f73899b472c55075869f65250a Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 6 Dec 2023 14:37:27 +0000 Subject: [PATCH 1/4] Update composer dependencies --- composer.json | 2 +- composer.lock | 62 +++++++++++----------- tests/phpstan/configs/actual-problems.neon | 4 +- tests/phpstan/configs/phpstan-bugs.neon | 15 ------ 4 files changed, 34 insertions(+), 49 deletions(-) diff --git a/composer.json b/composer.json index 807ee0124..eae9eeeda 100644 --- a/composer.json +++ b/composer.json @@ -56,7 +56,7 @@ "webmozart/path-util": "~2.3.0" }, "require-dev": { - "phpstan/phpstan": "1.10.39", + "phpstan/phpstan": "1.10.47", "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 6905e3597..d54676f10 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": "7eb82ff7bbf49b2524db4136819bac35", + "content-hash": "1fa402ac97418450c70ea636909de222", "packages": [ { "name": "adhocore/json-comment", @@ -997,16 +997,16 @@ }, { "name": "ramsey/uuid", - "version": "4.7.4", + "version": "4.7.5", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "60a4c63ab724854332900504274f6150ff26d286" + "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/60a4c63ab724854332900504274f6150ff26d286", - "reference": "60a4c63ab724854332900504274f6150ff26d286", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", + "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", "shasum": "" }, "require": { @@ -1073,7 +1073,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.7.4" + "source": "https://github.com/ramsey/uuid/tree/4.7.5" }, "funding": [ { @@ -1085,7 +1085,7 @@ "type": "tidelift" } ], - "time": "2023-04-15T23:01:58+00:00" + "time": "2023-11-08T05:53:05+00:00" }, { "name": "symfony/filesystem", @@ -1738,16 +1738,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.39", + "version": "1.10.47", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "d9dedb0413f678b4d03cbc2279a48f91592c97c4" + "reference": "84dbb33b520ea28b6cf5676a3941f4bae1c1ff39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d9dedb0413f678b4d03cbc2279a48f91592c97c4", - "reference": "d9dedb0413f678b4d03cbc2279a48f91592c97c4", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/84dbb33b520ea28b6cf5676a3941f4bae1c1ff39", + "reference": "84dbb33b520ea28b6cf5676a3941f4bae1c1ff39", "shasum": "" }, "require": { @@ -1796,7 +1796,7 @@ "type": "tidelift" } ], - "time": "2023-10-17T15:46:26+00:00" + "time": "2023-12-01T15:19:17+00:00" }, { "name": "phpstan/phpstan-phpunit", @@ -1852,21 +1852,21 @@ }, { "name": "phpstan/phpstan-strict-rules", - "version": "1.5.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "b21c03d4f6f3a446e4311155f4be9d65048218e6" + "reference": "7a50e9662ee9f3942e4aaaf3d603653f60282542" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/b21c03d4f6f3a446e4311155f4be9d65048218e6", - "reference": "b21c03d4f6f3a446e4311155f4be9d65048218e6", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/7a50e9662ee9f3942e4aaaf3d603653f60282542", + "reference": "7a50e9662ee9f3942e4aaaf3d603653f60282542", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.10" + "phpstan/phpstan": "^1.10.34" }, "require-dev": { "nikic/php-parser": "^4.13.0", @@ -1895,22 +1895,22 @@ "description": "Extra strict and opinionated rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", - "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.5.1" + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.5.2" }, - "time": "2023-03-29T14:47:40+00:00" + "time": "2023-10-30T14:35:06+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "10.1.7", + "version": "10.1.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "355324ca4980b8916c18b9db29f3ef484078f26e" + "reference": "a56a9ab2f680246adcf3db43f38ddf1765774735" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/355324ca4980b8916c18b9db29f3ef484078f26e", - "reference": "355324ca4980b8916c18b9db29f3ef484078f26e", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/a56a9ab2f680246adcf3db43f38ddf1765774735", + "reference": "a56a9ab2f680246adcf3db43f38ddf1765774735", "shasum": "" }, "require": { @@ -1967,7 +1967,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.7" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.9" }, "funding": [ { @@ -1975,7 +1975,7 @@ "type": "github" } ], - "time": "2023-10-04T15:34:17+00:00" + "time": "2023-11-23T12:23:20+00:00" }, { "name": "phpunit/php-file-iterator", @@ -3238,16 +3238,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", "shasum": "" }, "require": { @@ -3276,7 +3276,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" }, "funding": [ { @@ -3284,7 +3284,7 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2023-11-20T00:12:19+00:00" } ], "aliases": [], diff --git a/tests/phpstan/configs/actual-problems.neon b/tests/phpstan/configs/actual-problems.neon index 698230208..cfc735e2f 100644 --- a/tests/phpstan/configs/actual-problems.neon +++ b/tests/phpstan/configs/actual-problems.neon @@ -32,7 +32,7 @@ parameters: - message: "#^Cannot access offset 'git' on mixed\\.$#" - count: 2 + count: 1 path: ../../../src/VersionInfo.php - @@ -857,7 +857,7 @@ parameters: - message: "#^Cannot access offset string on mixed\\.$#" - count: 3 + count: 2 path: ../../../src/utils/Config.php - diff --git a/tests/phpstan/configs/phpstan-bugs.neon b/tests/phpstan/configs/phpstan-bugs.neon index 62f945fc7..ad818f4d6 100644 --- a/tests/phpstan/configs/phpstan-bugs.neon +++ b/tests/phpstan/configs/phpstan-bugs.neon @@ -10,21 +10,6 @@ parameters: count: 1 path: ../../../src/entity/projectile/Projectile.php - - - message: "#^Match arm comparison between 1\\|2\\|3\\|4 and 0 is always false\\.$#" - count: 1 - path: ../../../src/network/mcpe/handler/InGamePacketHandler.php - - - - message: "#^Match arm comparison between 4 and 4 is always true\\.$#" - count: 1 - path: ../../../src/network/mcpe/handler/InGamePacketHandler.php - - - - message: "#^Match arm is unreachable because previous comparison is always true\\.$#" - count: 1 - path: ../../../src/network/mcpe/handler/InGamePacketHandler.php - - message: "#^Property pocketmine\\\\network\\\\mcpe\\\\raklib\\\\PthreadsChannelWriter\\:\\:\\$buffer is never read, only written\\.$#" count: 1 From ed3fe2b727798a100f796ad7d7833a6356ea2fa5 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 6 Dec 2023 14:47:44 +0000 Subject: [PATCH 2/4] Update dependencies for 1.20.50 --- composer.json | 8 +-- composer.lock | 54 +++++++++---------- .../mcpe/handler/InGamePacketHandler.php | 5 -- 3 files changed, 31 insertions(+), 36 deletions(-) diff --git a/composer.json b/composer.json index eae9eeeda..3840b3ed8 100644 --- a/composer.json +++ b/composer.json @@ -34,10 +34,10 @@ "adhocore/json-comment": "~1.2.0", "fgrosse/phpasn1": "~2.5.0", "pocketmine/netresearch-jsonmapper": "~v4.2.1000", - "pocketmine/bedrock-block-upgrade-schema": "~3.3.0+bedrock-1.20.40", - "pocketmine/bedrock-data": "~2.6.0+bedrock-1.20.40", - "pocketmine/bedrock-item-upgrade-schema": "~1.5.0+bedrock-1.20.30", - "pocketmine/bedrock-protocol": "~25.0.0+bedrock-1.20.40", + "pocketmine/bedrock-block-upgrade-schema": "~3.4.0+bedrock-1.20.50", + "pocketmine/bedrock-data": "~2.7.0+bedrock-1.20.50", + "pocketmine/bedrock-item-upgrade-schema": "~1.6.0+bedrock-1.20.50", + "pocketmine/bedrock-protocol": "~26.0.0+bedrock-1.20.50", "pocketmine/binaryutils": "^0.2.1", "pocketmine/callback-validator": "^1.0.2", "pocketmine/classloader": "^0.2.0", diff --git a/composer.lock b/composer.lock index d54676f10..9b33f4105 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": "1fa402ac97418450c70ea636909de222", + "content-hash": "063e95c52230fcdcc8f2a420167f50a5", "packages": [ { "name": "adhocore/json-comment", @@ -198,16 +198,16 @@ }, { "name": "pocketmine/bedrock-block-upgrade-schema", - "version": "3.3.0", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/pmmp/BedrockBlockUpgradeSchema.git", - "reference": "ee46b9367af262bbddd9f122d4d5b5b495b892e7" + "reference": "9872eb37f15080b19c2b7861085e549c48dda92d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockBlockUpgradeSchema/zipball/ee46b9367af262bbddd9f122d4d5b5b495b892e7", - "reference": "ee46b9367af262bbddd9f122d4d5b5b495b892e7", + "url": "https://api.github.com/repos/pmmp/BedrockBlockUpgradeSchema/zipball/9872eb37f15080b19c2b7861085e549c48dda92d", + "reference": "9872eb37f15080b19c2b7861085e549c48dda92d", "shasum": "" }, "type": "library", @@ -218,22 +218,22 @@ "description": "Schemas describing how to upgrade saved block data in older Minecraft: Bedrock Edition world saves", "support": { "issues": "https://github.com/pmmp/BedrockBlockUpgradeSchema/issues", - "source": "https://github.com/pmmp/BedrockBlockUpgradeSchema/tree/3.3.0" + "source": "https://github.com/pmmp/BedrockBlockUpgradeSchema/tree/3.4.0" }, - "time": "2023-10-16T16:11:02+00:00" + "time": "2023-11-08T15:22:06+00:00" }, { "name": "pocketmine/bedrock-data", - "version": "2.6.0+bedrock-1.20.40", + "version": "2.7.0+bedrock-1.20.50", "source": { "type": "git", "url": "https://github.com/pmmp/BedrockData.git", - "reference": "37e780d28b470230bda3579b04cb50d406e3fbe6" + "reference": "36f975dfca7520b7d36b0b39429f274464c9bc13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockData/zipball/37e780d28b470230bda3579b04cb50d406e3fbe6", - "reference": "37e780d28b470230bda3579b04cb50d406e3fbe6", + "url": "https://api.github.com/repos/pmmp/BedrockData/zipball/36f975dfca7520b7d36b0b39429f274464c9bc13", + "reference": "36f975dfca7520b7d36b0b39429f274464c9bc13", "shasum": "" }, "type": "library", @@ -244,22 +244,22 @@ "description": "Blobs of data generated from Minecraft: Bedrock Edition, used by PocketMine-MP", "support": { "issues": "https://github.com/pmmp/BedrockData/issues", - "source": "https://github.com/pmmp/BedrockData/tree/bedrock-1.20.40" + "source": "https://github.com/pmmp/BedrockData/tree/bedrock-1.20.50" }, - "time": "2023-10-26T10:39:13+00:00" + "time": "2023-12-06T13:59:08+00:00" }, { "name": "pocketmine/bedrock-item-upgrade-schema", - "version": "1.5.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/pmmp/BedrockItemUpgradeSchema.git", - "reference": "3edc9ebbad9a4f2d9c8f53b3a5ba44d4a792ad93" + "reference": "d374e5fd8302977675dcd2a42733abd3ee476ca1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockItemUpgradeSchema/zipball/3edc9ebbad9a4f2d9c8f53b3a5ba44d4a792ad93", - "reference": "3edc9ebbad9a4f2d9c8f53b3a5ba44d4a792ad93", + "url": "https://api.github.com/repos/pmmp/BedrockItemUpgradeSchema/zipball/d374e5fd8302977675dcd2a42733abd3ee476ca1", + "reference": "d374e5fd8302977675dcd2a42733abd3ee476ca1", "shasum": "" }, "type": "library", @@ -270,22 +270,22 @@ "description": "JSON schemas for upgrading items found in older Minecraft: Bedrock world saves", "support": { "issues": "https://github.com/pmmp/BedrockItemUpgradeSchema/issues", - "source": "https://github.com/pmmp/BedrockItemUpgradeSchema/tree/1.5.0" + "source": "https://github.com/pmmp/BedrockItemUpgradeSchema/tree/1.6.0" }, - "time": "2023-09-01T19:58:57+00:00" + "time": "2023-11-08T18:12:14+00:00" }, { "name": "pocketmine/bedrock-protocol", - "version": "25.0.0+bedrock-1.20.40", + "version": "26.0.0+bedrock-1.20.50", "source": { "type": "git", "url": "https://github.com/pmmp/BedrockProtocol.git", - "reference": "69c36c96f6835e93fc278071aa2bb9829abe5cf8" + "reference": "f278a0b6d4fa1e2e0408a125f323a3118b1968df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/69c36c96f6835e93fc278071aa2bb9829abe5cf8", - "reference": "69c36c96f6835e93fc278071aa2bb9829abe5cf8", + "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/f278a0b6d4fa1e2e0408a125f323a3118b1968df", + "reference": "f278a0b6d4fa1e2e0408a125f323a3118b1968df", "shasum": "" }, "require": { @@ -299,10 +299,10 @@ "ramsey/uuid": "^4.1" }, "require-dev": { - "phpstan/phpstan": "1.10.33", + "phpstan/phpstan": "1.10.39", "phpstan/phpstan-phpunit": "^1.0.0", "phpstan/phpstan-strict-rules": "^1.0.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.5 || ^10.0" }, "type": "library", "autoload": { @@ -317,9 +317,9 @@ "description": "An implementation of the Minecraft: Bedrock Edition protocol in PHP", "support": { "issues": "https://github.com/pmmp/BedrockProtocol/issues", - "source": "https://github.com/pmmp/BedrockProtocol/tree/25.0.0+bedrock-1.20.40" + "source": "https://github.com/pmmp/BedrockProtocol/tree/26.0.0+bedrock-1.20.50" }, - "time": "2023-10-26T11:03:10+00:00" + "time": "2023-12-06T14:08:37+00:00" }, { "name": "pocketmine/binaryutils", diff --git a/src/network/mcpe/handler/InGamePacketHandler.php b/src/network/mcpe/handler/InGamePacketHandler.php index 27b2f1de5..4597c2e1c 100644 --- a/src/network/mcpe/handler/InGamePacketHandler.php +++ b/src/network/mcpe/handler/InGamePacketHandler.php @@ -59,7 +59,6 @@ use pocketmine\network\mcpe\protocol\BossEventPacket; use pocketmine\network\mcpe\protocol\CommandBlockUpdatePacket; use pocketmine\network\mcpe\protocol\CommandRequestPacket; use pocketmine\network\mcpe\protocol\ContainerClosePacket; -use pocketmine\network\mcpe\protocol\CraftingEventPacket; use pocketmine\network\mcpe\protocol\EmotePacket; use pocketmine\network\mcpe\protocol\InteractPacket; use pocketmine\network\mcpe\protocol\InventoryTransactionPacket; @@ -733,10 +732,6 @@ class InGamePacketHandler extends PacketHandler{ return true; //this packet is useless } - public function handleCraftingEvent(CraftingEventPacket $packet) : bool{ - return true; //this is a broken useless packet, so we don't use it - } - public function handleBlockActorData(BlockActorDataPacket $packet) : bool{ $pos = new Vector3($packet->blockPosition->getX(), $packet->blockPosition->getY(), $packet->blockPosition->getZ()); if($pos->distanceSquared($this->player->getLocation()) > 10000){ From 30433bba1068d25efd543edd2003bbcff526b88a Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 6 Dec 2023 14:52:59 +0000 Subject: [PATCH 3/4] Release 4.26.0 --- changelogs/4.26.md | 16 ++++++++++++++++ src/VersionInfo.php | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 changelogs/4.26.md diff --git a/changelogs/4.26.md b/changelogs/4.26.md new file mode 100644 index 000000000..2244c6cae --- /dev/null +++ b/changelogs/4.26.md @@ -0,0 +1,16 @@ +# 4.26.0 +Released 6th December 2023. + +**For Minecraft: Bedrock Edition 1.20.50** + +This is a support release for Minecraft: Bedrock Edition 1.20.50. + +**Plugin compatibility:** Plugins for previous 4.x versions will run unchanged on this release, unless they use internal APIs, reflection, or packages like the `pocketmine\network\mcpe` namespace. +Do not update plugin minimum API versions unless you need new features added in this release. + +**WARNING: If your plugin uses the `pocketmine\network\mcpe` namespace, you're not shielded by API change constraints.** +Consider using the `mcpe-protocol` directive in `plugin.yml` as a constraint if you're using packets directly. + +## General +- Added support for Minecraft: Bedrock Edition 1.20.50. +- Removed support for older versions. diff --git a/src/VersionInfo.php b/src/VersionInfo.php index a825efe60..8ff68360c 100644 --- a/src/VersionInfo.php +++ b/src/VersionInfo.php @@ -31,8 +31,8 @@ use function str_repeat; final class VersionInfo{ public const NAME = "PocketMine-MP"; - public const BASE_VERSION = "4.25.1"; - public const IS_DEVELOPMENT_BUILD = true; + public const BASE_VERSION = "4.26.0"; + public const IS_DEVELOPMENT_BUILD = false; public const BUILD_CHANNEL = "stable"; private function __construct(){ From ba89ae5bf20dcc4aa4d40698429535aad26cc79d Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 6 Dec 2023 14:53:00 +0000 Subject: [PATCH 4/4] 4.26.1 is next --- src/VersionInfo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/VersionInfo.php b/src/VersionInfo.php index 8ff68360c..b2edef922 100644 --- a/src/VersionInfo.php +++ b/src/VersionInfo.php @@ -31,8 +31,8 @@ use function str_repeat; final class VersionInfo{ public const NAME = "PocketMine-MP"; - public const BASE_VERSION = "4.26.0"; - public const IS_DEVELOPMENT_BUILD = false; + public const BASE_VERSION = "4.26.1"; + public const IS_DEVELOPMENT_BUILD = true; public const BUILD_CHANNEL = "stable"; private function __construct(){