diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 82ef0ba..6007e12 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -14,14 +14,15 @@ jobs: strategy: matrix: php-version: - - "8.0" + - "8.2" + - "8.5" services: mysql: - image: "mysql:5.7" + image: "mysql:8" env: MYSQL_ALLOW_EMPTY_PASSWORD: true - MYSQL_ROOT_PASSWORD: + MYSQL_ROOT_PASSWORD: "" ports: - "3306:3306" @@ -52,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: @@ -66,7 +64,7 @@ jobs: strategy: matrix: php-version: - - "8.0" + - "8.2" services: mysql: 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); diff --git a/Tests/FunctionalTest.php b/Tests/FunctionalTest.php index df96577..2862ad5 100644 --- a/Tests/FunctionalTest.php +++ b/Tests/FunctionalTest.php @@ -152,12 +152,12 @@ public function testEndToEnd(): void $applicationTester = new ApplicationTester($application); $applicationTester->run(['command' => 'tdbm:generate']); - $this->assertStringContainsString('Finished regenerating DAOs and beans', $applicationTester->getDisplay()); + $this->assertSame(0, $applicationTester->getStatusCode()); $this->assertFileExists(__DIR__ . '/../tdbm.lock.yml'); $applicationTester = new ApplicationTester($application); $applicationTester->run(['command' => 'tdbm:generate:other']); - $this->assertStringContainsString('Finished regenerating DAOs and beans', $applicationTester->getDisplay()); + $this->assertSame(0, $applicationTester->getStatusCode()); $this->assertFileExists(__DIR__ . '/../tdbm.other.lock.yml'); } 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..3ecf93e 100644 --- a/composer.json +++ b/composer.json @@ -22,19 +22,19 @@ ], "require" : { "php": "^8.0", - "thecodingmachine/tdbm": "~6.0.0", + "thecodingmachine/tdbm": "~6.1.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"