Merge remote-tracking branch 'origin/stable' into minor-next

This commit is contained in:
Dylan K. Taylor 2024-03-04 15:40:10 +00:00
commit 3b97d067a3
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
8 changed files with 162 additions and 110 deletions

View File

@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Setup PHP and tools - name: Setup PHP and tools
uses: shivammathur/setup-php@2.29.0 uses: shivammathur/setup-php@2.30.0
with: with:
php-version: 8.2 php-version: 8.2

View File

@ -20,7 +20,7 @@ jobs:
submodules: true submodules: true
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@2.29.0 uses: shivammathur/setup-php@2.30.0
with: with:
php-version: ${{ matrix.php-version }} php-version: ${{ matrix.php-version }}

View File

@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Setup PHP and tools - name: Setup PHP and tools
uses: shivammathur/setup-php@2.29.0 uses: shivammathur/setup-php@2.30.0
with: with:
php-version: 8.2 php-version: 8.2
tools: php-cs-fixer:3.49 tools: php-cs-fixer:3.49

54
changelogs/5.12.md Normal file
View File

@ -0,0 +1,54 @@
# 5.12.0
Released 28th February 2024
**For Minecraft: Bedrock Edition 1.20.60**
This is a minor feature release, with a few new features and improvements.
**Plugin compatibility:** Plugins for previous 5.x versions will run unchanged on this release, unless they use internal APIs, reflection, or packages like the `pocketmine\network\mcpe` or `pocketmine\data` 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 a `--version` command-line option to display the server version and exit.
## Tools
- Added `tools/generate-biome-ids.php` to generate `pocketmine\data\bedrock\BiomeIds`.
- Fixed ordering of property values generated by `tools/generate-block-palette-spec.php`.
## API
### `pocketmine\block`
- The following new classes have been added:
- `utils\LightableTrait` - used by blocks with `getLit()` and `setLit()` methods
- The following methods have been deprecated:
- `Block->isSolid()` - this method returns confusing results which don't match expectations and no one really knows what it actually means
- `CocoaBlock` now extends `Flowable` to match vanilla Minecraft behaviour.
### `pocketmine\plugin`
- `PluginManager->registerEvent()` now throws an exception when given a generator function for the event handler.
- `PluginManager->registerEvents()` now throws an exception if any of the detected event handlers are generator functions. Use `@notHandler` to have the function ignored if intended.
### `pocketmine\promise`
- The following methods have been added:
- `public static Promise::all(list<Promise> $promises) : Promise` - returns a promise that is resolved once all given promises are resolved, or is rejected if any of the promises are rejected.
### `pocketmine\scheduler`
- The following methods have been deprecated:
- `AsyncWorker->getFromThreadStore()` - use class static properties for thread-local storage
- `AsyncWorker->removeFromThreadStore()`
- `AsyncWorker->saveToThreadStore()`
## Documentation
- Improved documentation of various methods in `Block`.
## Gameplay
- The following new items have been added:
- Name Tag
## Internals
- Removed specialization of shutdown logic for `Thread` vs `Worker` (no specialization is required).
- Authentication system no longer accepts logins signed with the old Mojang root public key.
- ID to enum mappings in `pocketmine\data` now use a new `match` convention to allow static analysis to ensure that all enum cases are handled.
- Updated version of `pocketmine/bedrock-protocol` allows avoiding decoding of some itemstack data from the client in most cases, improving performance.

View File

