From f697f5d24571721743d84ee90af8957291150f07 Mon Sep 17 00:00:00 2001 From: Andrii Dembitskyi Date: Fri, 28 Nov 2025 11:10:15 +0100 Subject: [PATCH 1/7] :sparkles: Allow Symfony 8 --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 96d8f72..551f683 100644 --- a/composer.json +++ b/composer.json @@ -19,14 +19,14 @@ "require" : { "php" : ">=8.1", "thecodingmachine/graphqlite" : "^7.0 || ^8.0", - "symfony/validator": "^6.4 || ^7" + "symfony/validator": "^6.4 || ^7.0 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^11", "mouf/picotainer": "^1.1", "phpstan/phpstan": "^2", "php-coveralls/php-coveralls": "^2.1.0", - "symfony/translation": "^7", + "symfony/translation": "^7.0 || ^8.0", "doctrine/coding-standard": "^12" }, "scripts": { From 395ff277e289a8c5f8835f460a61d3bd75d3954d Mon Sep 17 00:00:00 2001 From: Andrii Dembitskyi Date: Fri, 28 Nov 2025 19:11:02 +0100 Subject: [PATCH 2/7] :package: Reuse dependabot config from graphqlite-bundle (update GH actions and composer fully) --- .github/dependabot.yaml | 15 +++++++++++++++ .github/dependabot.yml | 12 ------------ 2 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 .github/dependabot.yaml delete mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..7ffa7a6 --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,15 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: '/' + schedule: + interval: weekly + pull-request-branch-name: + separator: '-' + - package-ecosystem: composer + directory: '/' + versioning-strategy: widen + schedule: + interval: weekly + pull-request-branch-name: + separator: '-' diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index c162d79..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: 2 -updates: -- package-ecosystem: composer - directory: "/" - schedule: - interval: daily - time: "04:00" - open-pull-requests-limit: 10 - ignore: - - dependency-name: doctrine/coding-standard - versions: - - 8.0.0 From 9d9bbcb924650459e8ef143f6b0d2701e8484148 Mon Sep 17 00:00:00 2001 From: Andrii Dembitskyi Date: Fri, 28 Nov 2025 19:14:24 +0100 Subject: [PATCH 3/7] :package: Introduce phpunit + phpstan CI checks --- .github/workflows/test.yaml | 70 +++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..f23cffa --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,70 @@ +name: test +on: + pull_request: ~ + push: + branches: + - master + +jobs: + test: + runs-on: ubuntu-latest + name: test + strategy: + matrix: + install-args: [''] + php-version: ['8.1', '8.2', '8.3', '8.4'] + fail-fast: false + steps: + # Cancel previous runs of the same branch + - name: cancel + uses: styfle/cancel-workflow-action@0.12.1 + with: + access_token: ${{ github.token }} + + - name: checkout + uses: actions/checkout@v5 + + - name: php + uses: shivammathur/setup-php@2.35.5 + with: + php-version: ${{ matrix.php-version }} + ini-values: zend.assertions=1 + + - name: composer-cache-dir + id: composercache + run: | + echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: composer-cache + uses: actions/cache@v4.2.4 + with: + path: ${{ steps.composercache.outputs.dir }} + key: composer-${{ hashFiles('**/composer.json') }}-${{ matrix.install-args }} + restore-keys: | + composer-${{ hashFiles('**/composer.json') }}-${{ matrix.install-args }} + composer-${{ hashFiles('**/composer.json') }}- + composer- + + - name: composer + run: | + composer update ${{ matrix.install-args }} --no-interaction --no-progress --prefer-dist + + - name: phpunit + run: | + vendor/bin/phpunit --no-coverage + + - name: phpstan-cache + uses: actions/cache@v4.2.4 + with: + key: phpstan-${{ matrix.php-version }}-${{ matrix.install-args }}-${{ github.ref }}-${{ github.sha }} + path: .phpstan-cache + restore-keys: | + phpstan-${{ matrix.php-version }}-${{ matrix.install-args }}-${{ github.ref }}- + phpstan-${{ matrix.php-version }}-${{ matrix.install-args }}- + phpstan-${{ matrix.php-version }}- + phpstan- + + - name: phpstan + run: | + mkdir -p .phpstan-cache + vendor/bin/phpstan analyse --no-progress --no-interaction --memory-limit=1G From 9e8c833b42eb55b0feb6b306ef1ecb36cfbbf26b Mon Sep 17 00:00:00 2001 From: Andrii Dembitskyi Date: Fri, 28 Nov 2025 19:19:02 +0100 Subject: [PATCH 4/7] :package: Downgrade phpunit for PHP 8.1 support --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 551f683..1b6b578 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "symfony/validator": "^6.4 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^11", + "phpunit/phpunit": "^10", "mouf/picotainer": "^1.1", "phpstan/phpstan": "^2", "php-coveralls/php-coveralls": "^2.1.0", From e7e7e67e72792ae24b4adc92834de7ed269afa9f Mon Sep 17 00:00:00 2001 From: Andrii Dembitskyi Date: Fri, 28 Nov 2025 19:20:11 +0100 Subject: [PATCH 5/7] :fire: Drop Travis CI configs (unused) --- .travis.yml | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b565bac..0000000 --- a/.travis.yml +++ /dev/null @@ -1,44 +0,0 @@ -language: php -sudo: false -cache: - directories: - - $HOME/.composer/cache/files - #- $HOME/symfony-bridge/.phpunit - -env: - global: - - PHPUNIT_FLAGS="-v" - #- SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit" - -matrix: - fast_finish: true - include: - # Test LTS versions. - - php: 8.1 - env: DEPENDENCIES="symfony/^6" - - allow_failures: - # Minimum supported dependencies with the latest and oldest PHP version - - php: 8.1 - env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors" - # Dev-master is allowed to fail. - - env: STABILITY="dev" - -before_install: - - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi - - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi; - - if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi; - -install: - # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 - - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi - - composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction - -script: - - composer validate --strict --no-check-lock - - composer phpstan - - composer cs-check - - ./vendor/bin/phpunit - -after_script: - - ./vendor/bin/php-coveralls -v From 85c8c5fe8caf50262c259df0dfbca8db1de22ce8 Mon Sep 17 00:00:00 2001 From: Andrii Dembitskyi Date: Fri, 28 Nov 2025 19:21:56 +0100 Subject: [PATCH 6/7] :package: Check phpcs in CI too --- .github/workflows/test.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f23cffa..52fbd9d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -49,6 +49,10 @@ jobs: run: | composer update ${{ matrix.install-args }} --no-interaction --no-progress --prefer-dist + - name: phpcs + run: | + vendor/bin/phpcs --no-cache + - name: phpunit run: | vendor/bin/phpunit --no-coverage From d1e7cb2cd3ca2d6db5eca98dbbf4063c718c817f Mon Sep 17 00:00:00 2001 From: Andrii Dembitskyi Date: Fri, 28 Nov 2025 19:26:01 +0100 Subject: [PATCH 7/7] :package: Allow symfony/translation 6.4 to ensure PHP 8.1 compatibility --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1b6b578..936e3f6 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "mouf/picotainer": "^1.1", "phpstan/phpstan": "^2", "php-coveralls/php-coveralls": "^2.1.0", - "symfony/translation": "^7.0 || ^8.0", + "symfony/translation": "^6.4 || ^7.0 || ^8.0", "doctrine/coding-standard": "^12" }, "scripts": {