diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 28023cd..aa86a37 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -64,7 +64,7 @@ jobs: image: [ubuntu-20.04] suittest: ["normal", "with_plugin", "no_test"] php: ["8.1", "8.2", "8.3"] - pmmp: ["5.8.2","5.9.0", "5.10.0"] + pmmp: ["5.15.0"] steps: - uses: actions/checkout@v4 diff --git a/Makefile b/Makefile index b5c50ad..7e14442 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ composer/install: dev/composer.phar $(PHP) $(COMPOSER) install unittests: - export PHP_VERSION=8.1 && export PMMP_TAG=5.10.0 && make suitetest + export PHP_VERSION=8.2 && export PMMP_TAG=5.15.0 && make suitetest suitetest: $(eval CONTAINER_PREFIX := unittests-suite) diff --git a/composer.json b/composer.json index 7355c47..b535198 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,6 @@ "require-dev": { "friendsofphp/php-cs-fixer": "*", "phpstan/phpstan": "^1.10", - "pocketmine/pocketmine-mp": "^5.8" + "pocketmine/pocketmine-mp": "^5.15" } } diff --git a/composer.lock b/composer.lock index 78caa74..07122a6 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": "4d41c8539e15957ce4aa11c4eb683ae6", + "content-hash": "f97daec01ece52d1d3a435bbc0ebad0c", "packages": [ { "name": "pocketmine/callback-validator", @@ -361,25 +361,25 @@ }, { "name": "brick/math", - "version": "0.11.0", + "version": "0.12.1", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478" + "reference": "f510c0a40911935b77b86859eb5223d58d660df1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/0ad82ce168c82ba30d1c01ec86116ab52f589478", - "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478", + "url": "https://api.github.com/repos/brick/math/zipball/f510c0a40911935b77b86859eb5223d58d660df1", + "reference": "f510c0a40911935b77b86859eb5223d58d660df1", "shasum": "" }, "require": { - "php": "^8.0" + "php": "^8.1" }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^9.0", - "vimeo/psalm": "5.0.0" + "phpunit/phpunit": "^10.1", + "vimeo/psalm": "5.16.0" }, "type": "library", "autoload": { @@ -399,12 +399,17 @@ "arithmetic", "bigdecimal", "bignum", + "bignumber", "brick", - "math" + "decimal", + "integer", + "math", + "mathematics", + "rational" ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.11.0" + "source": "https://github.com/brick/math/tree/0.12.1" }, "funding": [ { @@ -412,7 +417,7 @@ "type": "github" } ], - "time": "2023-01-15T23:15:59+00:00" + "time": "2023-11-29T23:19:16+00:00" }, { "name": "composer/pcre", @@ -787,16 +792,16 @@ }, { "name": "pocketmine/bedrock-block-upgrade-schema", - "version": "3.4.0", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/pmmp/BedrockBlockUpgradeSchema.git", - "reference": "9872eb37f15080b19c2b7861085e549c48dda92d" + "reference": "d6b10cb0a5e69fb1dfe3b7f493bf4f519723a9cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockBlockUpgradeSchema/zipball/9872eb37f15080b19c2b7861085e549c48dda92d", - "reference": "9872eb37f15080b19c2b7861085e549c48dda92d", + "url": "https://api.github.com/repos/pmmp/BedrockBlockUpgradeSchema/zipball/d6b10cb0a5e69fb1dfe3b7f493bf4f519723a9cb", + "reference": "d6b10cb0a5e69fb1dfe3b7f493bf4f519723a9cb", "shasum": "" }, "type": "library", @@ -807,22 +812,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.4.0" + "source": "https://github.com/pmmp/BedrockBlockUpgradeSchema/tree/4.1.0" }, - "time": "2023-11-08T15:22:06+00:00" + "time": "2024-04-05T17:28:14+00:00" }, { "name": "pocketmine/bedrock-data", - "version": "2.7.0+bedrock-1.20.50", + "version": "2.10.0+bedrock-1.20.80", "source": { "type": "git", "url": "https://github.com/pmmp/BedrockData.git", - "reference": "36f975dfca7520b7d36b0b39429f274464c9bc13" + "reference": "d7d709fec3848f56ca77f5ff0e5d4741b59f9d69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockData/zipball/36f975dfca7520b7d36b0b39429f274464c9bc13", - "reference": "36f975dfca7520b7d36b0b39429f274464c9bc13", + "url": "https://api.github.com/repos/pmmp/BedrockData/zipball/d7d709fec3848f56ca77f5ff0e5d4741b59f9d69", + "reference": "d7d709fec3848f56ca77f5ff0e5d4741b59f9d69", "shasum": "" }, "type": "library", @@ -833,22 +838,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.50" + "source": "https://github.com/pmmp/BedrockData/tree/bedrock-1.20.80" }, - "time": "2023-12-06T13:59:08+00:00" + "time": "2024-04-25T10:08:23+00:00" }, { "name": "pocketmine/bedrock-item-upgrade-schema", - "version": "1.6.0", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/pmmp/BedrockItemUpgradeSchema.git", - "reference": "d374e5fd8302977675dcd2a42733abd3ee476ca1" + "reference": "24a89457c17c271b5378b195931e720873865a79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockItemUpgradeSchema/zipball/d374e5fd8302977675dcd2a42733abd3ee476ca1", - "reference": "d374e5fd8302977675dcd2a42733abd3ee476ca1", + "url": "https://api.github.com/repos/pmmp/BedrockItemUpgradeSchema/zipball/24a89457c17c271b5378b195931e720873865a79", + "reference": "24a89457c17c271b5378b195931e720873865a79", "shasum": "" }, "type": "library", @@ -859,27 +864,26 @@ "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.6.0" + "source": "https://github.com/pmmp/BedrockItemUpgradeSchema/tree/1.9.0" }, - "time": "2023-11-08T18:12:14+00:00" + "time": "2024-04-05T18:46:07+00:00" }, { "name": "pocketmine/bedrock-protocol", - "version": "26.0.0+bedrock-1.20.50", + "version": "30.0.0+bedrock-1.20.80", "source": { "type": "git", "url": "https://github.com/pmmp/BedrockProtocol.git", - "reference": "f278a0b6d4fa1e2e0408a125f323a3118b1968df" + "reference": "dc7606a9f778eeeeccfae393bd58e0b62ec6f85a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/f278a0b6d4fa1e2e0408a125f323a3118b1968df", - "reference": "f278a0b6d4fa1e2e0408a125f323a3118b1968df", + "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/dc7606a9f778eeeeccfae393bd58e0b62ec6f85a", + "reference": "dc7606a9f778eeeeccfae393bd58e0b62ec6f85a", "shasum": "" }, "require": { "ext-json": "*", - "netresearch/jsonmapper": "^4.0", "php": "^8.1", "pocketmine/binaryutils": "^0.2.0", "pocketmine/color": "^0.2.0 || ^0.3.0", @@ -888,7 +892,7 @@ "ramsey/uuid": "^4.1" }, "require-dev": { - "phpstan/phpstan": "1.10.39", + "phpstan/phpstan": "1.10.59", "phpstan/phpstan-phpunit": "^1.0.0", "phpstan/phpstan-strict-rules": "^1.0.0", "phpunit/phpunit": "^9.5 || ^10.0" @@ -906,22 +910,22 @@ "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/26.0.0+bedrock-1.20.50" + "source": "https://github.com/pmmp/BedrockProtocol/tree/30.0.0+bedrock-1.20.80" }, - "time": "2023-12-06T14:08:37+00:00" + "time": "2024-04-05T17:53:35+00:00" }, { "name": "pocketmine/binaryutils", - "version": "0.2.4", + "version": "0.2.6", "source": { "type": "git", "url": "https://github.com/pmmp/BinaryUtils.git", - "reference": "5ac7eea91afbad8dc498f5ce34ce6297d5e6ea9a" + "reference": "ccfc1899b859d45814ea3592e20ebec4cb731c84" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BinaryUtils/zipball/5ac7eea91afbad8dc498f5ce34ce6297d5e6ea9a", - "reference": "5ac7eea91afbad8dc498f5ce34ce6297d5e6ea9a", + "url": "https://api.github.com/repos/pmmp/BinaryUtils/zipball/ccfc1899b859d45814ea3592e20ebec4cb731c84", + "reference": "ccfc1899b859d45814ea3592e20ebec4cb731c84", "shasum": "" }, "require": { @@ -930,10 +934,10 @@ }, "require-dev": { "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "1.3.0", + "phpstan/phpstan": "~1.10.3", "phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-strict-rules": "^1.0.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.5 || ^10.0 || ^11.0" }, "type": "library", "autoload": { @@ -948,9 +952,9 @@ "description": "Classes and methods for conveniently handling binary data", "support": { "issues": "https://github.com/pmmp/BinaryUtils/issues", - "source": "https://github.com/pmmp/BinaryUtils/tree/0.2.4" + "source": "https://github.com/pmmp/BinaryUtils/tree/0.2.6" }, - "time": "2022-01-12T18:06:33+00:00" + "time": "2024-03-04T15:04:17+00:00" }, { "name": "pocketmine/color", @@ -992,25 +996,25 @@ }, { "name": "pocketmine/errorhandler", - "version": "0.6.0", + "version": "0.7.0", "source": { "type": "git", "url": "https://github.com/pmmp/ErrorHandler.git", - "reference": "dae214a04348b911e8219ebf125ff1c5589cc878" + "reference": "cae94884368a74ece5294b9ff7fef18732dcd921" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/ErrorHandler/zipball/dae214a04348b911e8219ebf125ff1c5589cc878", - "reference": "dae214a04348b911e8219ebf125ff1c5589cc878", + "url": "https://api.github.com/repos/pmmp/ErrorHandler/zipball/cae94884368a74ece5294b9ff7fef18732dcd921", + "reference": "cae94884368a74ece5294b9ff7fef18732dcd921", "shasum": "" }, "require": { "php": "^8.0" }, "require-dev": { - "phpstan/phpstan": "0.12.99", - "phpstan/phpstan-strict-rules": "^0.12.2", - "phpunit/phpunit": "^9.5" + "phpstan/phpstan": "~1.10.3", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5 || ^10.0 || ^11.0" }, "type": "library", "autoload": { @@ -1025,9 +1029,9 @@ "description": "Utilities to handle nasty PHP E_* errors in a usable way", "support": { "issues": "https://github.com/pmmp/ErrorHandler/issues", - "source": "https://github.com/pmmp/ErrorHandler/tree/0.6.0" + "source": "https://github.com/pmmp/ErrorHandler/tree/0.7.0" }, - "time": "2022-01-08T21:05:46+00:00" + "time": "2024-04-02T18:29:54+00:00" }, { "name": "pocketmine/locale-data", @@ -1178,16 +1182,16 @@ }, { "name": "pocketmine/netresearch-jsonmapper", - "version": "v4.2.1000", + "version": "v4.4.999", "source": { "type": "git", "url": "https://github.com/pmmp/netresearch-jsonmapper.git", - "reference": "078764e869e9b732f97206ec9363480a77c35532" + "reference": "9a6610033d56e358e86a3e4fd5f87063c7318833" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/netresearch-jsonmapper/zipball/078764e869e9b732f97206ec9363480a77c35532", - "reference": "078764e869e9b732f97206ec9363480a77c35532", + "url": "https://api.github.com/repos/pmmp/netresearch-jsonmapper/zipball/9a6610033d56e358e86a3e4fd5f87063c7318833", + "reference": "9a6610033d56e358e86a3e4fd5f87063c7318833", "shasum": "" }, "require": { @@ -1201,7 +1205,7 @@ "netresearch/jsonmapper": "~4.2.0" }, "require-dev": { - "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0 || ~10.0", "squizlabs/php_codesniffer": "~3.5" }, "type": "library", @@ -1226,22 +1230,22 @@ "support": { "email": "cweiske@cweiske.de", "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/pmmp/netresearch-jsonmapper/tree/v4.2.1000" + "source": "https://github.com/pmmp/netresearch-jsonmapper/tree/v4.4.999" }, - "time": "2023-07-14T10:44:14+00:00" + "time": "2024-02-23T13:17:01+00:00" }, { "name": "pocketmine/pocketmine-mp", - "version": "5.10.0", + "version": "5.15.0", "source": { "type": "git", "url": "https://github.com/pmmp/PocketMine-MP.git", - "reference": "daeba95101e6278d1f2552397043d29d29d272f8" + "reference": "d273ccf87ca2e7ac52b4c6091576336930720edc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/PocketMine-MP/zipball/daeba95101e6278d1f2552397043d29d29d272f8", - "reference": "daeba95101e6278d1f2552397043d29d29d272f8", + "url": "https://api.github.com/repos/pmmp/PocketMine-MP/zipball/d273ccf87ca2e7ac52b4c6091576336930720edc", + "reference": "d273ccf87ca2e7ac52b4c6091576336930720edc", "shasum": "" }, "require": { @@ -1262,7 +1266,7 @@ "ext-openssl": "*", "ext-pcre": "*", "ext-phar": "*", - "ext-pmmpthread": "^6.0.7", + "ext-pmmpthread": "^6.1.0", "ext-reflection": "*", "ext-simplexml": "*", "ext-sockets": "*", @@ -1272,27 +1276,27 @@ "ext-zlib": ">=1.2.11", "php": "^8.1", "php-64bit": "*", - "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/bedrock-block-upgrade-schema": "~4.1.0+bedrock-1.20.80", + "pocketmine/bedrock-data": "~2.10.0+bedrock-1.20.80", + "pocketmine/bedrock-item-upgrade-schema": "~1.9.0+bedrock-1.20.80", + "pocketmine/bedrock-protocol": "~30.0.0+bedrock-1.20.80", "pocketmine/binaryutils": "^0.2.1", "pocketmine/callback-validator": "^1.0.2", "pocketmine/color": "^0.3.0", - "pocketmine/errorhandler": "^0.6.0", + "pocketmine/errorhandler": "^0.7.0", "pocketmine/locale-data": "~2.19.0", "pocketmine/log": "^0.4.0", "pocketmine/math": "~1.0.0", "pocketmine/nbt": "~1.0.0", - "pocketmine/netresearch-jsonmapper": "~v4.2.1000", - "pocketmine/raklib": "^0.15.0", - "pocketmine/raklib-ipc": "^0.2.0", + "pocketmine/netresearch-jsonmapper": "~v4.4.999", + "pocketmine/raklib": "~1.1.0", + "pocketmine/raklib-ipc": "~1.0.0", "pocketmine/snooze": "^0.5.0", "ramsey/uuid": "~4.7.0", - "symfony/filesystem": "~6.3.0" + "symfony/filesystem": "~6.4.0" }, "require-dev": { - "phpstan/phpstan": "1.10.47", + "phpstan/phpstan": "1.10.66", "phpstan/phpstan-phpunit": "^1.1.0", "phpstan/phpstan-strict-rules": "^1.2.0", "phpunit/phpunit": "~10.3.0 || ~10.2.0 || ~10.1.0" @@ -1314,7 +1318,7 @@ "homepage": "https://pmmp.io", "support": { "issues": "https://github.com/pmmp/PocketMine-MP/issues", - "source": "https://github.com/pmmp/PocketMine-MP/tree/5.10.0" + "source": "https://github.com/pmmp/PocketMine-MP/tree/5.15.0" }, "funding": [ { @@ -1326,32 +1330,32 @@ "type": "patreon" } ], - "time": "2023-12-14T16:54:38+00:00" + "time": "2024-04-25T10:52:30+00:00" }, { "name": "pocketmine/raklib", - "version": "0.15.1", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/pmmp/RakLib.git", - "reference": "79b7b4d1d7516dc6e322514453645ad9452b20ca" + "reference": "be2783be516bf6e2872ff5c81fb9048596617b97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/RakLib/zipball/79b7b4d1d7516dc6e322514453645ad9452b20ca", - "reference": "79b7b4d1d7516dc6e322514453645ad9452b20ca", + "url": "https://api.github.com/repos/pmmp/RakLib/zipball/be2783be516bf6e2872ff5c81fb9048596617b97", + "reference": "be2783be516bf6e2872ff5c81fb9048596617b97", "shasum": "" }, "require": { "ext-sockets": "*", - "php": "^8.0", + "php": "^8.1", "php-64bit": "*", "php-ipv6": "*", "pocketmine/binaryutils": "^0.2.0", "pocketmine/log": "^0.3.0 || ^0.4.0" }, "require-dev": { - "phpstan/phpstan": "1.9.17", + "phpstan/phpstan": "1.10.1", "phpstan/phpstan-strict-rules": "^1.0" }, "type": "library", @@ -1367,32 +1371,32 @@ "description": "A RakNet server implementation written in PHP", "support": { "issues": "https://github.com/pmmp/RakLib/issues", - "source": "https://github.com/pmmp/RakLib/tree/0.15.1" + "source": "https://github.com/pmmp/RakLib/tree/1.1.1" }, - "time": "2023-03-07T15:10:34+00:00" + "time": "2024-03-04T14:02:14+00:00" }, { "name": "pocketmine/raklib-ipc", - "version": "0.2.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/pmmp/RakLibIpc.git", - "reference": "26ed56fa9db06e4ca6e8920c0ede2e01e219bb9c" + "reference": "ce632ef2c6743e71eddb5dc329c49af6555f90bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/RakLibIpc/zipball/26ed56fa9db06e4ca6e8920c0ede2e01e219bb9c", - "reference": "26ed56fa9db06e4ca6e8920c0ede2e01e219bb9c", + "url": "https://api.github.com/repos/pmmp/RakLibIpc/zipball/ce632ef2c6743e71eddb5dc329c49af6555f90bc", + "reference": "ce632ef2c6743e71eddb5dc329c49af6555f90bc", "shasum": "" }, "require": { "php": "^8.0", "php-64bit": "*", "pocketmine/binaryutils": "^0.2.0", - "pocketmine/raklib": "^0.15.0" + "pocketmine/raklib": "^0.15.0 || ^1.0.0" }, "require-dev": { - "phpstan/phpstan": "1.9.17", + "phpstan/phpstan": "1.10.1", "phpstan/phpstan-strict-rules": "^1.0.0" }, "type": "library", @@ -1408,9 +1412,9 @@ "description": "Channel-based protocols for inter-thread/inter-process communication with RakLib", "support": { "issues": "https://github.com/pmmp/RakLibIpc/issues", - "source": "https://github.com/pmmp/RakLibIpc/tree/0.2.0" + "source": "https://github.com/pmmp/RakLibIpc/tree/1.0.1" }, - "time": "2023-02-13T13:40:40+00:00" + "time": "2024-03-01T15:55:05+00:00" }, { "name": "pocketmine/snooze", @@ -1696,20 +1700,20 @@ }, { "name": "ramsey/uuid", - "version": "4.7.5", + "version": "4.7.6", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e" + "reference": "91039bc1faa45ba123c4328958e620d382ec7088" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", - "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088", + "reference": "91039bc1faa45ba123c4328958e620d382ec7088", "shasum": "" }, "require": { - "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11", + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12", "ext-json": "*", "php": "^8.0", "ramsey/collection": "^1.2 || ^2.0" @@ -1772,7 +1776,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.7.5" + "source": "https://github.com/ramsey/uuid/tree/4.7.6" }, "funding": [ { @@ -1784,7 +1788,7 @@ "type": "tidelift" } ], - "time": "2023-11-08T05:53:05+00:00" + "time": "2024-04-27T21:32:50+00:00" }, { "name": "sebastian/diff", @@ -2172,16 +2176,16 @@ }, { "name": "symfony/filesystem", - "version": "v6.3.1", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" + "reference": "4d37529150e7081c51b3c5d5718c55a04a9503f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/4d37529150e7081c51b3c5d5718c55a04a9503f3", + "reference": "4d37529150e7081c51b3c5d5718c55a04a9503f3", "shasum": "" }, "require": { @@ -2189,6 +2193,9 @@ "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, + "require-dev": { + "symfony/process": "^5.4|^6.4|^7.0" + }, "type": "library", "autoload": { "psr-4": { @@ -2215,7 +2222,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.3.1" + "source": "https://github.com/symfony/filesystem/tree/v6.4.8" }, "funding": [ { @@ -2231,7 +2238,7 @@ "type": "tidelift" } ], - "time": "2023-06-01T08:30:39+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/finder", @@ -2366,16 +2373,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { @@ -2389,9 +2396,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2428,7 +2432,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" }, "funding": [ { @@ -2444,7 +2448,7 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -2613,16 +2617,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -2636,9 +2640,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2676,7 +2677,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -2692,20 +2693,20 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", "shasum": "" }, "require": { @@ -2713,9 +2714,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2759,7 +2757,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" }, "funding": [ { @@ -2775,20 +2773,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" + "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d", + "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d", "shasum": "" }, "require": { @@ -2796,9 +2794,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2838,7 +2833,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0" }, "funding": [ { @@ -2854,24 +2849,24 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/process", - "version": "v6.4.0", + "version": "v7.1.1", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "191703b1566d97a5425dc969e4350d32b8ef17aa" + "reference": "febf90124323a093c7ee06fdb30e765ca3c20028" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/191703b1566d97a5425dc969e4350d32b8ef17aa", - "reference": "191703b1566d97a5425dc969e4350d32b8ef17aa", + "url": "https://api.github.com/repos/symfony/process/zipball/febf90124323a093c7ee06fdb30e765ca3c20028", + "reference": "febf90124323a093c7ee06fdb30e765ca3c20028", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "type": "library", "autoload": { @@ -2899,7 +2894,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.4.0" + "source": "https://github.com/symfony/process/tree/v7.1.1" }, "funding": [ { @@ -2915,7 +2910,7 @@ "type": "tidelift" } ], - "time": "2023-11-17T21:06:49+00:00" + "time": "2024-05-31T14:57:53+00:00" }, { "name": "symfony/service-contracts", diff --git a/src/framework/assert/BaseAssert.php b/src/framework/assert/BaseAssert.php index 760f430..7df22f5 100644 --- a/src/framework/assert/BaseAssert.php +++ b/src/framework/assert/BaseAssert.php @@ -40,7 +40,7 @@ protected function assertEquals(mixed $expected, mixed $actual, string $message /** * @phpstan-return PromiseInterface */ - protected function assertNotEquals(mixed $expected, mixed $actual, string $message = null) : PromiseInterface { + protected function assertNotEquals(mixed $expected, mixed $actual, ?string $message = null) : PromiseInterface { Assert::notEq($actual, $expected, $message ?? "Expected $actual to not be equal to $expected"); return $this->assertSyncPromise(); diff --git a/src/players/DefaultTestPlayerListener.php b/src/players/DefaultTestPlayerListener.php index c6df57e..5aba332 100644 --- a/src/players/DefaultTestPlayerListener.php +++ b/src/players/DefaultTestPlayerListener.php @@ -4,7 +4,6 @@ namespace ShockedPlot7560\PmmpUnit\players; -use pocketmine\network\mcpe\convert\TypeConverter; use pocketmine\network\mcpe\NetworkSession; use pocketmine\network\mcpe\protocol\ChangeDimensionPacket; use pocketmine\network\mcpe\protocol\ClientboundPacket; @@ -12,7 +11,6 @@ use pocketmine\network\mcpe\protocol\PlayStatusPacket; use pocketmine\network\mcpe\protocol\RespawnPacket; use pocketmine\network\mcpe\protocol\serializer\PacketSerializer; -use pocketmine\network\mcpe\protocol\serializer\PacketSerializerContext; use pocketmine\network\mcpe\protocol\SetLocalPlayerAsInitializedPacket; use pocketmine\network\mcpe\protocol\types\BlockPosition; use pocketmine\network\mcpe\protocol\types\PlayerAction; @@ -39,7 +37,7 @@ public function onPlayerAdd(Player $player) : void { $this->plugin->getPlugin()->getScheduler()->scheduleDelayedTask(new ClosureTask(static function () use ($session, $entity_runtime_id) : void { if ($session->isConnected()) { $packet = SetLocalPlayerAsInitializedPacket::create($entity_runtime_id); - $serializer = PacketSerializer::encoder(new PacketSerializerContext(TypeConverter::getInstance()->getItemTypeDictionary())); + $serializer = PacketSerializer::encoder(); $packet->encode($serializer); $session->handleDataPacket($packet, $serializer->getBuffer()); } @@ -75,7 +73,7 @@ public function onPlayerAdd(Player $player) : void { 0 ); - $serializer = PacketSerializer::encoder(new PacketSerializerContext(TypeConverter::getInstance()->getItemTypeDictionary())); + $serializer = PacketSerializer::encoder(); $packet->encode($serializer); $session->handleDataPacket($packet, $serializer->getBuffer()); } diff --git a/src/players/TestPacketSender.php b/src/players/TestPacketSender.php index 5a4e184..4f26794 100644 --- a/src/players/TestPacketSender.php +++ b/src/players/TestPacketSender.php @@ -5,9 +5,8 @@ namespace ShockedPlot7560\PmmpUnit\players; use pocketmine\network\mcpe\PacketSender; - final class TestPacketSender implements PacketSender { - public function send(string $payload, bool $immediate) : void { + public function send(string $payload, bool $immediate, ?int $receiptId) : void { } public function close(string $reason = "unknown reason") : void { diff --git a/src/players/TestPlayerManager.php b/src/players/TestPlayerManager.php index b8ca8cb..d4b8cd6 100644 --- a/src/players/TestPlayerManager.php +++ b/src/players/TestPlayerManager.php @@ -6,13 +6,11 @@ use pocketmine\event\Listener; use pocketmine\event\player\PlayerQuitEvent; use pocketmine\network\mcpe\compression\ZlibCompressor; -use pocketmine\network\mcpe\convert\TypeConverter; use pocketmine\network\mcpe\NetworkSession; use pocketmine\network\mcpe\protocol\PacketPool; use pocketmine\network\mcpe\protocol\ProtocolInfo; use pocketmine\network\mcpe\protocol\ResourcePackClientResponsePacket; use pocketmine\network\mcpe\protocol\serializer\PacketSerializer; -use pocketmine\network\mcpe\protocol\serializer\PacketSerializerContext; use pocketmine\network\mcpe\protocol\types\DeviceOS; use pocketmine\network\mcpe\protocol\types\InputMode; use pocketmine\network\mcpe\protocol\types\login\ClientData; @@ -153,16 +151,12 @@ public function addPlayer(TestPlayerInfo $info) : Promise { if ($rakLibInterface === null) { throw new RuntimeException("RakLibInterface not found"); } - /** @var ReflectionClass $reflection */ - $reflection = new ReflectionClass($rakLibInterface); - $packetContect = $reflection->getProperty("packetSerializerContext"); - $value = $packetContect->getValue($rakLibInterface); $session = new TestPlayerNetworkSession( $server, $network->getSessionManager(), PacketPool::getInstance(), new TestPacketSender(), - new StandardPacketBroadcaster($server, $value), + new StandardPacketBroadcaster($server), ZlibCompressor::getInstance(), $server->getIp(), $server->getPort(), @@ -177,7 +171,7 @@ public function addPlayer(TestPlayerInfo $info) : Promise { $rp->invoke($session); $packet = ResourcePackClientResponsePacket::create(ResourcePackClientResponsePacket::STATUS_COMPLETED, []); - $serializer = PacketSerializer::encoder(new PacketSerializerContext(TypeConverter::getInstance()->getItemTypeDictionary())); + $serializer = PacketSerializer::encoder(); $packet->encode($serializer); $session->handleDataPacket($packet, $serializer->getBuffer()); diff --git a/src/players/network/TestPlayerNetworkSession.php b/src/players/network/TestPlayerNetworkSession.php index babc251..5d15823 100644 --- a/src/players/network/TestPlayerNetworkSession.php +++ b/src/players/network/TestPlayerNetworkSession.php @@ -17,7 +17,6 @@ use pocketmine\player\Player; use pocketmine\promise\PromiseResolver; use pocketmine\Server; -use ReflectionClass; use ReflectionMethod; use ReflectionProperty; use ShockedPlot7560\PmmpUnit\players\network\listener\TestPlayerPacketListener; @@ -53,11 +52,7 @@ public function __construct( break; } } - /** @var ReflectionClass $reflection */ - $reflection = new ReflectionClass($rakLibInterface); - $packetContect = $reflection->getProperty("packetSerializerContext"); - $value = $packetContect->getValue($rakLibInterface); - parent::__construct($server, $manager, $packetPool, $value, $sender, $broadcaster, new StandardEntityEventBroadcaster($broadcaster, $typeConverter), $compressor, $typeConverter, $ip, $port); + parent::__construct($server, $manager, $packetPool, $sender, $broadcaster, new StandardEntityEventBroadcaster($broadcaster, $typeConverter), $compressor, $typeConverter, $ip, $port); $this->playerAddResolver = $playerAddResolver; // do not store the resolver eternally