From 8f8821c904d7e3cb16ec60e61c23528e5d05113e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 15 Feb 2021 11:25:36 +0000 Subject: [PATCH 1/5] Bump phpstan/phpstan from 0.12.75 to 0.12.76 (#4038) --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 0479a6f2e..fd1fadd51 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "pocketmine/spl": "^0.4.0" }, "require-dev": { - "phpstan/phpstan": "0.12.75", + "phpstan/phpstan": "0.12.76", "phpstan/phpstan-phpunit": "^0.12.6", "phpstan/phpstan-strict-rules": "^0.12.2", "phpunit/phpunit": "^9.2" diff --git a/composer.lock b/composer.lock index 2513561ab..9f1432ab5 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": "3b89973c021770a99ef8bcd0cd8570ba", + "content-hash": "1609bd6189c249ac32c4d86501a7d020", "packages": [ { "name": "adhocore/json-comment", @@ -1002,16 +1002,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.75", + "version": "0.12.76", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "2e4738cd67e0163861a065180eff7eb5c8417d6e" + "reference": "7aaaf9a759a29795e8f46d48041af1c1f1b23d38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/2e4738cd67e0163861a065180eff7eb5c8417d6e", - "reference": "2e4738cd67e0163861a065180eff7eb5c8417d6e", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/7aaaf9a759a29795e8f46d48041af1c1f1b23d38", + "reference": "7aaaf9a759a29795e8f46d48041af1c1f1b23d38", "shasum": "" }, "require": { @@ -1042,7 +1042,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.75" + "source": "https://github.com/phpstan/phpstan/tree/0.12.76" }, "funding": [ { @@ -1058,7 +1058,7 @@ "type": "tidelift" } ], - "time": "2021-02-11T13:58:47+00:00" + "time": "2021-02-13T11:47:44+00:00" }, { "name": "phpstan/phpstan-phpunit", From 57423540f01def019544183d79e2611bb3b6411b Mon Sep 17 00:00:00 2001 From: mmm545 <64874108+mmm545@users.noreply.github.com> Date: Mon, 15 Feb 2021 22:53:44 +0300 Subject: [PATCH 2/5] BUILDING.md: Document server-phar.php's compression bug (#4037) This bug is not fixable on PM's side because the fault lies with php-src. It was fixed recently in https://github.com/php/php-src/commit/1bb2a4f91cfde36ba343184f3d88189e646cc363. --- BUILDING.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BUILDING.md b/BUILDING.md index f84b83e35..fa2295f20 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -34,5 +34,11 @@ Run `composer make-server` using your preferred PHP binary. It'll drop a `Pocket You can also use the `--out` option to change the output filename. +There is a bug in PHP that might cause an error which looks like this: +``` +Fatal error: Uncaught BadMethodCallException: unable to create temporary file in PocketMine-MP/build/server-phar.php:119 +``` +You can work around it by setting `ulimit -n` to some bigger number, e.g. `8192`, or by updating your PHP version to at least 7.4.16 or 8.0.3. + ## Running PocketMine-MP from source code Run `src/pocketmine/PocketMine.php` using your preferred PHP binary. From 16fa26405a9fc8c833eda64917d68ddcdc11f797 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 15 Feb 2021 20:09:18 +0000 Subject: [PATCH 3/5] Remove remaining usages of LevelDB::close() this is handled by the object destructor. closes #4035 --- src/pocketmine/level/format/io/leveldb/LevelDB.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/pocketmine/level/format/io/leveldb/LevelDB.php b/src/pocketmine/level/format/io/leveldb/LevelDB.php index 2c9006333..01ede0fb1 100644 --- a/src/pocketmine/level/format/io/leveldb/LevelDB.php +++ b/src/pocketmine/level/format/io/leveldb/LevelDB.php @@ -183,8 +183,6 @@ class LevelDB extends BaseLevelProvider{ if(!$this->levelData->hasTag("generatorOptions", StringTag::class)){ $this->levelData->setString("generatorOptions", ""); } - - $db->close(); } public static function getProviderName() : string{ @@ -269,9 +267,6 @@ class LevelDB extends BaseLevelProvider{ $db->put(self::ENTRY_FLAT_WORLD_LAYERS, $out); //Add vanilla flatworld layers to allow terrain generation by MCPE to continue seamlessly } } - - $db->close(); - } public function saveLevelData(){ From 3a0c8dd5942c5e479a1a46421a6a6bcf31a2da84 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 16 Feb 2021 22:13:05 +0000 Subject: [PATCH 4/5] Release 3.17.5 --- changelogs/3.17.md | 7 +++++++ src/pocketmine/VersionInfo.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/changelogs/3.17.md b/changelogs/3.17.md index 6c78eaafe..8888583a7 100644 --- a/changelogs/3.17.md +++ b/changelogs/3.17.md @@ -41,3 +41,10 @@ Plugin developers should **only** update their required API to this version if y - `CraftItemEvent->getOutputs()` now returns a list starting at offset 0, instead of random offsets. (Note that the contents still won't be ordered.) - Fixed a bug that broke synchronized building, bridging, towering and more. - Objects in memory dumps no longer show inherited properties multiple times. + +# 3.17.5 +- Reduced CPU wastage by the logger thread. +- Fixed LevelDB deprecation errors on PHP 8.0. +- Added some protocol changes for 1.16.200 which were previously overlooked. +- Player XUIDs are now tracked. If a player's XUID does not match the previously recorded XUID when they next join the server, they will be kicked. This can be disabled by the `player.verify-xuid` setting in `pocketmine.yml`. +- `BUILDING.md` now has a note about `build/server-phar.php`'s compression bug (a bug in PHP). diff --git a/src/pocketmine/VersionInfo.php b/src/pocketmine/VersionInfo.php index feef147d9..d79c5d1cc 100644 --- a/src/pocketmine/VersionInfo.php +++ b/src/pocketmine/VersionInfo.php @@ -34,5 +34,5 @@ const _VERSION_INFO_INCLUDED = true; const NAME = "PocketMine-MP"; const BASE_VERSION = "3.17.5"; -const IS_DEVELOPMENT_BUILD = true; +const IS_DEVELOPMENT_BUILD = false; const BUILD_NUMBER = 0; From edbc73a72cfb56a38077754f47dce642dfd0132d Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 16 Feb 2021 22:13:05 +0000 Subject: [PATCH 5/5] 3.17.6 is next --- src/pocketmine/VersionInfo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/VersionInfo.php b/src/pocketmine/VersionInfo.php index d79c5d1cc..7138c8f31 100644 --- a/src/pocketmine/VersionInfo.php +++ b/src/pocketmine/VersionInfo.php @@ -33,6 +33,6 @@ if(defined('pocketmine\_VERSION_INFO_INCLUDED')){ const _VERSION_INFO_INCLUDED = true; const NAME = "PocketMine-MP"; -const BASE_VERSION = "3.17.5"; -const IS_DEVELOPMENT_BUILD = false; +const BASE_VERSION = "3.17.6"; +const IS_DEVELOPMENT_BUILD = true; const BUILD_NUMBER = 0;