From e34f34f9f42aa3aaf0b145291a75e8cc4b6c879f Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 7 Jan 2025 23:09:28 +0000 Subject: [PATCH] Update BedrockProtocol dependency --- composer.lock | 20 ++++++------ phpstan.neon.dist | 1 - .../phpstan/configs/dependency-problems.neon | 31 ------------------- tests/phpstan/configs/phpstan-bugs.neon | 6 ++++ 4 files changed, 16 insertions(+), 42 deletions(-) delete mode 100644 tests/phpstan/configs/dependency-problems.neon diff --git a/composer.lock b/composer.lock index 25c42d297..d59c10727 100644 --- a/composer.lock +++ b/composer.lock @@ -256,16 +256,16 @@ }, { "name": "pocketmine/bedrock-protocol", - "version": "35.0.0+bedrock-1.21.50", + "version": "35.0.3+bedrock-1.21.50", "source": { "type": "git", "url": "https://github.com/pmmp/BedrockProtocol.git", - "reference": "bd1ec79bae8c88aa984e1c5f0c3313be5ae9b435" + "reference": "c4d62581cb62d29ec426914c6b4d7e0ff835da9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/bd1ec79bae8c88aa984e1c5f0c3313be5ae9b435", - "reference": "bd1ec79bae8c88aa984e1c5f0c3313be5ae9b435", + "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/c4d62581cb62d29ec426914c6b4d7e0ff835da9c", + "reference": "c4d62581cb62d29ec426914c6b4d7e0ff835da9c", "shasum": "" }, "require": { @@ -278,10 +278,10 @@ "ramsey/uuid": "^4.1" }, "require-dev": { - "phpstan/phpstan": "1.11.9", - "phpstan/phpstan-phpunit": "^1.0.0", - "phpstan/phpstan-strict-rules": "^1.0.0", - "phpunit/phpunit": "^9.5 || ^10.0" + "phpstan/phpstan": "2.1.0", + "phpstan/phpstan-phpunit": "^2.0.0", + "phpstan/phpstan-strict-rules": "^2.0.0", + "phpunit/phpunit": "^9.5 || ^10.0 || ^11.0" }, "type": "library", "autoload": { @@ -296,9 +296,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/35.0.0+bedrock-1.21.50" + "source": "https://github.com/pmmp/BedrockProtocol/tree/35.0.3+bedrock-1.21.50" }, - "time": "2024-12-04T13:02:00+00:00" + "time": "2025-01-07T23:06:29+00:00" }, { "name": "pocketmine/binaryutils", diff --git a/phpstan.neon.dist b/phpstan.neon.dist index dfaa964e4..63155cbc4 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,7 +1,6 @@ includes: - tests/phpstan/analyse-for-current-php-version.neon.php - tests/phpstan/configs/actual-problems.neon - - tests/phpstan/configs/dependency-problems.neon - tests/phpstan/configs/impossible-generics.neon - tests/phpstan/configs/php-bugs.neon - tests/phpstan/configs/phpstan-bugs.neon diff --git a/tests/phpstan/configs/dependency-problems.neon b/tests/phpstan/configs/dependency-problems.neon deleted file mode 100644 index e95fcd79c..000000000 --- a/tests/phpstan/configs/dependency-problems.neon +++ /dev/null @@ -1,31 +0,0 @@ -parameters: - ignoreErrors: - - - message: '#^Parameter \#1 \$input of class pocketmine\\crafting\\json\\ShapelessRecipeData constructor expects list\, array\ given\.$#' - identifier: argument.type - count: 1 - path: ../../../tools/generate-bedrock-data-from-packets.php - - - - message: '#^Parameter \#2 \$output of class pocketmine\\crafting\\json\\ShapelessRecipeData constructor expects list\, array\ given\.$#' - identifier: argument.type - count: 1 - path: ../../../tools/generate-bedrock-data-from-packets.php - - - - message: '#^Parameter \#3 \$output of class pocketmine\\crafting\\json\\ShapedRecipeData constructor expects list\, array\ given\.$#' - identifier: argument.type - count: 1 - path: ../../../tools/generate-bedrock-data-from-packets.php - - - - message: '#^Parameter \#5 \$unlockingIngredients of class pocketmine\\crafting\\json\\ShapelessRecipeData constructor expects list\, array\ given\.$#' - identifier: argument.type - count: 1 - path: ../../../tools/generate-bedrock-data-from-packets.php - - - - message: '#^Parameter \#6 \$unlockingIngredients of class pocketmine\\crafting\\json\\ShapedRecipeData constructor expects list\, array\ given\.$#' - identifier: argument.type - count: 1 - path: ../../../tools/generate-bedrock-data-from-packets.php diff --git a/tests/phpstan/configs/phpstan-bugs.neon b/tests/phpstan/configs/phpstan-bugs.neon index 7e3484bc5..9ab125763 100644 --- a/tests/phpstan/configs/phpstan-bugs.neon +++ b/tests/phpstan/configs/phpstan-bugs.neon @@ -126,6 +126,12 @@ parameters: count: 1 path: ../../../src/item/WritableBookBase.php + - + message: '#^Parameter \#3 \$input of class pocketmine\\network\\mcpe\\protocol\\types\\recipe\\ShapedRecipe constructor expects list\\>, array\, non\-empty\-array\, pocketmine\\network\\mcpe\\protocol\\types\\recipe\\RecipeIngredient\>\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../src/network/mcpe/cache/CraftingDataCache.php + - message: '#^Method pocketmine\\network\\mcpe\\compression\\ZlibCompressor\:\:getNetworkId\(\) never returns 1 so it can be removed from the return type\.$#' identifier: return.unusedType