From 0987e03c033d6ccc765d1ff1023e64db71b674d1 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 13 Jan 2021 10:55:54 +0000 Subject: [PATCH 1/9] Bump phpstan/phpstan-strict-rules from 0.12.8 to 0.12.9 (#4003) --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 7d9e57d1a5..ba736ad2d5 100644 --- a/composer.lock +++ b/composer.lock @@ -1115,16 +1115,16 @@ }, { "name": "phpstan/phpstan-strict-rules", - "version": "0.12.8", + "version": "0.12.9", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "ee0009302ff5312ca6b92a7330a6b66da0c70f12" + "reference": "0705fefc7c9168529fd130e341428f5f10f4f01d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/ee0009302ff5312ca6b92a7330a6b66da0c70f12", - "reference": "ee0009302ff5312ca6b92a7330a6b66da0c70f12", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/0705fefc7c9168529fd130e341428f5f10f4f01d", + "reference": "0705fefc7c9168529fd130e341428f5f10f4f01d", "shasum": "" }, "require": { @@ -1160,9 +1160,9 @@ "description": "Extra strict and opinionated rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", - "source": "https://github.com/phpstan/phpstan-strict-rules/tree/0.12.8" + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/0.12.9" }, - "time": "2021-01-11T13:36:23+00:00" + "time": "2021-01-13T08:50:28+00:00" }, { "name": "phpunit/php-code-coverage", From ae43698e88468893c0ac2dab2f34c7d258a53878 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 15 Jan 2021 16:49:01 +0000 Subject: [PATCH 2/9] phpstan 0.12.67 for some reason dependabot shit itself while trying to scan for updates and thought this wasn't updatable ... --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index c1073e0d35..e85b011ea9 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "composer-runtime-api": "^2.0" }, "require-dev": { - "phpstan/phpstan": "0.12.66", + "phpstan/phpstan": "0.12.67", "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 ba736ad2d5..8f93c26d6b 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": "4d776995a3d8476bf76f529ecbd568e7", + "content-hash": "a0b7eefe1ad35462d08e876d942b9003", "packages": [ { "name": "adhocore/json-comment", @@ -1000,16 +1000,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.66", + "version": "0.12.67", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "4110a2425c6bd53acbdfcda07885e87b66e9ba3e" + "reference": "ced7a5d9c5dba908c1c00cea3f1d4ad74da71b86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/4110a2425c6bd53acbdfcda07885e87b66e9ba3e", - "reference": "4110a2425c6bd53acbdfcda07885e87b66e9ba3e", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ced7a5d9c5dba908c1c00cea3f1d4ad74da71b86", + "reference": "ced7a5d9c5dba908c1c00cea3f1d4ad74da71b86", "shasum": "" }, "require": { @@ -1040,7 +1040,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.66" + "source": "https://github.com/phpstan/phpstan/tree/0.12.67" }, "funding": [ { @@ -1056,7 +1056,7 @@ "type": "tidelift" } ], - "time": "2021-01-11T16:43:15+00:00" + "time": "2021-01-14T14:16:19+00:00" }, { "name": "phpstan/phpstan-phpunit", From 69fff23f1a4fe9c0ddf6cce41a1f5e107d360be3 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 15 Jan 2021 16:53:38 +0000 Subject: [PATCH 3/9] LevelProviderManager: removed bogus @var I'm not sure why this wasn't detected until 0.12.67... --- src/pocketmine/level/format/io/LevelProviderManager.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pocketmine/level/format/io/LevelProviderManager.php b/src/pocketmine/level/format/io/LevelProviderManager.php index 67c19256df..bec1e6ce15 100644 --- a/src/pocketmine/level/format/io/LevelProviderManager.php +++ b/src/pocketmine/level/format/io/LevelProviderManager.php @@ -63,7 +63,6 @@ abstract class LevelProviderManager{ throw new \InvalidArgumentException("Class $class cannot be constructed"); } - /** @var LevelProvider $class */ self::$providers[strtolower($class::getProviderName())] = $class; } From 7bdc564cccd8198a92486bcf9ff8de5e2c10a781 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 15 Jan 2021 16:59:51 +0000 Subject: [PATCH 4/9] Update first-party dependencies to PHP 8.0 compatible versions all deps of PM3 are ready (at least as far as PHPStan can show). --- composer.lock | 144 +++++++++++++++++++++++++------------------------- 1 file changed, 73 insertions(+), 71 deletions(-) diff --git a/composer.lock b/composer.lock index 8f93c26d6b..983d56ecc0 100644 --- a/composer.lock +++ b/composer.lock @@ -56,25 +56,25 @@ }, { "name": "pocketmine/binaryutils", - "version": "0.1.12", + "version": "0.1.13", "source": { "type": "git", "url": "https://github.com/pmmp/BinaryUtils.git", - "reference": "566fa87829e007eda0bd96e39fe20b9b0d638132" + "reference": "0abee38d4e2861621f262c79a2a3d699d8a697f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BinaryUtils/zipball/566fa87829e007eda0bd96e39fe20b9b0d638132", - "reference": "566fa87829e007eda0bd96e39fe20b9b0d638132", + "url": "https://api.github.com/repos/pmmp/BinaryUtils/zipball/0abee38d4e2861621f262c79a2a3d699d8a697f4", + "reference": "0abee38d4e2861621f262c79a2a3d699d8a697f4", "shasum": "" }, "require": { - "php": ">=7.2", + "php": "^7.2 || ^8.0", "php-64bit": "*" }, "require-dev": { "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "0.12.40", + "phpstan/phpstan": "0.12.67", "phpstan/phpstan-strict-rules": "^0.12.4" }, "type": "library", @@ -90,9 +90,9 @@ "description": "Classes and methods for conveniently handling binary data", "support": { "issues": "https://github.com/pmmp/BinaryUtils/issues", - "source": "https://github.com/pmmp/BinaryUtils/tree/stable" + "source": "https://github.com/pmmp/BinaryUtils/tree/0.1.13" }, - "time": "2020-08-28T20:43:21+00:00" + "time": "2021-01-15T14:19:13+00:00" }, { "name": "pocketmine/callback-validator", @@ -146,29 +146,29 @@ }, { "name": "pocketmine/classloader", - "version": "0.1.1", + "version": "0.1.2", "source": { "type": "git", "url": "https://github.com/pmmp/ClassLoader.git", - "reference": "7c0363491d1ce8f914fe96d41a4338c982adedff" + "reference": "9757928424652393b178a3760073113aa7c9911b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/ClassLoader/zipball/7c0363491d1ce8f914fe96d41a4338c982adedff", - "reference": "7c0363491d1ce8f914fe96d41a4338c982adedff", + "url": "https://api.github.com/repos/pmmp/ClassLoader/zipball/9757928424652393b178a3760073113aa7c9911b", + "reference": "9757928424652393b178a3760073113aa7c9911b", "shasum": "" }, "require": { "ext-pthreads": "~3.2.0", "ext-reflection": "*", - "php": ">=7.2.0" + "php": "^7.2 || ^8.0" }, "conflict": { "pocketmine/spl": "<0.4" }, "require-dev": { "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "0.12.38", + "phpstan/phpstan": "0.12.66", "phpstan/phpstan-strict-rules": "^0.12.4" }, "type": "library", @@ -184,32 +184,32 @@ "description": "Ad-hoc autoloading components used by PocketMine-MP", "support": { "issues": "https://github.com/pmmp/ClassLoader/issues", - "source": "https://github.com/pmmp/ClassLoader/tree/stable" + "source": "https://github.com/pmmp/ClassLoader/tree/0.1.2" }, - "time": "2020-08-22T11:48:51+00:00" + "time": "2021-01-15T00:40:47+00:00" }, { "name": "pocketmine/log", - "version": "0.2.0", + "version": "0.2.1", "source": { "type": "git", "url": "https://github.com/pmmp/Log.git", - "reference": "e59bedb5d4bbeb9a26647cb7c367cb2fa72addfa" + "reference": "830b44a2cf96ef703c550abe64302f230231ca49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/Log/zipball/e59bedb5d4bbeb9a26647cb7c367cb2fa72addfa", - "reference": "e59bedb5d4bbeb9a26647cb7c367cb2fa72addfa", + "url": "https://api.github.com/repos/pmmp/Log/zipball/830b44a2cf96ef703c550abe64302f230231ca49", + "reference": "830b44a2cf96ef703c550abe64302f230231ca49", "shasum": "" }, "require": { - "php": ">=7.2" + "php": "^7.2 || ^8.0" }, "conflict": { "pocketmine/spl": "<0.4" }, "require-dev": { - "phpstan/phpstan": "^0.12.8", + "phpstan/phpstan": "0.12.67", "phpstan/phpstan-strict-rules": "^0.12.2" }, "type": "library", @@ -225,34 +225,36 @@ "description": "Logging components used by PocketMine-MP and related projects", "support": { "issues": "https://github.com/pmmp/Log/issues", - "source": "https://github.com/pmmp/Log/tree/0.2.0" + "source": "https://github.com/pmmp/Log/tree/0.2.1" }, - "time": "2020-03-31T15:43:47+00:00" + "time": "2021-01-15T14:32:41+00:00" }, { "name": "pocketmine/log-pthreads", - "version": "0.1.1", + "version": "0.1.3", "source": { "type": "git", "url": "https://github.com/pmmp/LogPthreads.git", - "reference": "9bbcef398b01487ab47c234a6a7054722abbe067" + "reference": "e477ecf6ec214fdd4415ea1da3fdd9d73bf699ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/LogPthreads/zipball/9bbcef398b01487ab47c234a6a7054722abbe067", - "reference": "9bbcef398b01487ab47c234a6a7054722abbe067", + "url": "https://api.github.com/repos/pmmp/LogPthreads/zipball/e477ecf6ec214fdd4415ea1da3fdd9d73bf699ea", + "reference": "e477ecf6ec214fdd4415ea1da3fdd9d73bf699ea", "shasum": "" }, "require": { "ext-pthreads": "~3.2.0", - "php": ">=7.2", + "php": "^7.2 || ^8.0", "pocketmine/log": "^0.2.0" }, "conflict": { "pocketmine/spl": "<0.4" }, "require-dev": { - "phpstan/phpstan": "^0.12.18" + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "0.12.66", + "phpstan/phpstan-strict-rules": "^0.12.4" }, "type": "library", "autoload": { @@ -267,31 +269,31 @@ "description": "Logging components specialized for pthreads used by PocketMine-MP and related projects", "support": { "issues": "https://github.com/pmmp/LogPthreads/issues", - "source": "https://github.com/pmmp/LogPthreads/tree/0.1.1" + "source": "https://github.com/pmmp/LogPthreads/tree/0.1.3" }, - "time": "2020-03-31T16:17:19+00:00" + "time": "2021-01-15T00:35:49+00:00" }, { "name": "pocketmine/math", - "version": "0.2.5", + "version": "0.2.6", "source": { "type": "git", "url": "https://github.com/pmmp/Math.git", - "reference": "8c46cfa95351fb0b2b30739a381310941934b55f" + "reference": "43057cb8c179a9859677b496a788db922fd5cfc3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/Math/zipball/8c46cfa95351fb0b2b30739a381310941934b55f", - "reference": "8c46cfa95351fb0b2b30739a381310941934b55f", + "url": "https://api.github.com/repos/pmmp/Math/zipball/43057cb8c179a9859677b496a788db922fd5cfc3", + "reference": "43057cb8c179a9859677b496a788db922fd5cfc3", "shasum": "" }, "require": { - "php": ">=7.2.0", + "php": "^7.2 || ^8.0", "php-64bit": "*" }, "require-dev": { "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "0.12.40", + "phpstan/phpstan": "0.12.67", "phpstan/phpstan-strict-rules": "^0.12.4" }, "type": "library", @@ -307,34 +309,34 @@ "description": "PHP library containing math related code used in PocketMine-MP", "support": { "issues": "https://github.com/pmmp/Math/issues", - "source": "https://github.com/pmmp/Math/tree/stable" + "source": "https://github.com/pmmp/Math/tree/0.2.6" }, - "time": "2020-08-27T11:45:40+00:00" + "time": "2021-01-15T14:25:11+00:00" }, { "name": "pocketmine/nbt", - "version": "0.2.15", + "version": "0.2.16", "source": { "type": "git", "url": "https://github.com/pmmp/NBT.git", - "reference": "f8a81d37d24eb79fb77d985a52549d68955bc6a1" + "reference": "be6d54a8a314967d938b501eee49d4641e2ab07d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/NBT/zipball/f8a81d37d24eb79fb77d985a52549d68955bc6a1", - "reference": "f8a81d37d24eb79fb77d985a52549d68955bc6a1", + "url": "https://api.github.com/repos/pmmp/NBT/zipball/be6d54a8a314967d938b501eee49d4641e2ab07d", + "reference": "be6d54a8a314967d938b501eee49d4641e2ab07d", "shasum": "" }, "require": { "ext-zlib": "*", - "php": ">=7.2.0", + "php": "^7.2 || ^8.0", "php-64bit": "*", "pocketmine/binaryutils": "^0.1.9" }, "require-dev": { "irstea/phpunit-shim": "^7.5 || ^8.0", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "0.12.40", + "phpstan/phpstan": "0.12.67", "phpstan/phpstan-strict-rules": "^0.12.4" }, "type": "library", @@ -350,28 +352,28 @@ "description": "PHP library for working with Named Binary Tags", "support": { "issues": "https://github.com/pmmp/NBT/issues", - "source": "https://github.com/pmmp/NBT/tree/stable" + "source": "https://github.com/pmmp/NBT/tree/0.2.16" }, - "time": "2020-08-28T15:11:32+00:00" + "time": "2021-01-15T15:27:28+00:00" }, { "name": "pocketmine/raklib", - "version": "0.12.9", + "version": "0.12.10", "source": { "type": "git", "url": "https://github.com/pmmp/RakLib.git", - "reference": "5f2a02009f486ca4d90892814570fa13ebdc078d" + "reference": "48e70551cca6f2409115d3468bed94c2edd08f31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/RakLib/zipball/5f2a02009f486ca4d90892814570fa13ebdc078d", - "reference": "5f2a02009f486ca4d90892814570fa13ebdc078d", + "url": "https://api.github.com/repos/pmmp/RakLib/zipball/48e70551cca6f2409115d3468bed94c2edd08f31", + "reference": "48e70551cca6f2409115d3468bed94c2edd08f31", "shasum": "" }, "require": { "ext-pthreads": "~3.2.0", "ext-sockets": "*", - "php": ">=7.2.0", + "php": "^7.2 || ^8.0", "php-64bit": "*", "php-ipv6": "*", "pocketmine/binaryutils": "^0.1.9", @@ -380,7 +382,7 @@ "pocketmine/snooze": "^0.1.0" }, "require-dev": { - "phpstan/phpstan": "0.12.40", + "phpstan/phpstan": "0.12.67", "phpstan/phpstan-strict-rules": "^0.12.2" }, "type": "library", @@ -396,31 +398,31 @@ "description": "A RakNet server implementation written in PHP", "support": { "issues": "https://github.com/pmmp/RakLib/issues", - "source": "https://github.com/pmmp/RakLib/tree/stable" + "source": "https://github.com/pmmp/RakLib/tree/0.12.10" }, - "time": "2020-08-28T15:22:57+00:00" + "time": "2021-01-15T16:19:15+00:00" }, { "name": "pocketmine/snooze", - "version": "0.1.3", + "version": "0.1.4", "source": { "type": "git", "url": "https://github.com/pmmp/Snooze.git", - "reference": "849510fa62e57512b8467e3694e9b3add97038fd" + "reference": "382ab149f01ecca0a57f999ff5d7fc9e271c3268" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/Snooze/zipball/849510fa62e57512b8467e3694e9b3add97038fd", - "reference": "849510fa62e57512b8467e3694e9b3add97038fd", + "url": "https://api.github.com/repos/pmmp/Snooze/zipball/382ab149f01ecca0a57f999ff5d7fc9e271c3268", + "reference": "382ab149f01ecca0a57f999ff5d7fc9e271c3268", "shasum": "" }, "require": { "ext-pthreads": ">=3.1.7dev", - "php-64bit": ">=7.2.0" + "php-64bit": "^7.2 || ^8.0" }, "require-dev": { "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "0.12.40", + "phpstan/phpstan": "0.12.67", "phpstan/phpstan-strict-rules": "^0.12.4" }, "type": "library", @@ -436,26 +438,26 @@ "description": "Thread notification management library for code using the pthreads extension", "support": { "issues": "https://github.com/pmmp/Snooze/issues", - "source": "https://github.com/pmmp/Snooze/tree/0.1.3" + "source": "https://github.com/pmmp/Snooze/tree/0.1.4" }, - "time": "2020-08-28T22:19:21+00:00" + "time": "2021-01-15T14:44:16+00:00" }, { "name": "pocketmine/spl", - "version": "0.4.1", + "version": "0.4.2", "source": { "type": "git", "url": "https://github.com/pmmp/SPL.git", - "reference": "ff0579a0be41bbe65d3637607715c0f87728a838" + "reference": "6b08b7cf8c4afa17139c9a1b3bf1b408531de161" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/SPL/zipball/ff0579a0be41bbe65d3637607715c0f87728a838", - "reference": "ff0579a0be41bbe65d3637607715c0f87728a838", + "url": "https://api.github.com/repos/pmmp/SPL/zipball/6b08b7cf8c4afa17139c9a1b3bf1b408531de161", + "reference": "6b08b7cf8c4afa17139c9a1b3bf1b408531de161", "shasum": "" }, "require": { - "php": ">=7.2" + "php": "^7.2 || ^8.0" }, "require-dev": { "phpstan/phpstan": "^0.12.8" @@ -473,9 +475,9 @@ "description": "Standard library files required by PocketMine-MP and related projects", "support": { "issues": "https://github.com/pmmp/SPL/issues", - "source": "https://github.com/pmmp/SPL/tree/0.4.1" + "source": "https://github.com/pmmp/SPL/tree/0.4.2" }, - "time": "2020-01-31T16:18:03+00:00" + "time": "2021-01-15T15:15:23+00:00" } ], "packages-dev": [ From dd0d8842d558155774a701f86e696e87b9fca1d0 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 15 Jan 2021 17:35:27 +0000 Subject: [PATCH 5/9] actions: disable fail-fast --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 017ef1ece0..ae2a746ace 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,6 +13,7 @@ jobs: strategy: matrix: php: [7.3.25, 7.4.13] + fail-fast: false steps: - uses: actions/checkout@v2 #needed for build.sh From efc5f348779f0c986139193ee067335c608f20db Mon Sep 17 00:00:00 2001 From: Dylan T Date: Fri, 15 Jan 2021 17:53:39 +0000 Subject: [PATCH 6/9] wrong place ... when shared defaults :( --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ae2a746ace..503c2136cb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,6 @@ jobs: strategy: matrix: php: [7.3.25, 7.4.13] - fail-fast: false steps: - uses: actions/checkout@v2 #needed for build.sh @@ -34,6 +33,7 @@ jobs: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: php: [7.3.25, 7.4.13] @@ -78,6 +78,7 @@ jobs: needs: build-php runs-on: ubuntu-latest strategy: + fail-fast: false matrix: php: [7.3.25, 7.4.13] @@ -122,6 +123,7 @@ jobs: needs: build-php runs-on: ubuntu-latest strategy: + fail-fast: false matrix: php: [7.3.25, 7.4.13] From e156fb47e878dff09cbf233062b2e30444658860 Mon Sep 17 00:00:00 2001 From: Dylan T Date: Fri, 15 Jan 2021 21:09:45 +0000 Subject: [PATCH 7/9] Disable xdebug on Actions --- tests/gh-actions/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/gh-actions/build.sh b/tests/gh-actions/build.sh index bea38a8e1e..a5c184078f 100755 --- a/tests/gh-actions/build.sh +++ b/tests/gh-actions/build.sh @@ -22,3 +22,4 @@ cd php-build ./install-dependencies.sh echo '"pthreads",,"https://github.com/pmmp/pthreads.git",,,"extension",' >> share/php-build/extension/definition PHP_BUILD_INSTALL_EXTENSION='pthreads=@2bcd8b8c10395d58b8a9bc013e3a5328080c867f yaml=2.2.0' PHP_BUILD_ZTS_ENABLE=on ./bin/php-build "$VERSION" "$INSTALL_DIR" +rm "$INSTALL_DIR/etc/conf.d/xdebug.ini" || true From 988cf7f5350b8f4d7184ffda349ae52c89f04e86 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 15 Jan 2021 18:10:09 +0000 Subject: [PATCH 8/9] Fixed PHP 8.0 deprecation error --- src/pocketmine/plugin/PluginManager.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/plugin/PluginManager.php b/src/pocketmine/plugin/PluginManager.php index e7861c8dc7..0a52f58d9e 100644 --- a/src/pocketmine/plugin/PluginManager.php +++ b/src/pocketmine/plugin/PluginManager.php @@ -703,7 +703,15 @@ class PluginManager{ $handlerClosure = $method->getClosure($listener); try{ - $eventClass = $parameters[0]->getClass(); + $paramType = $parameters[0]->getType(); + //isBuiltin() returns false for builtin classes .................. + if($paramType instanceof \ReflectionNamedType && !$paramType->isBuiltin()){ + /** @phpstan-var class-string $paramClass */ + $paramClass = $paramType->getName(); + $eventClass = new \ReflectionClass($paramClass); + }else{ + $eventClass = null; + } }catch(\ReflectionException $e){ //class doesn't exist if(isset($tags["softDepend"]) && !isset($this->plugins[$tags["softDepend"]])){ $this->server->getLogger()->debug("Not registering @softDepend listener " . Utils::getNiceClosureName($handlerClosure) . "() because plugin \"" . $tags["softDepend"] . "\" not found"); From ea5931e2742349932e9d3dc80074ab44d82dcd19 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 16 Jan 2021 19:34:06 +0000 Subject: [PATCH 9/9] Updated build/php submodule to pmmp/php-build-scripts@60194e8b147b6c57cbc4d3abc4c21ac5d621e802 --- build/php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/php b/build/php index a42c7df20a..60194e8b14 160000 --- a/build/php +++ b/build/php @@ -1 +1 @@ -Subproject commit a42c7df20a1dc8d6a520133d221916a922f45af1 +Subproject commit 60194e8b147b6c57cbc4d3abc4c21ac5d621e802