From c7868a810d25e534116af097b9f8d936c9d411c0 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 13 Jun 2021 15:34:24 +0100 Subject: [PATCH 1/7] Move PHP minimum to 7.4 7.3 isn't actively tested anymore, and since 7.4 has been out for so long already, it doesn't make sense to keep pandering to users who can't be bothered to update their PHP binaries. In most cases, these users are also experiencing problems caused by older versions of pthreads that were long since fixed. In addition, pthreads is no longer tested or supported on 7.3, so users can't get newer bug fixes even if they wanted to. --- .github/workflows/main.yml | 10 +++++----- composer.json | 4 ++-- composer.lock | 6 +++--- src/pocketmine/PocketMine.php | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 20a5e3fd0..38ebe7a90 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: image: [ubuntu-20.04] - php: [7.3.28, 7.4.20] + php: [7.4.20] steps: - uses: actions/checkout@v2 #needed for build.sh @@ -37,7 +37,7 @@ jobs: fail-fast: false matrix: image: [ubuntu-20.04] - php: [7.3.28, 7.4.20] + php: [7.4.20] steps: - uses: actions/checkout@v2 @@ -87,7 +87,7 @@ jobs: fail-fast: false matrix: image: [ubuntu-20.04] - php: [7.3.28, 7.4.20] + php: [7.4.20] steps: - uses: actions/checkout@v2 @@ -137,7 +137,7 @@ jobs: fail-fast: false matrix: image: [ubuntu-20.04] - php: [7.3.28, 7.4.20] + php: [7.4.20] steps: - uses: actions/checkout@v2 @@ -189,7 +189,7 @@ jobs: fail-fast: false matrix: image: [ubuntu-20.04] - php: [7.3.28, 7.4.20] + php: [7.4.20] steps: - uses: actions/checkout@v2 diff --git a/composer.json b/composer.json index 8c6f904ff..d8b5dc4a5 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "homepage": "https://pmmp.io", "license": "LGPL-3.0", "require": { - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "php-64bit": "*", "ext-ctype": "*", "ext-curl": "*", @@ -60,7 +60,7 @@ }, "config": { "platform": { - "php": "7.3.0" + "php": "7.4.0" }, "sort-packages": true }, diff --git a/composer.lock b/composer.lock index cb456a249..776398a74 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": "b10dca2b9822b8104499ff70750f8181", + "content-hash": "29c660b8c4fd0708d270c63993de9526", "packages": [ { "name": "adhocore/json-comment", @@ -2756,7 +2756,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "php-64bit": "*", "ext-ctype": "*", "ext-curl": "*", @@ -2779,7 +2779,7 @@ }, "platform-dev": [], "platform-overrides": { - "php": "7.3.0" + "php": "7.4.0" }, "plugin-api-version": "2.1.0" } diff --git a/src/pocketmine/PocketMine.php b/src/pocketmine/PocketMine.php index f2fa55875..32e9e9356 100644 --- a/src/pocketmine/PocketMine.php +++ b/src/pocketmine/PocketMine.php @@ -36,7 +36,7 @@ namespace pocketmine { require_once __DIR__ . '/VersionInfo.php'; - const MIN_PHP_VERSION = "7.3.0"; + const MIN_PHP_VERSION = "7.4.0"; /** * @param string $message From 82e8eb46ac8b7ef6a320da6051b755830d202b84 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 13 Jun 2021 15:38:22 +0100 Subject: [PATCH 2/7] Release 3.21.0 --- changelogs/3.21.md | 11 +++++++++++ src/pocketmine/VersionInfo.php | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 changelogs/3.21.md diff --git a/changelogs/3.21.md b/changelogs/3.21.md new file mode 100644 index 000000000..00a0e1442 --- /dev/null +++ b/changelogs/3.21.md @@ -0,0 +1,11 @@ +**For Minecraft: Bedrock Edition 1.17.0** + +### Note about API versions +Plugins which don't touch the protocol and compatible with any previous 3.x.y version will also run on these releases and do not need API bumps. +Plugin developers should **only** update their required API to this version if you need the changes in this build. + +**WARNING: If your plugin uses the protocol, you're not shielded by API change constraints.** You should consider using the `mcpe-protocol` directive in `plugin.yml` as a constraint if you do. + +# 3.21.0 +- PHP 7.4 is now required as a minimum. +- A workaround for player movement added in 1.14.30 has been removed. diff --git a/src/pocketmine/VersionInfo.php b/src/pocketmine/VersionInfo.php index 5fa5f9805..e7d2cba5b 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.20.1"; -const IS_DEVELOPMENT_BUILD = true; +const BASE_VERSION = "3.21.0"; +const IS_DEVELOPMENT_BUILD = false; const BUILD_NUMBER = 0; From 492ad6bb662b49d89f2dec306b955b705da2af0e Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 13 Jun 2021 15:38:22 +0100 Subject: [PATCH 3/7] 3.21.1 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 e7d2cba5b..4b6f2ad64 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.21.0"; -const IS_DEVELOPMENT_BUILD = false; +const BASE_VERSION = "3.21.1"; +const IS_DEVELOPMENT_BUILD = true; const BUILD_NUMBER = 0; From 11d73e5bb87102f2ff6bbea919e73fe0e764498a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Jun 2021 15:30:01 +0100 Subject: [PATCH 4/7] Bump phpstan/phpstan-phpunit from 0.12.19 to 0.12.20 (#4273) Bumps [phpstan/phpstan-phpunit](https://github.com/phpstan/phpstan-phpunit) from 0.12.19 to 0.12.20. - [Release notes](https://github.com/phpstan/phpstan-phpunit/releases) - [Commits](https://github.com/phpstan/phpstan-phpunit/compare/0.12.19...0.12.20) --- updated-dependencies: - dependency-name: phpstan/phpstan-phpunit dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- composer.lock | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/composer.lock b/composer.lock index 776398a74..29b4ce976 100644 --- a/composer.lock +++ b/composer.lock @@ -1073,16 +1073,16 @@ }, { "name": "phpstan/phpstan-phpunit", - "version": "0.12.19", + "version": "0.12.20", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "52f7072ddc5f81492f9d2de65a24813a48c90b18" + "reference": "efc009981af383eb3303f0ca9868c29acad7ce74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/52f7072ddc5f81492f9d2de65a24813a48c90b18", - "reference": "52f7072ddc5f81492f9d2de65a24813a48c90b18", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/efc009981af383eb3303f0ca9868c29acad7ce74", + "reference": "efc009981af383eb3303f0ca9868c29acad7ce74", "shasum": "" }, "require": { @@ -1093,10 +1093,9 @@ "phpunit/phpunit": "<7.0" }, "require-dev": { - "phing/phing": "^2.16.3", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/phpstan-strict-rules": "^0.12.6", - "phpunit/phpunit": "^7.5.20" + "phpunit/phpunit": "^9.5" }, "type": "phpstan-extension", "extra": { @@ -1122,9 +1121,9 @@ "description": "PHPUnit extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-phpunit/issues", - "source": "https://github.com/phpstan/phpstan-phpunit/tree/0.12.19" + "source": "https://github.com/phpstan/phpstan-phpunit/tree/0.12.20" }, - "time": "2021-04-30T11:10:37+00:00" + "time": "2021-06-17T08:28:30+00:00" }, { "name": "phpstan/phpstan-strict-rules", From 0a6ce18322b5dd585acfbe128959de2615c37452 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 17 Jun 2021 20:56:35 +0100 Subject: [PATCH 5/7] CrashDump: Sort plugins list --- src/pocketmine/CrashDump.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/CrashDump.php b/src/pocketmine/CrashDump.php index cdf67c6a5..dc81e4331 100644 --- a/src/pocketmine/CrashDump.php +++ b/src/pocketmine/CrashDump.php @@ -46,6 +46,7 @@ use function is_dir; use function is_resource; use function json_encode; use function json_last_error_msg; +use function ksort; use function max; use function microtime; use function mkdir; @@ -81,6 +82,7 @@ use const FILE_IGNORE_NEW_LINES; use const JSON_UNESCAPED_SLASHES; use const PHP_EOL; use const PHP_OS; +use const SORT_STRING; class CrashDump{ @@ -182,7 +184,9 @@ class CrashDump{ $this->addLine(); $this->addLine("Loaded plugins:"); $this->data["plugins"] = []; - foreach($this->server->getPluginManager()->getPlugins() as $p){ + $plugins = $this->server->getPluginManager()->getPlugins(); + ksort($plugins, SORT_STRING); + foreach($plugins as $p){ $d = $p->getDescription(); $this->data["plugins"][$d->getName()] = [ "name" => $d->getName(), From ea0a47dff7ff89846d8a3fa18fd8932b099dad04 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 18 Jun 2021 18:42:08 +0100 Subject: [PATCH 6/7] Updated transitive composer dependency junk --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 29b4ce976..f34787b93 100644 --- a/composer.lock +++ b/composer.lock @@ -2454,16 +2454,16 @@ }, { "name": "sebastian/type", - "version": "2.3.2", + "version": "2.3.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "0d1c587401514d17e8f9258a27e23527cb1b06c1" + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0d1c587401514d17e8f9258a27e23527cb1b06c1", - "reference": "0d1c587401514d17e8f9258a27e23527cb1b06c1", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", "shasum": "" }, "require": { @@ -2498,7 +2498,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.2" + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" }, "funding": [ { @@ -2506,7 +2506,7 @@ "type": "github" } ], - "time": "2021-06-04T13:02:07+00:00" + "time": "2021-06-15T12:49:02+00:00" }, { "name": "sebastian/version", From 155e516f747ca9528d0a66bfa7275b965fbde969 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 18 Jun 2021 18:46:30 +0100 Subject: [PATCH 7/7] phpstan 0.12.90 --- composer.json | 2 +- composer.lock | 14 +++++++------- .../configs/check-explicit-mixed-baseline.neon | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index d8b5dc4a5..61aeea5d1 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "pocketmine/spl": "^0.4.0" }, "require-dev": { - "phpstan/phpstan": "0.12.89", + "phpstan/phpstan": "0.12.90", "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 f34787b93..77509cf7a 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": "29c660b8c4fd0708d270c63993de9526", + "content-hash": "4edd0dabe529d2c8668d1f3ee40033a6", "packages": [ { "name": "adhocore/json-comment", @@ -1009,16 +1009,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.89", + "version": "0.12.90", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "54c0f5a6c30511b77128d58b6369f718df250542" + "reference": "f0e4b56630fc3d4eb5be86606d07212ac212ede4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/54c0f5a6c30511b77128d58b6369f718df250542", - "reference": "54c0f5a6c30511b77128d58b6369f718df250542", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/f0e4b56630fc3d4eb5be86606d07212ac212ede4", + "reference": "f0e4b56630fc3d4eb5be86606d07212ac212ede4", "shasum": "" }, "require": { @@ -1049,7 +1049,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.89" + "source": "https://github.com/phpstan/phpstan/tree/0.12.90" }, "funding": [ { @@ -1069,7 +1069,7 @@ "type": "tidelift" } ], - "time": "2021-06-09T20:23:49+00:00" + "time": "2021-06-18T07:15:38+00:00" }, { "name": "phpstan/phpstan-phpunit", diff --git a/tests/phpstan/configs/check-explicit-mixed-baseline.neon b/tests/phpstan/configs/check-explicit-mixed-baseline.neon index 17aaafa4e..f0c9749a4 100644 --- a/tests/phpstan/configs/check-explicit-mixed-baseline.neon +++ b/tests/phpstan/configs/check-explicit-mixed-baseline.neon @@ -1,7 +1,7 @@ parameters: ignoreErrors: - - message: "#^Cannot access offset float\\|int on mixed\\.$#" + message: "#^Cannot access offset \\(float\\|int\\) on mixed\\.$#" count: 1 path: ../../../src/pocketmine/CrashDump.php