You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected result: Can successfully verify callables including UnionType
Actual result: Get an error
This is actually a problem with the pmmp/CallbackValidator library, but I think PMs that provide APIs that use these support PHP8 and need to be able to use it.
Steps to reproduce the issue
pocketmine\utils\Utils::validateCallableSignature(function (string|int $a): void {}, function (): void {});
If you remove all plugins, does the issue still occur? Yes
If the issue is not reproducible without plugins: No
Have you asked for help on our forums before creating an issue?
Can you provide sample, minimal reproducing code for the issue? If so, paste it in the bottom section
Crashdump, backtrace or other files
LogicException: "Unsupported reflection type ReflectionUnionType" (EXCEPTION) in "pmsrc/vendor/pocketmine/callback-validator/src/ParameterType" at line 82
The text was updated successfully, but these errors were encountered:
Issue description
This is actually a problem with the pmmp/CallbackValidator library, but I think PMs that provide APIs that use these support PHP8 and need to be able to use it.
Steps to reproduce the issue
pocketmine\utils\Utils::validateCallableSignature(function (string|int $a): void {}, function (): void {});
OS and versions
Server version: 4.0.0-BETA4 (git hash: 9e6d7405709560c0025e072324602983213276dd)
Compatible Minecraft version: 1.17.30 (protocol version: 465)
PHP version: 8.0.11
PHP JIT: disabled
Operating system: win
Plugins
Crashdump, backtrace or other files
The text was updated successfully, but these errors were encountered: