From 3c1c39af6277cd5d7337e82fa51f292ecf98fc2c Mon Sep 17 00:00:00 2001 From: Stephan Wentz Date: Thu, 18 Jan 2024 13:54:48 +0100 Subject: [PATCH 01/10] fix: Allow symfony console 7.0, remove php 8.1 support --- .github/workflows/build.yml | 2 +- composer.json | 6 +++--- phpunit.xml.dist | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 565246a..5acbdd0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,8 +18,8 @@ jobs: matrix: dependencies: ["lowest", "highest"] php-version: - - "8.1" - "8.2" + - "8.3" steps: - name: "Checkout" diff --git a/composer.json b/composer.json index ba9d74e..dabf7cd 100644 --- a/composer.json +++ b/composer.json @@ -14,8 +14,8 @@ } }, "require": { - "php": "^8.1", - "symfony/console": "^6.0", + "php": "^8.2", + "symfony/console": "^6.0|^7.0", "doctrine/dbal": "^3.1" }, "require-dev": { @@ -24,7 +24,7 @@ "jangregor/phpstan-prophecy": "^1.0", "phpstan/phpstan": "^1.0", "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^10.2" }, "config": { "sort-packages": true, diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 70ff084..4645316 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,13 +1,13 @@ - - - - src - - + tests + + + src + + From cbad0a87e60a91855889fd2591b71b1441ea9ec4 Mon Sep 17 00:00:00 2001 From: Stephan Wentz Date: Thu, 18 Jan 2024 14:06:15 +0100 Subject: [PATCH 02/10] fix: Add usage --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 1a32638..5ef59cb 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,13 @@ Register the commands in your `services.yaml`. Brainbits\DatabaseCommand\Command\WaitForDatabaseCommand: ~ ``` + +# Usage + +```sh +$ bin/console brainbits:database:wait-for-database --retry-seconds 3 --retry-count 100 +``` + +```sh +$ bin/console brainbits:database:schema-exists +``` From 86f0a4c84b35137b9e2a17364982c5cccfc8d993 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 17 Jan 2024 19:21:33 +0000 Subject: [PATCH 03/10] chore(deps): update actions/cache action to v4 --- .github/workflows/build.yml | 2 +- .github/workflows/code_coverage.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5acbdd0..4bac2a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,7 @@ jobs: extensions: mbstring - name: "Cache dependencies" - uses: "actions/cache@v3" + uses: "actions/cache@v4" with: path: "~/.composer/cache" key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" diff --git a/.github/workflows/code_coverage.yaml b/.github/workflows/code_coverage.yaml index 3ab32cd..820aa36 100644 --- a/.github/workflows/code_coverage.yaml +++ b/.github/workflows/code_coverage.yaml @@ -20,7 +20,7 @@ jobs: id: composer-cache run: | echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-php8.2-composer-${{ hashFiles('**/composer.json') }} From 966a35d41329a2d2e9f63ef866a327501ff84a18 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 10:56:50 +0000 Subject: [PATCH 04/10] chore(deps): update actions/checkout action to v4 --- .github/workflows/build.yml | 2 +- .github/workflows/code_coverage.yaml | 2 +- .github/workflows/release.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4bac2a3..b861357 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: steps: - name: "Checkout" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Install PHP" uses: "shivammathur/setup-php@v2" diff --git a/.github/workflows/code_coverage.yaml b/.github/workflows/code_coverage.yaml index 820aa36..46aad89 100644 --- a/.github/workflows/code_coverage.yaml +++ b/.github/workflows/code_coverage.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: shivammathur/setup-php@master with: php-version: 8.2 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f397c99..20ce678 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -15,7 +15,7 @@ jobs: steps: - name: "Checkout" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - uses: "actions/setup-node@v3" with: From 6a359b203fc3a9c1cc52bf487f25aee5eb536bae Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 16:24:30 +0000 Subject: [PATCH 05/10] chore(deps): update actions/setup-node action to v4 --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 20ce678..9555717 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,7 +17,7 @@ jobs: - name: "Checkout" uses: "actions/checkout@v4" - - uses: "actions/setup-node@v3" + - uses: "actions/setup-node@v4" with: node-version: 'lts/*' From 0e22c768616cf92c68cb926abe0c022c1695f8e2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 31 Jan 2024 18:18:03 +0000 Subject: [PATCH 06/10] chore(deps): update codecov/codecov-action action to v4 --- .github/workflows/code_coverage.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code_coverage.yaml b/.github/workflows/code_coverage.yaml index 46aad89..47e0790 100644 --- a/.github/workflows/code_coverage.yaml +++ b/.github/workflows/code_coverage.yaml @@ -30,7 +30,7 @@ jobs: - run: composer install --prefer-dist --no-progress --no-suggest - run: php vendor/bin/phpunit --coverage-clover build/logs/clover.xml - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos files: build/logs/clover.xml # optional From 2bb54d5b5673bbbb5ec976b154bb34691ac37e51 Mon Sep 17 00:00:00 2001 From: Stephan Wentz Date: Thu, 22 Feb 2024 16:15:37 +0100 Subject: [PATCH 07/10] fix: Allow doctrine/dbal 4.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index dabf7cd..758e6e2 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "require": { "php": "^8.2", "symfony/console": "^6.0|^7.0", - "doctrine/dbal": "^3.1" + "doctrine/dbal": "^3.1|^4.0" }, "require-dev": { "brainbits/phpcs-standard": "^7.0", From 38c675fc3ac5f7b26d0e3951e9b2fba06b204956 Mon Sep 17 00:00:00 2001 From: Alexej Leinweber Date: Tue, 13 Jan 2026 10:14:46 +0100 Subject: [PATCH 08/10] fix: Allow symfony console 8.0, require php 8.3 --- .github/workflows/build.yml | 1 - .github/workflows/code_coverage.yaml | 6 +++--- composer.json | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b861357..684e4bf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,6 @@ jobs: matrix: dependencies: ["lowest", "highest"] php-version: - - "8.2" - "8.3" steps: diff --git a/.github/workflows/code_coverage.yaml b/.github/workflows/code_coverage.yaml index 47e0790..c5571de 100644 --- a/.github/workflows/code_coverage.yaml +++ b/.github/workflows/code_coverage.yaml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v4 - uses: shivammathur/setup-php@master with: - php-version: 8.2 + php-version: 8.3 coverage: xdebug - name: Load dependencies from cache id: composer-cache @@ -23,9 +23,9 @@ jobs: - uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-php8.2-composer-${{ hashFiles('**/composer.json') }} + key: ${{ runner.os }}-php8.3-composer-${{ hashFiles('**/composer.json') }} restore-keys: | - ${{ runner.os }}-php8.2-composer- + ${{ runner.os }}-php8.3-composer- - run: composer install --prefer-dist --no-progress --no-suggest - run: php vendor/bin/phpunit --coverage-clover build/logs/clover.xml diff --git a/composer.json b/composer.json index 758e6e2..23a6093 100644 --- a/composer.json +++ b/composer.json @@ -14,8 +14,8 @@ } }, "require": { - "php": "^8.2", - "symfony/console": "^6.0|^7.0", + "php": "^8.3", + "symfony/console": "^7.4|^8.0", "doctrine/dbal": "^3.1|^4.0" }, "require-dev": { From f5267db1043305311a5360d4f3f05440287cc320 Mon Sep 17 00:00:00 2001 From: Alexej Leinweber Date: Tue, 13 Jan 2026 10:24:42 +0100 Subject: [PATCH 09/10] fix: Fix phpstan issues --- tests/Command/WaitForDatabaseCommandTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Command/WaitForDatabaseCommandTest.php b/tests/Command/WaitForDatabaseCommandTest.php index 5305538..b76fedb 100644 --- a/tests/Command/WaitForDatabaseCommandTest.php +++ b/tests/Command/WaitForDatabaseCommandTest.php @@ -69,7 +69,7 @@ public function testDatabaseAvailableAfterRetry(): void $this->assertSame(0, $result); preg_match_all('/Connection failed/', $tester->getDisplay(), $match); - $this->assertCount(1, $match[0] ?? []); + $this->assertCount(1, $match[0]); } public function testDatabaseFailAfterRetry(): void @@ -97,6 +97,6 @@ public function testDatabaseFailAfterRetry(): void $this->assertSame(200, $result); preg_match_all('/Connection failed/', $tester->getDisplay(), $match); - $this->assertCount(4, $match[0] ?? []); + $this->assertCount(4, $match[0]); } } From d14a819c76f18b14e08c6327ecde271a041aac5f Mon Sep 17 00:00:00 2001 From: Alexej Leinweber Date: Tue, 13 Jan 2026 13:42:48 +0100 Subject: [PATCH 10/10] chore: Bump dev deps, test for php 8.4 and 8.5 --- .github/workflows/build.yml | 2 ++ .github/workflows/code_coverage.yaml | 6 +++--- composer.json | 8 ++++---- tests/Command/WaitForDatabaseCommandTest.php | 1 + 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 684e4bf..ac9818d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,6 +19,8 @@ jobs: dependencies: ["lowest", "highest"] php-version: - "8.3" + - "8.4" + - "8.5" steps: - name: "Checkout" diff --git a/.github/workflows/code_coverage.yaml b/.github/workflows/code_coverage.yaml index c5571de..4316232 100644 --- a/.github/workflows/code_coverage.yaml +++ b/.github/workflows/code_coverage.yaml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v4 - uses: shivammathur/setup-php@master with: - php-version: 8.3 + php-version: 8.4 coverage: xdebug - name: Load dependencies from cache id: composer-cache @@ -23,9 +23,9 @@ jobs: - uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-php8.3-composer-${{ hashFiles('**/composer.json') }} + key: ${{ runner.os }}-php8.4-composer-${{ hashFiles('**/composer.json') }} restore-keys: | - ${{ runner.os }}-php8.3-composer- + ${{ runner.os }}-php8.4-composer- - run: composer install --prefer-dist --no-progress --no-suggest - run: php vendor/bin/phpunit --coverage-clover build/logs/clover.xml diff --git a/composer.json b/composer.json index 23a6093..534108d 100644 --- a/composer.json +++ b/composer.json @@ -20,10 +20,10 @@ }, "require-dev": { "brainbits/phpcs-standard": "^7.0", - "brainbits/phpstan-rules": "^3.0", - "jangregor/phpstan-prophecy": "^1.0", - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-phpunit": "^1.3", + "brainbits/phpstan-rules": "^4.0", + "jangregor/phpstan-prophecy": "^2.2", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", "phpunit/phpunit": "^10.2" }, "config": { diff --git a/tests/Command/WaitForDatabaseCommandTest.php b/tests/Command/WaitForDatabaseCommandTest.php index b76fedb..c1d7991 100644 --- a/tests/Command/WaitForDatabaseCommandTest.php +++ b/tests/Command/WaitForDatabaseCommandTest.php @@ -23,6 +23,7 @@ public function testConstruction(): void $connection = $this->createMock(Connection::class); $command = new WaitForDatabaseCommand($connection); + /** @phpstan-ignore method.alreadyNarrowedType */ $this->assertInstanceOf(Command::class, $command); }