diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aee15f5..8e9081e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,10 +17,15 @@ jobs: fail-fast: false matrix: include: + # --prefer-lowest keeps DBAL 3 covered; every other row resolves to DBAL 4. - php: 8.1 composer_update_flags: --prefer-lowest - php: 8.1 - php: 8.2 + - php: 8.3 + # Symfony 8 needs PHP 8.4, so this is where that support is actually exercised. + - php: 8.4 + - php: 8.5 steps: - uses: actions/checkout@v2 @@ -49,7 +54,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: "8.2" + php-version: "8.4" - name: Composer dependencies run: make vendor diff --git a/README.md b/README.md index a5860b6..90a81ae 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Because SQL migrations can execute heavy queries on database which can slow down ## ⚙️ Config -_*For a Symfony > 6.x_ +_*For Symfony 6.4, 7.x or 8.x, with Doctrine DBAL 3 or 4_ Install in your project diff --git a/composer.json b/composer.json index f199de5..2d7687f 100644 --- a/composer.json +++ b/composer.json @@ -33,15 +33,15 @@ }, "require": { "php": "^8.1", - "doctrine/dbal": "^3.7", - "doctrine/migrations": "^3.3", - "symfony/string": "^6.4|^7.0" + "doctrine/dbal": "^3.7|^4.0", + "doctrine/migrations": "^3.6", + "symfony/string": "^6.4|^7.0|^8.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.9", - "phpstan/phpstan": "1.10.50", - "phpstan/phpstan-phpunit": "1.3.15", - "phpunit/phpunit": "^10.4.2", - "symfony/var-dumper": ">=6.3.8|^7.0" + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^10.4.2|^11.0", + "symfony/var-dumper": ">=6.3.8|^7.0|^8.0" } } diff --git a/phpstan.neon.dist b/phpstan.neon.dist index aa3b358..fa62ea7 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -4,7 +4,6 @@ includes: parameters: inferPrivatePropertyTypeFromConstructor: true tipsOfTheDay: false - checkMissingIterableValueType: false tmpDir: var/.phpstan.cache level: 9 paths: [ src, tests ] diff --git a/src/Doctrine/DBAL/Driver/Middleware/RetryLockTimeoutDriver.php b/src/Doctrine/DBAL/Driver/Middleware/RetryLockTimeoutDriver.php index 34a8420..abf9b72 100644 --- a/src/Doctrine/DBAL/Driver/Middleware/RetryLockTimeoutDriver.php +++ b/src/Doctrine/DBAL/Driver/Middleware/RetryLockTimeoutDriver.php @@ -18,7 +18,7 @@ public function __construct( } public function connect( - #[\SensitiveParameter] array $params + #[\SensitiveParameter] array $params, ): RetryLockTimeoutConnection { return new RetryLockTimeoutConnection(parent::connect($params), $this->logger); } diff --git a/src/Doctrine/Migration.php b/src/Doctrine/Migration.php index b86480f..d04b32e 100644 --- a/src/Doctrine/Migration.php +++ b/src/Doctrine/Migration.php @@ -37,6 +37,10 @@ public function down(Schema $schema): void $this->throwIrreversibleMigrationException(); } + /** + * @param mixed[] $params + * @param mixed[] $types + */ protected function addUnsafeSql(string $sql, array $params = [], array $types = [], ?int $statementTimeout = null): void { if (null !== $statementTimeout) { diff --git a/tests/Database/Doctrine/Migrations/MigrationTest.php b/tests/Database/Doctrine/Migrations/MigrationTest.php index 8e8f730..6428057 100644 --- a/tests/Database/Doctrine/Migrations/MigrationTest.php +++ b/tests/Database/Doctrine/Migrations/MigrationTest.php @@ -336,6 +336,10 @@ public function up(Schema $schema): void throw new \Exception('Unused for this test'); } + /** + * @param mixed[] $params + * @param mixed[] $types + */ public function addUnsafeSql(string $sql, array $params = [], array $types = [], ?int $statementTimeout = null): void { parent::addUnsafeSql($sql, $params, $types, $statementTimeout);