diff --git a/.github/workflows/discord-release-notify.yml b/.github/workflows/discord-release-notify.yml index 595b7374a..91fb4c83e 100644 --- a/.github/workflows/discord-release-notify.yml +++ b/.github/workflows/discord-release-notify.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v3 - name: Setup PHP and tools - uses: shivammathur/setup-php@2.23.0 + uses: shivammathur/setup-php@2.24.0 with: php-version: 8.0 diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 3d49656a8..0b7217a08 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -18,7 +18,7 @@ jobs: submodules: true - name: Setup PHP - uses: shivammathur/setup-php@2.23.0 + uses: shivammathur/setup-php@2.24.0 with: php-version: 8.0 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 85abd45ed..48927a0b6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,6 +9,7 @@ jobs: build-php: name: Prepare PHP runs-on: ${{ matrix.image }} + concurrency: php-build-${{ matrix.php }} strategy: matrix: @@ -203,7 +204,7 @@ jobs: - uses: actions/checkout@v3 - name: Setup PHP and tools - uses: shivammathur/setup-php@2.23.0 + uses: shivammathur/setup-php@2.24.0 with: php-version: 8.0 tools: php-cs-fixer:3.11 diff --git a/build/php b/build/php index b479ec438..c6585061c 160000 --- a/build/php +++ b/build/php @@ -1 +1 @@ -Subproject commit b479ec438f05459eac959f4952152527bbc7ce0b +Subproject commit c6585061ca9b2f5aed7d030aae583fc3de9b2557 diff --git a/changelogs/4.12.md b/changelogs/4.12.md index 8878a42f5..068fefab4 100644 --- a/changelogs/4.12.md +++ b/changelogs/4.12.md @@ -104,3 +104,16 @@ Released 18th January 2023. ## Note about server load & performance This version will report higher apparent server load than previous versions. The actual performance of the server is unchanged; the previous reported load was inaccurate. These bugs have been present for nearly 5 years (ever since the first introduction of Snooze in 3.0.0). + +# 4.12.11 +Released 22nd January 2023. + +## General +- Code is now tested and analysed using PHP 8.2 in addition to 8.1 and 8.0. + +## Fixes +- Fixed pthreads 5.0.0 incorrectly being treated as compatible. +- Fixed deprecation errors on PHP 8.2. + +## Documentation +- Updated documentation in `PlayerPreLoginEvent`. diff --git a/composer.json b/composer.json index f4f97914f..68ee421c9 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "pocketmine/bedrock-block-upgrade-schema": "dev-master@dev", "pocketmine/bedrock-data": "dev-modern-world-support@dev", "pocketmine/bedrock-item-upgrade-schema": "dev-master", - "pocketmine/bedrock-protocol": "~18.0.0+bedrock-1.19.50", + "pocketmine/bedrock-protocol": "~18.1.0+bedrock-1.19.50", "pocketmine/binaryutils": "^0.2.1", "pocketmine/callback-validator": "^1.0.2", "pocketmine/classloader": "^0.3.0", @@ -55,7 +55,7 @@ "symfony/filesystem": "^5.4" }, "require-dev": { - "phpstan/phpstan": "1.9.13", + "phpstan/phpstan": "1.9.14", "phpstan/phpstan-phpunit": "^1.1.0", "phpstan/phpstan-strict-rules": "^1.2.0", "phpunit/phpunit": "^9.2" diff --git a/composer.lock b/composer.lock index fec4f42dc..55c86608e 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": "17ca826af1a32c9768cd162e75d10ad5", + "content-hash": "dbe37580d73d76d72e1b883fe73e1dad", "packages": [ { "name": "adhocore/json-comment", @@ -330,16 +330,16 @@ }, { "name": "pocketmine/bedrock-protocol", - "version": "18.0.0+bedrock-1.19.50", + "version": "18.1.0+bedrock-1.19.50", "source": { "type": "git", "url": "https://github.com/pmmp/BedrockProtocol.git", - "reference": "b558ec883bd967dd3339f513cba62d2fbcd63349" + "reference": "c34f22847a1cc362a3f1c45698576d30d1e8392f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/b558ec883bd967dd3339f513cba62d2fbcd63349", - "reference": "b558ec883bd967dd3339f513cba62d2fbcd63349", + "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/c34f22847a1cc362a3f1c45698576d30d1e8392f", + "reference": "c34f22847a1cc362a3f1c45698576d30d1e8392f", "shasum": "" }, "require": { @@ -353,7 +353,7 @@ "ramsey/uuid": "^4.1" }, "require-dev": { - "phpstan/phpstan": "1.9.4", + "phpstan/phpstan": "1.9.13", "phpstan/phpstan-phpunit": "^1.0.0", "phpstan/phpstan-strict-rules": "^1.0.0", "phpunit/phpunit": "^9.5" @@ -371,9 +371,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/18.0.0+bedrock-1.19.50" + "source": "https://github.com/pmmp/BedrockProtocol/tree/18.1.0+bedrock-1.19.50" }, - "time": "2023-01-06T21:47:35+00:00" + "time": "2023-01-20T12:35:30+00:00" }, { "name": "pocketmine/binaryutils", @@ -1088,16 +1088,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.4.13", + "version": "v5.4.19", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "ac09569844a9109a5966b9438fc29113ce77cf51" + "reference": "648bfaca6a494f3e22378123bcee2894045dc9d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/ac09569844a9109a5966b9438fc29113ce77cf51", - "reference": "ac09569844a9109a5966b9438fc29113ce77cf51", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/648bfaca6a494f3e22378123bcee2894045dc9d8", + "reference": "648bfaca6a494f3e22378123bcee2894045dc9d8", "shasum": "" }, "require": { @@ -1132,7 +1132,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.13" + "source": "https://github.com/symfony/filesystem/tree/v5.4.19" }, "funding": [ { @@ -1148,7 +1148,7 @@ "type": "tidelift" } ], - "time": "2022-09-21T19:53:16+00:00" + "time": "2023-01-14T19:14:44+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1777,16 +1777,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.9.13", + "version": "1.9.14", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "a0922426da3a7d0d9334e99a363f7f9f6e23e84f" + "reference": "e5fcc96289cf737304286a9b505fbed091f02e58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/a0922426da3a7d0d9334e99a363f7f9f6e23e84f", - "reference": "a0922426da3a7d0d9334e99a363f7f9f6e23e84f", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e5fcc96289cf737304286a9b505fbed091f02e58", + "reference": "e5fcc96289cf737304286a9b505fbed091f02e58", "shasum": "" }, "require": { @@ -1816,7 +1816,7 @@ ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.9.13" + "source": "https://github.com/phpstan/phpstan/tree/1.9.14" }, "funding": [ { @@ -1832,7 +1832,7 @@ "type": "tidelift" } ], - "time": "2023-01-18T15:26:53+00:00" + "time": "2023-01-19T10:47:09+00:00" }, { "name": "phpstan/phpstan-phpunit", @@ -1936,16 +1936,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.23", + "version": "9.2.24", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c" + "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", - "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed", + "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed", "shasum": "" }, "require": { @@ -2001,7 +2001,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.23" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24" }, "funding": [ { @@ -2009,7 +2009,7 @@ "type": "github" } ], - "time": "2022-12-28T12:41:10+00:00" + "time": "2023-01-26T08:26:55+00:00" }, { "name": "phpunit/php-file-iterator", diff --git a/src/MemoryManager.php b/src/MemoryManager.php index d1e92765b..2f53e63c1 100644 --- a/src/MemoryManager.php +++ b/src/MemoryManager.php @@ -71,7 +71,7 @@ use const SORT_NUMERIC; class MemoryManager{ private const DEFAULT_CHECK_RATE = Server::TARGET_TICKS_PER_SECOND; private const DEFAULT_CONTINUOUS_TRIGGER_RATE = Server::TARGET_TICKS_PER_SECOND * 2; - private const DEEFAULT_TICKS_PER_GC = 30 * 60 * Server::TARGET_TICKS_PER_SECOND; + private const DEFAULT_TICKS_PER_GC = 30 * 60 * Server::TARGET_TICKS_PER_SECOND; private int $memoryLimit; private int $globalMemoryLimit; @@ -139,7 +139,7 @@ class MemoryManager{ $this->continuousTrigger = $config->getPropertyBool("memory.continuous-trigger", true); $this->continuousTriggerRate = $config->getPropertyInt("memory.continuous-trigger-rate", self::DEFAULT_CONTINUOUS_TRIGGER_RATE); - $this->garbageCollectionPeriod = $config->getPropertyInt("memory.garbage-collection.period", self::DEEFAULT_TICKS_PER_GC); + $this->garbageCollectionPeriod = $config->getPropertyInt("memory.garbage-collection.period", self::DEFAULT_TICKS_PER_GC); $this->garbageCollectionTrigger = $config->getPropertyBool("memory.garbage-collection.low-memory-trigger", true); $this->garbageCollectionAsync = $config->getPropertyBool("memory.garbage-collection.collect-async-worker", true);