From 5a0e022278bedecbc6eb0df7092c08fcf817e498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fr=C3=A9mont?= Date: Tue, 24 Nov 2026 15:52:55 +0100 Subject: [PATCH 1/2] [TestApplication] Use standard string literals in SQLite date DQL functions --- app/Doctrine/Query/AST/Function/Day.php | 2 +- app/Doctrine/Query/AST/Function/Month.php | 2 +- app/Doctrine/Query/AST/Function/Year.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Doctrine/Query/AST/Function/Day.php b/app/Doctrine/Query/AST/Function/Day.php index d818e5bd..87089004 100644 --- a/app/Doctrine/Query/AST/Function/Day.php +++ b/app/Doctrine/Query/AST/Function/Day.php @@ -50,7 +50,7 @@ public function getSql(SqlWalker $sqlWalker): string } if ($platform instanceof SqlitePlatform) { - return sprintf('CAST(STRFTIME("%%d", %s) AS NUMBER)', $sqlWalker->walkArithmeticPrimary($this->date)); + return sprintf("CAST(STRFTIME('%%d', %s) AS INTEGER)", $sqlWalker->walkArithmeticPrimary($this->date)); } throw new \RuntimeException(sprintf('Platform "%s" is not supported!', $platform::class)); diff --git a/app/Doctrine/Query/AST/Function/Month.php b/app/Doctrine/Query/AST/Function/Month.php index 8853d4c4..ae340f42 100644 --- a/app/Doctrine/Query/AST/Function/Month.php +++ b/app/Doctrine/Query/AST/Function/Month.php @@ -50,7 +50,7 @@ public function getSql(SqlWalker $sqlWalker): string } if ($platform instanceof SqlitePlatform) { - return sprintf('CAST(STRFTIME("%%m", %s) AS NUMBER)', $sqlWalker->walkArithmeticPrimary($this->date)); + return sprintf("CAST(STRFTIME('%%m', %s) AS INTEGER)", $sqlWalker->walkArithmeticPrimary($this->date)); } throw new \RuntimeException(sprintf('Platform "%s" is not supported!', $platform::class)); diff --git a/app/Doctrine/Query/AST/Function/Year.php b/app/Doctrine/Query/AST/Function/Year.php index 69300786..31508f43 100644 --- a/app/Doctrine/Query/AST/Function/Year.php +++ b/app/Doctrine/Query/AST/Function/Year.php @@ -50,7 +50,7 @@ public function getSql(SqlWalker $sqlWalker): string } if ($platform instanceof SqlitePlatform) { - return sprintf('CAST(STRFTIME("%%Y", %s) AS NUMBER)', $sqlWalker->walkArithmeticPrimary($this->date)); + return sprintf("CAST(STRFTIME('%%Y', %s) AS INTEGER)", $sqlWalker->walkArithmeticPrimary($this->date)); } throw new \RuntimeException(sprintf('Platform "%s" is not supported!', $platform::class)); From 0155d7b0706fc410e129b998246946d288bb34f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fr=C3=A9mont?= Date: Tue, 24 Nov 2026 15:52:55 +0100 Subject: [PATCH 2/2] [CI] Run the test application suite on SQLite --- .github/workflows/ci.yaml | 48 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c88d4236..f8376165 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -176,3 +176,51 @@ jobs: run: | yarn install --frozen-lockfile --non-interactive yarn test + + sqlite: + runs-on: ubuntu-latest + name: "Test application / PHP 8.4 / Symfony ^7.4 / SQLite" + env: + APP_ENV: test + COMPOSER_ROOT_VERSION: "dev-main" + DATABASE_URL: "sqlite:///%kernel.project_dir%/var/data_%kernel.environment%.db" + steps: + - name: "Checkout" + uses: actions/checkout@v3 + + - name: "Setup PHP" + uses: shivammathur/setup-php@v2 + with: + php-version: "8.4" + extensions: pdo_sqlite + tools: 'composer:v2, flex' + coverage: none + + - name: "Restrict packages' versions" + run: composer config extra.symfony.require "^7.4" + + - name: Get Composer cache directory + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - name: "Setup cache" + uses: actions/cache@v3 + with: + path: | + ${{ steps.composer-cache.outputs.dir }} + key: ${{ github.run_id }}-${{ runner.os }}-sqlite-${{ hashFiles('composer.json') }}-symfony-^7.4 + + - name: "Install dependencies" + run: composer update --no-interaction --no-scripts + + - name: Create Testing database + run: bin/console doctrine:schema:create + + - name: "Install & compile assets" + run: | + bin/console importmap:install + bin/console tailwind:build + bin/console asset-map:compile + + - name: Run PHPUnit + run: vendor/bin/phpunit