From 41e6234eccc5655050c47046cdca767eeb2dacd4 Mon Sep 17 00:00:00 2001 From: koriym Date: Fri, 8 Oct 2021 00:13:56 +0900 Subject: [PATCH 1/3] Add php 7.3 and 7.4 tests in GH action --- .github/workflows/continuous-integration.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 19605df3..c8c9118a 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -16,6 +16,8 @@ jobs: operating-system: - ubuntu-latest php-version: + - '7.3' + - '7.4' - '8.0' dependencies: - highest From b3492c0f871d7ee805b8fdf8318f8a9c76ff362c Mon Sep 17 00:00:00 2001 From: koriym Date: Fri, 8 Oct 2021 00:36:02 +0900 Subject: [PATCH 2/3] Add annotation for php7.x test --- tests/DbQueryModuleTest.php | 2 +- tests/Fake/Queries/TodoConstcuctEntityInterface.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/DbQueryModuleTest.php b/tests/DbQueryModuleTest.php index 78d9a47a..7267d998 100644 --- a/tests/DbQueryModuleTest.php +++ b/tests/DbQueryModuleTest.php @@ -52,7 +52,7 @@ protected function setUp(): void $sqlDir = dirname(__DIR__) . '/tests/sql'; $dbQueryConfig = new DbQueryConfig($sqlDir); $module = new MediaQueryModule($mediaQueries, [$dbQueryConfig], new AuraSqlModule('sqlite::memory:')); - $this->injector = new Injector($module); + $this->injector = new Injector($module, __DIR__ . '/tmp'); $pdo = $this->injector->getInstance(ExtendedPdoInterface::class); assert($pdo instanceof ExtendedPdoInterface); $pdo->query((string) file_get_contents($sqlDir . '/create_todo.sql')); diff --git a/tests/Fake/Queries/TodoConstcuctEntityInterface.php b/tests/Fake/Queries/TodoConstcuctEntityInterface.php index 552822fd..5a902d64 100644 --- a/tests/Fake/Queries/TodoConstcuctEntityInterface.php +++ b/tests/Fake/Queries/TodoConstcuctEntityInterface.php @@ -10,10 +10,15 @@ interface TodoConstcuctEntityInterface { + /** + * @DbQuery(id="todo_item", entity=TodoConstruct::class) + */ #[DbQuery('todo_item', entity: TodoConstruct::class)] public function getItem(string $id): TodoConstruct; - /** @return list */ + /** + * @DbQuery(id="todo_list", entity=TodoConstruct::class) + */ #[DbQuery('todo_list', entity: TodoConstruct::class)] public function getlist(): array; } From 59841eb302cf65f0c7041974802d68ba2e171b40 Mon Sep 17 00:00:00 2001 From: koriym Date: Fri, 8 Oct 2021 00:58:47 +0900 Subject: [PATCH 3/3] Run demo only with php 8 --- .github/workflows/continuous-integration.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index c8c9118a..621a5ce5 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -60,4 +60,5 @@ jobs: file: ./coverage.xml - name: Run Demo + if: ${{ matrix.php-version == '8.0' }} run: php demo/run.php