GithubHelp home page GithubHelp logo

pmmp / callbackvalidator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from daverandom/callbackvalidator

1.0 1.0 0.0 128 KB

Tools for validating callback signatures in PHP

License: MIT License

PHP 100.00%
github-actions-enabled on-packagist php83 phpstan-l9 phpstan-strict

callbackvalidator's People

Contributors

buchwasa avatar daverandom avatar dependabot-preview[bot] avatar dependabot[bot] avatar dktapps avatar peehaa avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

callbackvalidator's Issues

Utils::validateCallableSignature does not support UnionType

Issue description

  • 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

  1. pocketmine\utils\Utils::validateCallableSignature(function (string|int $a): void {}, function (): void {});
  2. Throw exceptions

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

  • 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.