From 1c2eb3502522aca8fea6777591f4383d5df895ff Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 5 Sep 2021 15:32:31 +0100 Subject: [PATCH 01/11] actions: fixed bad git hash on published releases --- .github/workflows/draft-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index d97fd81cf9..968c10a369 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -68,7 +68,7 @@ jobs: done - name: Build PocketMine-MP.phar - run: composer make-server + run: php build/server-phar.php --git ${{ github.sha }} - name: Get PocketMine-MP release version id: get-pm-version From 85eb6b30a5b4ae445d35222d06588fe3fe8cd2f3 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 5 Sep 2021 15:38:14 +0100 Subject: [PATCH 02/11] Player: do not allow doFirstSpawn() to be executed before the constructor is called this problem doesn't exist on PM4. --- src/pocketmine/Player.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 30e450cebc..24ca53d3d6 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1073,7 +1073,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ * @return void */ public function doFirstSpawn(){ - if($this->spawned){ + if($this->spawned || !$this->constructed){ return; //avoid player spawning twice (this can only happen on 3.x with a custom malicious client) } $this->spawned = true; From 65220b4f7f876fd7bb62877f0d8d19fe45f89d2f Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 5 Sep 2021 15:42:38 +0100 Subject: [PATCH 03/11] Release 3.22.3 --- changelogs/3.22.md | 4 ++++ src/pocketmine/VersionInfo.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/changelogs/3.22.md b/changelogs/3.22.md index 9122076b2c..3e2b465008 100644 --- a/changelogs/3.22.md +++ b/changelogs/3.22.md @@ -24,3 +24,7 @@ Plugin developers should **only** update their required API to this version if y - Fixed items in the crafting grid getting deleted on server-side disconnect or session timeout. - A warning is now logged on startup if a debug build of PHP is used to run the server (because it has a significant performance impact). - GitHub Actions is now used to build new releases, instead of Jenkins. You can see build logs [here](https://github.com/pmmp/PocketMine-MP/actions/workflows/draft-release.yml). + +# 3.22.3 +- Fixed a bug in the release build of 3.22.2 which caused the crash archive to reject all crashdumps. +- Fixed possible server crash during player spawning. diff --git a/src/pocketmine/VersionInfo.php b/src/pocketmine/VersionInfo.php index 2308f0669c..43aa2f9983 100644 --- a/src/pocketmine/VersionInfo.php +++ b/src/pocketmine/VersionInfo.php @@ -34,6 +34,6 @@ const _VERSION_INFO_INCLUDED = true; const NAME = "PocketMine-MP"; const BASE_VERSION = "3.22.3"; -const IS_DEVELOPMENT_BUILD = true; +const IS_DEVELOPMENT_BUILD = false; const BUILD_NUMBER = 0; -const BUILD_CHANNEL = ""; +const BUILD_CHANNEL = "stable"; From 4f59d3487abcd55fd18a5ecd5e547e76f3f5b5f7 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 5 Sep 2021 15:42:39 +0100 Subject: [PATCH 04/11] 3.22.4 is next --- src/pocketmine/VersionInfo.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pocketmine/VersionInfo.php b/src/pocketmine/VersionInfo.php index 43aa2f9983..b36946b19e 100644 --- a/src/pocketmine/VersionInfo.php +++ b/src/pocketmine/VersionInfo.php @@ -33,7 +33,7 @@ if(defined('pocketmine\_VERSION_INFO_INCLUDED')){ const _VERSION_INFO_INCLUDED = true; const NAME = "PocketMine-MP"; -const BASE_VERSION = "3.22.3"; -const IS_DEVELOPMENT_BUILD = false; +const BASE_VERSION = "3.22.4"; +const IS_DEVELOPMENT_BUILD = true; const BUILD_NUMBER = 0; -const BUILD_CHANNEL = "stable"; +const BUILD_CHANNEL = ""; From 466107d3b89d5c1371f918b3852b6c88a4305a83 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 5 Sep 2021 15:45:07 +0100 Subject: [PATCH 05/11] actions: fix release build shitting the bed --- .github/workflows/draft-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 968c10a369..4015c96c27 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -68,7 +68,7 @@ jobs: done - name: Build PocketMine-MP.phar - run: php build/server-phar.php --git ${{ github.sha }} + run: php -dphar.readonly=0 build/server-phar.php --git ${{ github.sha }} - name: Get PocketMine-MP release version id: get-pm-version From 0c0eb72b1becd4737d1abb28f77a358d942f09cf Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 5 Sep 2021 15:46:40 +0100 Subject: [PATCH 06/11] make-release: display the current and next version numbers --- build/make-release.php | 1 + 1 file changed, 1 insertion(+) diff --git a/build/make-release.php b/build/make-release.php index 361fa0c140..ec6bc2f019 100644 --- a/build/make-release.php +++ b/build/make-release.php @@ -81,6 +81,7 @@ function main(array $argv) : void{ $currentVer->getPatch() + 1 )); + echo "About to tag version $currentVer. Next version will be $nextVer.\n"; echo "please add appropriate notes to the changelog and press enter..."; fgets(STDIN); system('git add "' . dirname(__DIR__) . '/changelogs"'); From 2fb4704269f3529b7583c612137aa6e80fd0a7c4 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 5 Sep 2021 15:47:54 +0100 Subject: [PATCH 07/11] Release 3.22.4 --- changelogs/3.22.md | 3 +++ src/pocketmine/VersionInfo.php | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/changelogs/3.22.md b/changelogs/3.22.md index 3e2b465008..f9675527a6 100644 --- a/changelogs/3.22.md +++ b/changelogs/3.22.md @@ -28,3 +28,6 @@ Plugin developers should **only** update their required API to this version if y # 3.22.3 - Fixed a bug in the release build of 3.22.2 which caused the crash archive to reject all crashdumps. - Fixed possible server crash during player spawning. + +# 3.22.4 +- Fixed a bug which broke the build of 3.22.3. diff --git a/src/pocketmine/VersionInfo.php b/src/pocketmine/VersionInfo.php index b36946b19e..da6be8511b 100644 --- a/src/pocketmine/VersionInfo.php +++ b/src/pocketmine/VersionInfo.php @@ -34,6 +34,6 @@ const _VERSION_INFO_INCLUDED = true; const NAME = "PocketMine-MP"; const BASE_VERSION = "3.22.4"; -const IS_DEVELOPMENT_BUILD = true; +const IS_DEVELOPMENT_BUILD = false; const BUILD_NUMBER = 0; -const BUILD_CHANNEL = ""; +const BUILD_CHANNEL = "stable"; From b0b28ec6ed44773939392de45bec0a0f91f867d9 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 5 Sep 2021 15:47:54 +0100 Subject: [PATCH 08/11] 3.22.5 is next --- src/pocketmine/VersionInfo.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pocketmine/VersionInfo.php b/src/pocketmine/VersionInfo.php index da6be8511b..821f91d52f 100644 --- a/src/pocketmine/VersionInfo.php +++ b/src/pocketmine/VersionInfo.php @@ -33,7 +33,7 @@ if(defined('pocketmine\_VERSION_INFO_INCLUDED')){ const _VERSION_INFO_INCLUDED = true; const NAME = "PocketMine-MP"; -const BASE_VERSION = "3.22.4"; -const IS_DEVELOPMENT_BUILD = false; +const BASE_VERSION = "3.22.5"; +const IS_DEVELOPMENT_BUILD = true; const BUILD_NUMBER = 0; -const BUILD_CHANNEL = "stable"; +const BUILD_CHANNEL = ""; From 9b8be22015c2ed789159581dfffca4171a7d2210 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 7 Sep 2021 12:32:19 +0100 Subject: [PATCH 09/11] Sort phpstan.neon --- phpstan.neon.dist | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 869585674b..bf9d3eb61c 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -4,8 +4,8 @@ includes: - tests/phpstan/configs/gc-hacks.neon - tests/phpstan/configs/l7-baseline.neon - tests/phpstan/configs/l8-baseline.neon - - tests/phpstan/configs/php74-compat.neon - tests/phpstan/configs/php-bugs.neon + - tests/phpstan/configs/php74-compat.neon - tests/phpstan/configs/phpstan-bugs.neon - tests/phpstan/configs/phpunit-wiring-tests.neon - tests/phpstan/configs/pthreads-bugs.neon @@ -24,22 +24,22 @@ parameters: scanDirectories: - tests/plugins/TesterPlugin scanFiles: + - build/make-release.php + - build/server-phar.php - src/pocketmine/PocketMine.php - - build/make-release.php - - build/server-phar.php paths: - - src - build/make-release.php - build/server-phar.php + - src - tests/phpunit - tests/plugins/TesterPlugin dynamicConstantNames: - - pocketmine\IS_DEVELOPMENT_BUILD - pocketmine\DEBUG + - pocketmine\IS_DEVELOPMENT_BUILD stubFiles: - - tests/phpstan/stubs/pthreads.stub - tests/phpstan/stubs/chunkutils.stub - tests/phpstan/stubs/leveldb.stub + - tests/phpstan/stubs/pthreads.stub reportUnmatchedIgnoredErrors: false #no other way to silence platform-specific non-warnings staticReflectionClassNamePatterns: - "#^COM$#" From 5d0d1aa4c581d9446c60d79f6381e15306c7d9fe Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 7 Sep 2021 12:36:42 +0100 Subject: [PATCH 10/11] Include build/generate-build-info-json.php in analysis --- phpstan.neon.dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index bf9d3eb61c..8be401876c 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -24,10 +24,12 @@ parameters: scanDirectories: - tests/plugins/TesterPlugin scanFiles: + - build/generate-build-info-json.php - build/make-release.php - build/server-phar.php - src/pocketmine/PocketMine.php paths: + - build/generate-build-info-json.php - build/make-release.php - build/server-phar.php - src From c948aa94aa0aa0c9ec6a707167ebf368e9a4fb70 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 7 Sep 2021 12:39:54 +0100 Subject: [PATCH 11/11] Fixed new files in build/ keeping getting missed --- phpstan.neon.dist | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 8be401876c..e4a50aca42 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -22,19 +22,18 @@ parameters: bootstrapFiles: - tests/phpstan/bootstrap.php scanDirectories: + - build - tests/plugins/TesterPlugin scanFiles: - - build/generate-build-info-json.php - - build/make-release.php - - build/server-phar.php - src/pocketmine/PocketMine.php paths: - - build/generate-build-info-json.php - - build/make-release.php - - build/server-phar.php + - build - src - tests/phpunit - tests/plugins/TesterPlugin + excludePaths: + analyseAndScan: + - build/preprocessor dynamicConstantNames: - pocketmine\DEBUG - pocketmine\IS_DEVELOPMENT_BUILD