From 73ba1ba224fe6ab377760ffbe656e0a2e3733c65 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Jul 2021 12:35:35 +0100 Subject: [PATCH 01/10] Bump phpstan/phpstan from 0.12.91 to 0.12.92 (#4309) Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.91 to 0.12.92. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Commits](https://github.com/phpstan/phpstan/compare/0.12.91...0.12.92) --- updated-dependencies: - dependency-name: phpstan/phpstan 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.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 684d88166..ae9ece803 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "pocketmine/spl": "^0.4.0" }, "require-dev": { - "phpstan/phpstan": "0.12.91", + "phpstan/phpstan": "0.12.92", "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 0658269c9..a00781321 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": "94852d3414c2feabe1233b5a58decee2", + "content-hash": "79b082334bd3930d7eef49be9b70e59f", "packages": [ { "name": "adhocore/json-comment", @@ -1009,16 +1009,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.91", + "version": "0.12.92", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "8226701cd228a0d63c2df995de7ab6070c69ac6a" + "reference": "64d4c5dc8ea96972bc18432d137a330239a5d2b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8226701cd228a0d63c2df995de7ab6070c69ac6a", - "reference": "8226701cd228a0d63c2df995de7ab6070c69ac6a", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/64d4c5dc8ea96972bc18432d137a330239a5d2b2", + "reference": "64d4c5dc8ea96972bc18432d137a330239a5d2b2", "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.91" + "source": "https://github.com/phpstan/phpstan/tree/0.12.92" }, "funding": [ { @@ -1069,7 +1069,7 @@ "type": "tidelift" } ], - "time": "2021-07-04T15:31:48+00:00" + "time": "2021-07-10T13:53:49+00:00" }, { "name": "phpstan/phpstan-phpunit", From c32c21464c30cd7059a4cbfb0a7d7e493238a561 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 13 Jul 2021 18:31:28 +0100 Subject: [PATCH 02/10] Release 3.22.0 --- changelogs/3.22.md | 11 +++++++++++ src/pocketmine/VersionInfo.php | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 changelogs/3.22.md diff --git a/changelogs/3.22.md b/changelogs/3.22.md new file mode 100644 index 000000000..31e7c4c25 --- /dev/null +++ b/changelogs/3.22.md @@ -0,0 +1,11 @@ +**For Minecraft: Bedrock Edition 1.17.10** + +### 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.22.0 +- Added support for Minecraft: Bedrock Edition 1.17.10. +- Removed compatibility with earlier versions. diff --git a/src/pocketmine/VersionInfo.php b/src/pocketmine/VersionInfo.php index 78c1e253b..f20e4fee0 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.2"; -const IS_DEVELOPMENT_BUILD = true; +const BASE_VERSION = "3.22.0"; +const IS_DEVELOPMENT_BUILD = false; const BUILD_NUMBER = 0; From bfbe3d83de1db79d170e6569a652cbd81ca79a84 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 13 Jul 2021 18:31:34 +0100 Subject: [PATCH 03/10] 3.22.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 f20e4fee0..7c3a81c86 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.22.0"; -const IS_DEVELOPMENT_BUILD = false; +const BASE_VERSION = "3.22.1"; +const IS_DEVELOPMENT_BUILD = true; const BUILD_NUMBER = 0; From 68699dbff99589551c6acee291d878829530123b Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 14 Jul 2021 21:08:23 +0100 Subject: [PATCH 04/10] PlayerAuthInputFlags: Fixed a mistake in the documentation --- .../network/mcpe/protocol/types/PlayerAuthInputFlags.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/network/mcpe/protocol/types/PlayerAuthInputFlags.php b/src/pocketmine/network/mcpe/protocol/types/PlayerAuthInputFlags.php index 51d8557ca..c80f2ecca 100644 --- a/src/pocketmine/network/mcpe/protocol/types/PlayerAuthInputFlags.php +++ b/src/pocketmine/network/mcpe/protocol/types/PlayerAuthInputFlags.php @@ -30,7 +30,7 @@ use pocketmine\network\mcpe\protocol\PlayerAuthInputPacket; * The flags should be written as * `flags |= (1 << flag)` * and read as - * `(flags & (1 & flag)) !== 0` + * `(flags & (1 << flag)) !== 0` * * @see PlayerAuthInputPacket */ From 432999a7d78eb8cb1e5dbd94fcb1d043a0d7bd61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Jul 2021 22:32:47 +0100 Subject: [PATCH 05/10] Bump phpstan/phpstan-phpunit from 0.12.20 to 0.12.21 (#4313) Bumps [phpstan/phpstan-phpunit](https://github.com/phpstan/phpstan-phpunit) from 0.12.20 to 0.12.21. - [Release notes](https://github.com/phpstan/phpstan-phpunit/releases) - [Commits](https://github.com/phpstan/phpstan-phpunit/compare/0.12.20...0.12.21) --- 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 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index a00781321..5aed81110 100644 --- a/composer.lock +++ b/composer.lock @@ -1073,16 +1073,16 @@ }, { "name": "phpstan/phpstan-phpunit", - "version": "0.12.20", + "version": "0.12.21", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "efc009981af383eb3303f0ca9868c29acad7ce74" + "reference": "6aaff1196c4f808769774b49a94a60e5fdf18de7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/efc009981af383eb3303f0ca9868c29acad7ce74", - "reference": "efc009981af383eb3303f0ca9868c29acad7ce74", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/6aaff1196c4f808769774b49a94a60e5fdf18de7", + "reference": "6aaff1196c4f808769774b49a94a60e5fdf18de7", "shasum": "" }, "require": { @@ -1121,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.20" + "source": "https://github.com/phpstan/phpstan-phpunit/tree/0.12.21" }, - "time": "2021-06-17T08:28:30+00:00" + "time": "2021-07-14T10:48:30+00:00" }, { "name": "phpstan/phpstan-strict-rules", From 2588895ab05ad04fc59e99d78f3d21429b22e791 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 17 Jul 2021 18:59:59 +0100 Subject: [PATCH 06/10] bootstrap: add a giant yellow warning about JIT --- src/pocketmine/PocketMine.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/pocketmine/PocketMine.php b/src/pocketmine/PocketMine.php index 32e9e9356..c534160d1 100644 --- a/src/pocketmine/PocketMine.php +++ b/src/pocketmine/PocketMine.php @@ -139,6 +139,24 @@ namespace pocketmine { if(\Phar::running(true) === ""){ $logger->warning("Non-packaged installation detected. This will degrade autoloading speed and make startup times longer."); } + if(function_exists('opcache_get_status')){ + $jitEnabled = opcache_get_status(false)["jit"]["on"] ?? false; + if($jitEnabled !== false){ + $logger->warning(<<<'JIT_WARNING' + + + --------------------------------------- ! WARNING ! --------------------------------------- + You're using PHP 8.0 with JIT enabled. This provides significant performance improvements. + HOWEVER, it is EXPERIMENTAL, and has already been seen to cause weird and unexpected bugs. + Proceed with caution. + If you want to report any bugs, make sure to mention that you are using PHP 8.0 with JIT. + To turn off JIT, change `opcache.jit` to `0` in your php.ini file. + ------------------------------------------------------------------------------------------- + +JIT_WARNING +); + } + } } /** From bd5f379c4c9cc352daf6e656721aa23d16f0500c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 17 Jul 2021 21:11:12 +0100 Subject: [PATCH 07/10] apparently opcache_get_status() may return false? --- src/pocketmine/PocketMine.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/PocketMine.php b/src/pocketmine/PocketMine.php index c534160d1..0dd40ddb8 100644 --- a/src/pocketmine/PocketMine.php +++ b/src/pocketmine/PocketMine.php @@ -139,8 +139,8 @@ namespace pocketmine { if(\Phar::running(true) === ""){ $logger->warning("Non-packaged installation detected. This will degrade autoloading speed and make startup times longer."); } - if(function_exists('opcache_get_status')){ - $jitEnabled = opcache_get_status(false)["jit"]["on"] ?? false; + if(function_exists('opcache_get_status') && ($opcacheStatus = opcache_get_status(false)) !== false){ + $jitEnabled = $opcacheStatus["jit"]["on"] ?? false; if($jitEnabled !== false){ $logger->warning(<<<'JIT_WARNING' From eccd258aebbc1f812cbed40fc82beb1b3e070885 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 17 Jul 2021 21:49:11 +0100 Subject: [PATCH 08/10] start.cmd: fixed incorrect php.ini scan dir when using a non-local binary --- start.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.cmd b/start.cmd index e2c7dca30..4e4c3a93e 100644 --- a/start.cmd +++ b/start.cmd @@ -22,5 +22,5 @@ if exist bin\mintty.exe ( start "" bin\mintty.exe -o Columns=88 -o Rows=32 -o AllowBlinking=0 -o FontQuality=3 -o Font="Consolas" -o FontHeight=10 -o CursorType=0 -o CursorBlinks=1 -h error -t "PocketMine-MP" -i bin/pocketmine.ico -w max %PHP_BINARY% %POCKETMINE_FILE% --enable-ansi %* ) else ( REM pause on exitcode != 0 so the user can see what went wrong - %PHP_BINARY% -c bin\php %POCKETMINE_FILE% %* || pause + %PHP_BINARY% %POCKETMINE_FILE% %* || pause ) From 13f114f30e38bcee734d4a1307253b8b216cbda6 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 17 Jul 2021 21:50:30 +0100 Subject: [PATCH 09/10] bootstrap: report loaded php.ini in error, as well as php binary path in some cases extension loading issues are caused by incorrect php.ini path, which should be easy to spot if the path is given. --- src/pocketmine/PocketMine.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/PocketMine.php b/src/pocketmine/PocketMine.php index 0dd40ddb8..d1afc6845 100644 --- a/src/pocketmine/PocketMine.php +++ b/src/pocketmine/PocketMine.php @@ -177,10 +177,12 @@ JIT_WARNING if(count($messages = check_platform_dependencies()) > 0){ echo PHP_EOL; $binary = version_compare(PHP_VERSION, "5.4") >= 0 ? PHP_BINARY : "unknown"; - critical_error("Selected PHP binary ($binary) does not satisfy some requirements."); + critical_error("Selected PHP binary does not satisfy some requirements."); foreach($messages as $m){ echo " - $m" . PHP_EOL; } + critical_error("PHP binary used: " . $binary); + critical_error("Loaded php.ini: " . (($file = php_ini_loaded_file()) !== false ? $file : "none")); critical_error("Please recompile PHP with the needed configuration, or refer to the installation instructions at http://pmmp.rtfd.io/en/rtfd/installation.html."); echo PHP_EOL; exit(1); From 8fb4d7b982dbb5c7f7792d203889ec678c5cec61 Mon Sep 17 00:00:00 2001 From: KygekDev <68368066+KygekDev@users.noreply.github.com> Date: Sun, 18 Jul 2021 07:08:14 +0800 Subject: [PATCH 10/10] BUILDING.md: Changed pre-requisites PHP version to 7.4 or newer (#4319) [ci skip] --- BUILDING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index e5338066e..1c5aa8e59 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -2,7 +2,7 @@ ## Pre-requisites - A bash shell (git bash is sufficient for Windows) - [`git`](https://git-scm.com) available in your shell -- PHP 7.3 or newer available in your shell +- PHP 7.4 or newer available in your shell - [`composer`](https://getcomposer.org) available in your shell ## Custom PHP binaries