Ray.MediaQuery on HEAD (ef3dda2) via 🐘 v8.1.14
❯ git diff
error: cannot run delta: No such file or directory
diff --git a/tests/Fake/Queries/TodoEntityInterface.php b/tests/Fake/Queries/TodoEntityInterface.php
index 23a5bf3..1f5e349 100644
--- a/tests/Fake/Queries/TodoEntityInterface.php
+++ b/tests/Fake/Queries/TodoEntityInterface.php
@@ -10,7 +10,7 @@
interface TodoEntityInterface
{
#[DbQuery('todo_item')]
- public function getItem(string $id): Todo;
+ public function getItem(string $id): ?Todo;
#[DbQuery('todo_list')]
/**
Ray.MediaQuery on HEAD (ef3dda2) via 🐘 v8.1.14
❯ ./vendor/bin/phpunit
PHPUnit 9.6.3 by Sebastian Bergmann and contributors.
......E............................................. 52 / 52 (100%)
Time: 00:01.916, Memory: 32.00 MB
There was 1 error:
1) Ray\MediaQuery\DbQueryModuleTest::testEntity
TypeError: Ray\MediaQuery\Queries\TodoEntityInterfaceNull_1464564696::getItem(): Return value must be of type ?Ray\MediaQuery\Entity\Todo, array returned
/pato/to/Ray.MediaQuery/tests/tmp/Ray_MediaQuery_Queries_TodoEntityInterfaceNull_1464564696.php:15
/path/to/Ray.MediaQuery/tests/DbQueryModuleTest.php:144
ERRORS!
Tests: 52, Assertions: 78, Errors: 1.
Bug Report
戻り値の型宣言でnullable な型を渡すことが出来なくなっている
How to reproduce
テストコードの
TotoEntityInterface::getItem
の返り値を nullable にすると再現します。