mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 15:41:33 +00:00
Add PHP 8.4 to test matrix
This commit is contained in:
@@ -35,12 +35,12 @@ class HandlerListManagerTest extends TestCase{
|
||||
|
||||
/**
|
||||
* @var \Closure
|
||||
* @phpstan-var \Closure(\ReflectionClass<Event>) : bool
|
||||
* @phpstan-var \Closure(\ReflectionClass<covariant Event>) : bool
|
||||
*/
|
||||
private $isValidFunc;
|
||||
/**
|
||||
* @var \Closure
|
||||
* @phpstan-var \Closure(\ReflectionClass<Event>) : ?\ReflectionClass<Event>
|
||||
* @phpstan-var \Closure(\ReflectionClass<covariant Event>) : ?\ReflectionClass<covariant Event>
|
||||
*/
|
||||
private $resolveParentFunc;
|
||||
|
||||
@@ -53,7 +53,7 @@ class HandlerListManagerTest extends TestCase{
|
||||
|
||||
/**
|
||||
* @return \Generator|mixed[][]
|
||||
* @phpstan-return \Generator<int, array{\ReflectionClass<Event>, bool, string}, void, void>
|
||||
* @phpstan-return \Generator<int, array{\ReflectionClass<covariant Event>, bool, string}, void, void>
|
||||
*/
|
||||
public static function isValidClassProvider() : \Generator{
|
||||
yield [new \ReflectionClass(Event::class), false, "event base should not be handleable"];
|
||||
@@ -65,7 +65,7 @@ class HandlerListManagerTest extends TestCase{
|
||||
/**
|
||||
* @dataProvider isValidClassProvider
|
||||
*
|
||||
* @phpstan-param \ReflectionClass<Event> $class
|
||||
* @phpstan-param \ReflectionClass<covariant Event> $class
|
||||
*/
|
||||
public function testIsValidClass(\ReflectionClass $class, bool $isValid, string $reason) : void{
|
||||
self::assertSame($isValid, ($this->isValidFunc)($class), $reason);
|
||||
@@ -73,7 +73,7 @@ class HandlerListManagerTest extends TestCase{
|
||||
|
||||
/**
|
||||
* @return \Generator|\ReflectionClass[][]
|
||||
* @phpstan-return \Generator<int, array{\ReflectionClass<Event>, \ReflectionClass<Event>|null}, void, void>
|
||||
* @phpstan-return \Generator<int, array{\ReflectionClass<covariant Event>, \ReflectionClass<covariant Event>|null}, void, void>
|
||||
*/
|
||||
public static function resolveParentClassProvider() : \Generator{
|
||||
yield [new \ReflectionClass(TestConcreteExtendsAllowHandleEvent::class), new \ReflectionClass(TestAbstractAllowHandleEvent::class)];
|
||||
@@ -85,8 +85,8 @@ class HandlerListManagerTest extends TestCase{
|
||||
/**
|
||||
* @dataProvider resolveParentClassProvider
|
||||
*
|
||||
* @phpstan-param \ReflectionClass<Event> $class
|
||||
* @phpstan-param \ReflectionClass<Event>|null $expect
|
||||
* @phpstan-param \ReflectionClass<covariant Event> $class
|
||||
* @phpstan-param \ReflectionClass<covariant Event>|null $expect
|
||||
*/
|
||||
public function testResolveParentClass(\ReflectionClass $class, ?\ReflectionClass $expect) : void{
|
||||
if($expect === null){
|
||||
|
Reference in New Issue
Block a user