From 1007d66135fdeb029911bde03c1938a9ff9e7477 Mon Sep 17 00:00:00 2001 From: "h.mugambi" Date: Fri, 12 Jun 2026 19:01:59 +0300 Subject: [PATCH 1/5] Add Symfony 7 support --- Utils/DoctrineCacheClearer.php | 3 +-- composer.json | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Utils/DoctrineCacheClearer.php b/Utils/DoctrineCacheClearer.php index c4818f6..f0581dd 100644 --- a/Utils/DoctrineCacheClearer.php +++ b/Utils/DoctrineCacheClearer.php @@ -20,9 +20,8 @@ public function __construct(FlushableCache $cache) /** * Clears any caches necessary. - * @param string $cacheDir */ - public function clear($cacheDir): void + public function clear(string $cacheDir): void { $this->cache->flushAll(); } diff --git a/composer.json b/composer.json index 57a6579..60a01b5 100644 --- a/composer.json +++ b/composer.json @@ -25,16 +25,16 @@ "thecodingmachine/tdbm": "~6.0.0", "doctrine/doctrine-bundle": "^2.2.2", "doctrine/orm": "^2", - "symfony/http-kernel": "^5.0 || ^6.0" + "symfony/http-kernel": "^5.0 || ^6.0 || ^7.0" }, "require-dev": { "roave/security-advisories": "dev-latest", - "symfony/security-bundle": "^5 || ^6", - "symfony/yaml": "^5 || ^6", + "symfony/security-bundle": "^5 || ^6 || ^7", + "symfony/yaml": "^5 || ^6 || ^7", "phpunit/phpunit": "^9.5", "phpstan/phpstan": "^2.0", "thecodingmachine/tdbm-fluid-schema-builder": "^1.0 || ^2.0", - "symfony/framework-bundle": "^5.1 || ^6" + "symfony/framework-bundle": "^5.1 || ^6 || ^7" }, "scripts": { "phpstan": "phpstan analyse TdbmBundle.php DependencyInjection/ Utils/ --level=8 --no-progress" From 6293f73418d5884a8c651f99d619d260514d9f4c Mon Sep 17 00:00:00 2001 From: Guillaume Date: Mon, 15 Jun 2026 18:09:43 +0200 Subject: [PATCH 2/5] :green_heart: Increase from PHP8.0 to lowest supproted PHP version (8.2) and latest one (8.5) --- .github/workflows/continuous-integration.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 82ef0ba..1a7eec8 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -14,7 +14,8 @@ jobs: strategy: matrix: php-version: - - "8.0" + - "8.2" + - "8.5" services: mysql: @@ -66,7 +67,7 @@ jobs: strategy: matrix: php-version: - - "8.0" + - "8.2" services: mysql: From 71337ef72fbbfe6c2cf4186e92fa96fd52fa8ecd Mon Sep 17 00:00:00 2001 From: Humphrey Mugambi Date: Mon, 15 Jun 2026 20:33:00 +0300 Subject: [PATCH 3/5] bump tdbm update and fix verbosity --- Tests/FunctionalTest.php | 5 +++-- composer.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Tests/FunctionalTest.php b/Tests/FunctionalTest.php index df96577..15e1ec5 100644 --- a/Tests/FunctionalTest.php +++ b/Tests/FunctionalTest.php @@ -7,6 +7,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Config\Definition\Processor; use Symfony\Bundle\FrameworkBundle\Console\Application; +use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Tester\ApplicationTester; use Symfony\Component\HttpKernel\KernelInterface; use TheCodingMachine\FluidSchema\TdbmFluidSchema; @@ -151,12 +152,12 @@ public function testEndToEnd(): void $application->setAutoExit(false); $applicationTester = new ApplicationTester($application); - $applicationTester->run(['command' => 'tdbm:generate']); + $applicationTester->run(['command' => 'tdbm:generate'], ['verbosity' => OutputInterface::VERBOSITY_VERBOSE]); $this->assertStringContainsString('Finished regenerating DAOs and beans', $applicationTester->getDisplay()); $this->assertFileExists(__DIR__ . '/../tdbm.lock.yml'); $applicationTester = new ApplicationTester($application); - $applicationTester->run(['command' => 'tdbm:generate:other']); + $applicationTester->run(['command' => 'tdbm:generate:other'], ['verbosity' => OutputInterface::VERBOSITY_VERBOSE]); $this->assertStringContainsString('Finished regenerating DAOs and beans', $applicationTester->getDisplay()); $this->assertFileExists(__DIR__ . '/../tdbm.other.lock.yml'); } diff --git a/composer.json b/composer.json index 60a01b5..02a1b10 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ ], "require" : { "php": "^8.0", - "thecodingmachine/tdbm": "~6.0.0", + "thecodingmachine/tdbm": "dev-chore/symfony-7 as 6.0.0", "doctrine/doctrine-bundle": "^2.2.2", "doctrine/orm": "^2", "symfony/http-kernel": "^5.0 || ^6.0 || ^7.0" From ce2e2c3f0d3e894faeeb5492976d2d7081b6b2c8 Mon Sep 17 00:00:00 2001 From: Humphrey Mugambi Date: Tue, 16 Jun 2026 12:15:09 +0300 Subject: [PATCH 4/5] Pin tdbm to ~6.1.0 and simplify generate command tests --- Tests/FunctionalTest.php | 9 ++++----- composer.json | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Tests/FunctionalTest.php b/Tests/FunctionalTest.php index 15e1ec5..2862ad5 100644 --- a/Tests/FunctionalTest.php +++ b/Tests/FunctionalTest.php @@ -7,7 +7,6 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Config\Definition\Processor; use Symfony\Bundle\FrameworkBundle\Console\Application; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Tester\ApplicationTester; use Symfony\Component\HttpKernel\KernelInterface; use TheCodingMachine\FluidSchema\TdbmFluidSchema; @@ -152,13 +151,13 @@ public function testEndToEnd(): void $application->setAutoExit(false); $applicationTester = new ApplicationTester($application); - $applicationTester->run(['command' => 'tdbm:generate'], ['verbosity' => OutputInterface::VERBOSITY_VERBOSE]); - $this->assertStringContainsString('Finished regenerating DAOs and beans', $applicationTester->getDisplay()); + $applicationTester->run(['command' => 'tdbm:generate']); + $this->assertSame(0, $applicationTester->getStatusCode()); $this->assertFileExists(__DIR__ . '/../tdbm.lock.yml'); $applicationTester = new ApplicationTester($application); - $applicationTester->run(['command' => 'tdbm:generate:other'], ['verbosity' => OutputInterface::VERBOSITY_VERBOSE]); - $this->assertStringContainsString('Finished regenerating DAOs and beans', $applicationTester->getDisplay()); + $applicationTester->run(['command' => 'tdbm:generate:other']); + $this->assertSame(0, $applicationTester->getStatusCode()); $this->assertFileExists(__DIR__ . '/../tdbm.other.lock.yml'); } diff --git a/composer.json b/composer.json index 02a1b10..3ecf93e 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ ], "require" : { "php": "^8.0", - "thecodingmachine/tdbm": "dev-chore/symfony-7 as 6.0.0", + "thecodingmachine/tdbm": "~6.1.0", "doctrine/doctrine-bundle": "^2.2.2", "doctrine/orm": "^2", "symfony/http-kernel": "^5.0 || ^6.0 || ^7.0" From 9e643796e38b292af8df527225957af504346c1f Mon Sep 17 00:00:00 2001 From: Guillaume Date: Tue, 16 Jun 2026 14:36:04 +0200 Subject: [PATCH 5/5] :green_heart: Fix always-true phpstan, test against MySQL8 --- .github/workflows/continuous-integration.yml | 9 +++------ DependencyInjection/Configuration.php | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 1a7eec8..6007e12 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -19,10 +19,10 @@ jobs: services: mysql: - image: "mysql:5.7" + image: "mysql:8" env: MYSQL_ALLOW_EMPTY_PASSWORD: true - MYSQL_ROOT_PASSWORD: + MYSQL_ROOT_PASSWORD: "" ports: - "3306:3306" @@ -53,11 +53,8 @@ jobs: - name: "Run PHPUnit" run: "vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover=coverage.xml" - - name: "Upload Code Coverage" - if: ${{ matrix.php-version == '7.4' }} - uses: "codecov/codecov-action@v1" - - name: "Run a static analysis with phpstan/phpstan" + if: ${{ matrix.php-version == '8.2' }} run: "composer phpstan -- --error-format=checkstyle | cs2pr" phpunit-prefer-lowest: diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index a26ba3d..e050d8f 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -14,7 +14,6 @@ public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder('tdbm'); $rootNode = $treeBuilder->getRootNode(); - assert($rootNode instanceof ArrayNodeDefinition); $rootNodeChildren = $rootNode->children(); $this->buildServiceNode($rootNodeChildren);