@ -52,7 +52,7 @@
"symfony/filesystem": "~6.4.0" "symfony/filesystem": "~6.4.0"
}, },
"require-dev": { "require-dev": {
"phpstan/phpstan": "1.10.58", "phpstan/phpstan": "1.10.59",
"phpstan/phpstan-phpunit": "^1.1.0", "phpstan/phpstan-phpunit": "^1.1.0",
"phpstan/phpstan-strict-rules": "^1.2.0", "phpstan/phpstan-strict-rules": "^1.2.0",
"phpunit/phpunit": "~10.3.0 || ~10.2.0 || ~10.1.0" "phpunit/phpunit": "~10.3.0 || ~10.2.0 || ~10.1.0"

202
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "f43d60f8c44393f5c42b7ba27cd8ccc0", "content-hash": "f9a2f433a86f9ea1351d6dc81b508160",
"packages": [ "packages": [
{ {
"name": "adhocore/json-comment", "name": "adhocore/json-comment",
@ -200,16 +200,16 @@
}, },
{ {
"name": "pocketmine/bedrock-protocol", "name": "pocketmine/bedrock-protocol",
"version": "28.0.0+bedrock-1.20.60", "version": "28.0.1+bedrock-1.20.60",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/pmmp/BedrockProtocol.git", "url": "https://github.com/pmmp/BedrockProtocol.git",
"reference": "6e73f21cdc7433f0674dfcdf4817f478aa5528e6" "reference": "fdb0d1ddee498f995fbd21b9077aac3d3518877e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/6e73f21cdc7433f0674dfcdf4817f478aa5528e6", "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/fdb0d1ddee498f995fbd21b9077aac3d3518877e",
"reference": "6e73f21cdc7433f0674dfcdf4817f478aa5528e6", "reference": "fdb0d1ddee498f995fbd21b9077aac3d3518877e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -240,22 +240,22 @@
"description": "An implementation of the Minecraft: Bedrock Edition protocol in PHP", "description": "An implementation of the Minecraft: Bedrock Edition protocol in PHP",
"support": { "support": {
"issues": "https://github.com/pmmp/BedrockProtocol/issues", "issues": "https://github.com/pmmp/BedrockProtocol/issues",
"source": "https://github.com/pmmp/BedrockProtocol/tree/28.0.0+bedrock-1.20.60" "source": "https://github.com/pmmp/BedrockProtocol/tree/28.0.1+bedrock-1.20.60"
}, },
"time": "2024-02-26T16:18:34+00:00" "time": "2024-03-01T21:49:48+00:00"
}, },
{ {
"name": "pocketmine/binaryutils", "name": "pocketmine/binaryutils",
"version": "0.2.4", "version": "0.2.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/pmmp/BinaryUtils.git", "url": "https://github.com/pmmp/BinaryUtils.git",
"reference": "5ac7eea91afbad8dc498f5ce34ce6297d5e6ea9a" "reference": "ccfc1899b859d45814ea3592e20ebec4cb731c84"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/pmmp/BinaryUtils/zipball/5ac7eea91afbad8dc498f5ce34ce6297d5e6ea9a", "url": "https://api.github.com/repos/pmmp/BinaryUtils/zipball/ccfc1899b859d45814ea3592e20ebec4cb731c84",
"reference": "5ac7eea91afbad8dc498f5ce34ce6297d5e6ea9a", "reference": "ccfc1899b859d45814ea3592e20ebec4cb731c84",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -264,10 +264,10 @@
}, },
"require-dev": { "require-dev": {
"phpstan/extension-installer": "^1.0", "phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "1.3.0", "phpstan/phpstan": "~1.10.3",
"phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-phpunit": "^1.0",
"phpstan/phpstan-strict-rules": "^1.0.0", "phpstan/phpstan-strict-rules": "^1.0.0",
"phpunit/phpunit": "^9.5" "phpunit/phpunit": "^9.5 || ^10.0 || ^11.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -282,9 +282,9 @@
"description": "Classes and methods for conveniently handling binary data", "description": "Classes and methods for conveniently handling binary data",
"support": { "support": {
"issues": "https://github.com/pmmp/BinaryUtils/issues", "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/callback-validator", "name": "pocketmine/callback-validator",
@ -921,16 +921,16 @@
}, },
{ {
"name": "symfony/filesystem", "name": "symfony/filesystem",
"version": "v6.4.0", "version": "v6.4.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/filesystem.git", "url": "https://github.com/symfony/filesystem.git",
"reference": "952a8cb588c3bc6ce76f6023000fb932f16a6e59" "reference": "7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/952a8cb588c3bc6ce76f6023000fb932f16a6e59", "url": "https://api.github.com/repos/symfony/filesystem/zipball/7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb",
"reference": "952a8cb588c3bc6ce76f6023000fb932f16a6e59", "reference": "7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -964,7 +964,7 @@
"description": "Provides basic utilities for the filesystem", "description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/filesystem/tree/v6.4.0" "source": "https://github.com/symfony/filesystem/tree/v6.4.3"
}, },
"funding": [ "funding": [
{ {
@ -980,20 +980,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-07-26T17:27:13+00:00" "time": "2024-01-23T14:51:35+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
"version": "v1.28.0", "version": "v1.29.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git", "url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4",
"reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1007,9 +1007,6 @@
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": {
"dev-main": "1.28-dev"
},
"thanks": { "thanks": {
"name": "symfony/polyfill", "name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill" "url": "https://github.com/symfony/polyfill"
@ -1046,7 +1043,7 @@
"portable" "portable"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0"
}, },
"funding": [ "funding": [
{ {
@ -1062,20 +1059,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-01-26T09:26:14+00:00" "time": "2024-01-29T20:11:03+00:00"
}, },
{ {
"name": "symfony/polyfill-mbstring", "name": "symfony/polyfill-mbstring",
"version": "v1.28.0", "version": "v1.29.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git", "url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "42292d99c55abe617799667f454222c54c60e229" "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
"reference": "42292d99c55abe617799667f454222c54c60e229", "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1089,9 +1086,6 @@
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": {
"dev-main": "1.28-dev"
},
"thanks": { "thanks": {
"name": "symfony/polyfill", "name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill" "url": "https://github.com/symfony/polyfill"
@ -1129,7 +1123,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0"
}, },
"funding": [ "funding": [
{ {
@ -1145,7 +1139,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-07-28T09:04:16+00:00" "time": "2024-01-29T20:11:03+00:00"
} }
], ],
"packages-dev": [ "packages-dev": [
@ -1210,16 +1204,16 @@
}, },
{ {
"name": "nikic/php-parser", "name": "nikic/php-parser",
"version": "v5.0.0", "version": "v5.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nikic/PHP-Parser.git", "url": "https://github.com/nikic/PHP-Parser.git",
"reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc" "reference": "2218c2252c874a4624ab2f613d86ac32d227bc69"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4a21235f7e56e713259a6f76bf4b5ea08502b9dc", "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/2218c2252c874a4624ab2f613d86ac32d227bc69",
"reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc", "reference": "2218c2252c874a4624ab2f613d86ac32d227bc69",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1262,26 +1256,27 @@
], ],
"support": { "support": {
"issues": "https://github.com/nikic/PHP-Parser/issues", "issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v5.0.0" "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.1"
}, },
"time": "2024-01-07T17:17:35+00:00" "time": "2024-02-21T19:24:10+00:00"
}, },
{ {
"name": "phar-io/manifest", "name": "phar-io/manifest",
"version": "2.0.3", "version": "2.0.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phar-io/manifest.git", "url": "https://github.com/phar-io/manifest.git",
"reference": "97803eca37d319dfa7826cc2437fc020857acb53" "reference": "54750ef60c58e43759730615a392c31c80e23176"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176",
"reference": "97803eca37d319dfa7826cc2437fc020857acb53", "reference": "54750ef60c58e43759730615a392c31c80e23176",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-dom": "*", "ext-dom": "*",
"ext-libxml": "*",
"ext-phar": "*", "ext-phar": "*",
"ext-xmlwriter": "*", "ext-xmlwriter": "*",
"phar-io/version": "^3.0.1", "phar-io/version": "^3.0.1",
@ -1322,9 +1317,15 @@
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
"support": { "support": {
"issues": "https://github.com/phar-io/manifest/issues", "issues": "https://github.com/phar-io/manifest/issues",
"source": "https://github.com/phar-io/manifest/tree/2.0.3" "source": "https://github.com/phar-io/manifest/tree/2.0.4"
}, },
"time": "2021-07-20T11:28:43+00:00" "funding": [
{
"url": "https://github.com/theseer",
"type": "github"
}
],
"time": "2024-03-03T12:33:53+00:00"
}, },
{ {
"name": "phar-io/version", "name": "phar-io/version",
@ -1379,16 +1380,16 @@
}, },
{ {
"name": "phpstan/phpstan", "name": "phpstan/phpstan",
"version": "1.10.58", "version": "1.10.59",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpstan.git", "url": "https://github.com/phpstan/phpstan.git",
"reference": "a23518379ec4defd9e47cbf81019526861623ec2" "reference": "e607609388d3a6d418a50a49f7940e8086798281"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/a23518379ec4defd9e47cbf81019526861623ec2", "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e607609388d3a6d418a50a49f7940e8086798281",
"reference": "a23518379ec4defd9e47cbf81019526861623ec2", "reference": "e607609388d3a6d418a50a49f7940e8086798281",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1437,20 +1438,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-02-12T20:02:57+00:00" "time": "2024-02-20T13:59:13+00:00"
}, },
{ {
"name": "phpstan/phpstan-phpunit", "name": "phpstan/phpstan-phpunit",
"version": "1.3.15", "version": "1.3.16",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpstan-phpunit.git", "url": "https://github.com/phpstan/phpstan-phpunit.git",
"reference": "70ecacc64fe8090d8d2a33db5a51fe8e88acd93a" "reference": "d5242a59d035e46774f2e634b374bc39ff62cb95"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/70ecacc64fe8090d8d2a33db5a51fe8e88acd93a", "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/d5242a59d035e46774f2e634b374bc39ff62cb95",
"reference": "70ecacc64fe8090d8d2a33db5a51fe8e88acd93a", "reference": "d5242a59d035e46774f2e634b374bc39ff62cb95",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1487,9 +1488,9 @@
"description": "PHPUnit extensions and rules for PHPStan", "description": "PHPUnit extensions and rules for PHPStan",
"support": { "support": {
"issues": "https://github.com/phpstan/phpstan-phpunit/issues", "issues": "https://github.com/phpstan/phpstan-phpunit/issues",
"source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.15" "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.16"
}, },
"time": "2023-10-09T18:58:39+00:00" "time": "2024-02-23T09:51:20+00:00"
}, },
{ {
"name": "phpstan/phpstan-strict-rules", "name": "phpstan/phpstan-strict-rules",
@ -1542,16 +1543,16 @@
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "10.1.11", "version": "10.1.12",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "78c3b7625965c2513ee96569a4dbb62601784145" "reference": "842f72662d6b9edda84c4b6f13885fd9cd53dc63"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/78c3b7625965c2513ee96569a4dbb62601784145", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/842f72662d6b9edda84c4b6f13885fd9cd53dc63",
"reference": "78c3b7625965c2513ee96569a4dbb62601784145", "reference": "842f72662d6b9edda84c4b6f13885fd9cd53dc63",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1608,7 +1609,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.11" "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.12"
}, },
"funding": [ "funding": [
{ {
@ -1616,7 +1617,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-12-21T15:38:30+00:00" "time": "2024-03-02T07:22:05+00:00"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
@ -1964,16 +1965,16 @@
}, },
{ {
"name": "sebastian/cli-parser", "name": "sebastian/cli-parser",
"version": "2.0.0", "version": "2.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git", "url": "https://github.com/sebastianbergmann/cli-parser.git",
"reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae", "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084",
"reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2008,7 +2009,8 @@
"homepage": "https://github.com/sebastianbergmann/cli-parser", "homepage": "https://github.com/sebastianbergmann/cli-parser",
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/cli-parser/issues", "issues": "https://github.com/sebastianbergmann/cli-parser/issues",
"source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0" "security": "https://github.com/sebastianbergmann/cli-parser/security/policy",
"source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1"
}, },
"funding": [ "funding": [
{ {
@ -2016,7 +2018,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-02-03T06:58:15+00:00" "time": "2024-03-02T07:12:49+00:00"
}, },
{ {
"name": "sebastian/code-unit", "name": "sebastian/code-unit",
@ -2266,16 +2268,16 @@
}, },
{ {
"name": "sebastian/diff", "name": "sebastian/diff",
"version": "5.1.0", "version": "5.1.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/diff.git", "url": "https://github.com/sebastianbergmann/diff.git",
"reference": "fbf413a49e54f6b9b17e12d900ac7f6101591b7f" "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/fbf413a49e54f6b9b17e12d900ac7f6101591b7f", "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e",
"reference": "fbf413a49e54f6b9b17e12d900ac7f6101591b7f", "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2283,7 +2285,7 @@
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^10.0", "phpunit/phpunit": "^10.0",
"symfony/process": "^4.2 || ^5" "symfony/process": "^6.4"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -2321,7 +2323,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/diff/issues", "issues": "https://github.com/sebastianbergmann/diff/issues",
"security": "https://github.com/sebastianbergmann/diff/security/policy", "security": "https://github.com/sebastianbergmann/diff/security/policy",
"source": "https://github.com/sebastianbergmann/diff/tree/5.1.0" "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1"
}, },
"funding": [ "funding": [
{ {
@ -2329,7 +2331,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-12-22T10:55:06+00:00" "time": "2024-03-02T07:15:17+00:00"
}, },
{ {
"name": "sebastian/environment", "name": "sebastian/environment",
@ -2397,16 +2399,16 @@
}, },
{ {
"name": "sebastian/exporter", "name": "sebastian/exporter",
"version": "5.1.1", "version": "5.1.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git", "url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc" "reference": "955288482d97c19a372d3f31006ab3f37da47adf"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/64f51654862e0f5e318db7e9dcc2292c63cdbddc", "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf",
"reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc", "reference": "955288482d97c19a372d3f31006ab3f37da47adf",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2463,7 +2465,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues", "issues": "https://github.com/sebastianbergmann/exporter/issues",
"security": "https://github.com/sebastianbergmann/exporter/security/policy", "security": "https://github.com/sebastianbergmann/exporter/security/policy",
"source": "https://github.com/sebastianbergmann/exporter/tree/5.1.1" "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2"
}, },
"funding": [ "funding": [
{ {
@ -2471,20 +2473,20 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-09-24T13:22:09+00:00" "time": "2024-03-02T07:17:12+00:00"
}, },
{ {
"name": "sebastian/global-state", "name": "sebastian/global-state",
"version": "6.0.1", "version": "6.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git", "url": "https://github.com/sebastianbergmann/global-state.git",
"reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4" "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/7ea9ead78f6d380d2a667864c132c2f7b83055e4", "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9",
"reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4", "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2518,14 +2520,14 @@
} }
], ],
"description": "Snapshotting of global state", "description": "Snapshotting of global state",
"homepage": "http://www.github.com/sebastianbergmann/global-state", "homepage": "https://www.github.com/sebastianbergmann/global-state",
"keywords": [ "keywords": [
"global state" "global state"
], ],
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues", "issues": "https://github.com/sebastianbergmann/global-state/issues",
"security": "https://github.com/sebastianbergmann/global-state/security/policy", "security": "https://github.com/sebastianbergmann/global-state/security/policy",
"source": "https://github.com/sebastianbergmann/global-state/tree/6.0.1" "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2"
}, },
"funding": [ "funding": [
{ {
@ -2533,7 +2535,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-07-19T07:19:23+00:00" "time": "2024-03-02T07:19:19+00:00"
}, },
{ {
"name": "sebastian/lines-of-code", "name": "sebastian/lines-of-code",
@ -2879,16 +2881,16 @@
}, },
{ {
"name": "theseer/tokenizer", "name": "theseer/tokenizer",
"version": "1.2.2", "version": "1.2.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/theseer/tokenizer.git", "url": "https://github.com/theseer/tokenizer.git",
"reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2",
"reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2917,7 +2919,7 @@
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"support": { "support": {
"issues": "https://github.com/theseer/tokenizer/issues", "issues": "https://github.com/theseer/tokenizer/issues",
"source": "https://github.com/theseer/tokenizer/tree/1.2.2" "source": "https://github.com/theseer/tokenizer/tree/1.2.3"
}, },
"funding": [ "funding": [
{ {
@ -2925,7 +2927,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-11-20T00:12:19+00:00" "time": "2024-03-03T12:36:25+00:00"
} }
], ],
"aliases": [], "aliases": [],

View File

@ -31,7 +31,7 @@ use function str_repeat;
final class VersionInfo{ final class VersionInfo{
public const NAME = "PocketMine-MP"; public const NAME = "PocketMine-MP";
public const BASE_VERSION = "5.11.3"; public const BASE_VERSION = "5.12.1";
public const IS_DEVELOPMENT_BUILD = true; public const IS_DEVELOPMENT_BUILD = true;
public const BUILD_CHANNEL = "stable"; public const BUILD_CHANNEL = "stable";

View File

@ -361,12 +361,12 @@ class NetworkSession{
} }
if($this->enableCompression){ if($this->enableCompression){
Timings::$playerNetworkReceiveDecompress->startTiming();
$compressionType = ord($payload[0]); $compressionType = ord($payload[0]);
$compressed = substr($payload, 1); $compressed = substr($payload, 1);
if($compressionType === CompressionAlgorithm::NONE){ if($compressionType === CompressionAlgorithm::NONE){
$decompressed = $compressed; $decompressed = $compressed;
}elseif($compressionType === $this->compressor->getNetworkId()){ }elseif($compressionType === $this->compressor->getNetworkId()){
Timings::$playerNetworkReceiveDecompress->startTiming();
try{ try{
$decompressed = $this->compressor->decompress($compressed); $decompressed = $this->compressor->decompress($compressed);
}catch(DecompressionException $e){ }catch(DecompressionException $e){
@ -384,12 +384,8 @@ class NetworkSession{
try{ try{
$stream = new BinaryStream($decompressed); $stream = new BinaryStream($decompressed);
$count = 0;
foreach(PacketBatch::decodeRaw($stream) as $buffer){ foreach(PacketBatch::decodeRaw($stream) as $buffer){
$this->gamePacketLimiter->decrement(); $this->gamePacketLimiter->decrement();
if(++$count > 100){
throw new PacketHandlingException("Too many packets in batch");
}
$packet = $this->packetPool->getPacket($buffer); $packet = $this->packetPool->getPacket($buffer);
if($packet === null){ if($packet === null){
$this->logger->debug("Unknown packet: " . base64_encode($buffer)); $this->logger->debug("Unknown packet: " . base64_encode($buffer));