From 4b232faf468be240340dffb297cd52139c5c5db6 Mon Sep 17 00:00:00 2001 From: Jakob Perry Date: Tue, 18 Aug 2026 15:07:20 -0700 Subject: [PATCH 1/2] chore: migrate CI from Travis/ORCA to GitHub Actions Travis CI has been unused for this project for years and the "ORCA CI" workflow was really just a Travis translation, carrying an obsolete PHP 7.3/8.0 and Symfony 4.4/5.3 matrix. Replace both with a single .github/workflows/tests.yml: - Triggers on push and pull_request. - Matrix over PHP 7.4 (the composer.json floor), 8.4 (current) and 8.5 (next, non-blocking via continue-on-error while tooling catches up). - Validates composer.json, installs dependencies and runs the native PHPUnit suite directly rather than going through make/ORCA. - Coding standards (php-cs-fixer, phpmd) run once in a separate job on the current PHP version. Also swap the Travis badge in README.md for the Actions badge and ignore the modern .php-cs-fixer.cache filename. --- .github/workflows/orca.yml | 64 ------------------------------- .github/workflows/tests.yml | 76 +++++++++++++++++++++++++++++++++++++ .gitignore | 1 + .travis.yml | 35 ----------------- README.md | 2 +- 5 files changed, 78 insertions(+), 100 deletions(-) delete mode 100644 .github/workflows/orca.yml create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/orca.yml b/.github/workflows/orca.yml deleted file mode 100644 index be70f3c..0000000 --- a/.github/workflows/orca.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: ORCA CI -on: - push: - pull_request: - schedule: - - cron: "0 0 * * *" -jobs: - build: - runs-on: ubuntu-latest - env: - PSR_MESSAGE_BRIDGE_VERSION: ${{ matrix.PSR_MESSAGE_BRIDGE_VERSION }} - SYMFONY_VERSION: ${{ matrix.SYMFONY_VERSION }} - SYMFONY_DEPRECATIONS_HELPER: ${{ matrix.SYMFONY_DEPRECATIONS_HELPER }} - COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_RUN_ID: ${{ github.run_id }} - GITHUB_EVENT_NAME: ${{ github.event_name }} - strategy: - matrix: - include: - - PSR_MESSAGE_BRIDGE_VERSION: "2.1" - SYMFONY_VERSION: "5.3" - SYMFONY_DEPRECATIONS_HELPER: "weak" - php-version : "8.0" - - - PSR_MESSAGE_BRIDGE_VERSION: "2.1" - SYMFONY_VERSION: "5.3" - SYMFONY_DEPRECATIONS_HELPER: "weak" - php-version: "7.4" - - - PSR_MESSAGE_BRIDGE_VERSION: "2.1" - SYMFONY_VERSION: "5.3" - SYMFONY_DEPRECATIONS_HELPER: "weak" - php-version: "7.3" - - - PSR_MESSAGE_BRIDGE_VERSION: "2.1" - SYMFONY_VERSION: "4.4" - php-version: "7.4" - - - PSR_MESSAGE_BRIDGE_VERSION: "2.1" - SYMFONY_VERSION: "4.4" - php-version: "7.4" - steps: - - uses: actions/checkout@v2 - - - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-version }} - coverage: none - - - name: Before install - run: composer self-update - - - name: Install - run: | - composer require "symfony/psr-http-message-bridge:${{matrix.PSR_MESSAGE_BRIDGE_VERSION}}" --no-update - composer require "symfony/security-bundle:${{matrix.SYMFONY_VERSION}}" --no-update - make install - - - name: Script - run: make test - - - name: coverage - if: ${{ matrix.PSR_MESSAGE_BRIDGE_VERSION == '2.1' && matrix.SYMFONY_VERSION == '5.3' && matrix.php-version != '8.0'}} - run: make coverage diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..d10c948 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,76 @@ +name: Tests + +on: + push: + pull_request: + +permissions: + contents: read + +jobs: + tests: + name: PHP ${{ matrix.php-version }} + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental }} + strategy: + fail-fast: false + matrix: + include: + # Earliest supported PHP version (see "php" in composer.json). + - php-version: "7.4" + experimental: false + # Current PHP version. + - php-version: "8.4" + experimental: false + # Next PHP version -- reported, but not blocking while the test + # tooling catches up. + - php-version: "8.5" + experimental: true + + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + coverage: none + tools: composer:v2 + + - name: Validate composer.json + run: composer validate --strict + + - name: Cache Composer packages + uses: actions/cache@v4 + with: + path: ~/.cache/composer/files + key: composer-${{ matrix.php-version }}-${{ hashFiles('composer.json') }} + restore-keys: composer-${{ matrix.php-version }}- + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + - name: PHPUnit + run: vendor/bin/phpunit + + lint: + name: Coding standards + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: "8.4" + coverage: none + tools: composer:v2 + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + - name: PHP-CS-Fixer + run: vendor/bin/php-cs-fixer fix --dry-run --diff -v + + - name: PHPMD + run: vendor/bin/phpmd src/,test/ text ./phpmd.xml diff --git a/.gitignore b/.gitignore index 5c1f3f9..31817e5 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ composer.lock # Ignore PHP-CS-Fixer files /.php_cs /.php_cs.cache +/.php-cs-fixer.cache /cs_fixer_tmp_* diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a05ed95..0000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -# -# acquia/http-hmac-php project Travis configuration -# -# @see https://docs.travis-ci.com/user/customizing-the-build/ -# - -language: php - -matrix: - fast_finish: true - include: - - { php: 8.0, env: PSR_MESSAGE_BRIDGE_VERSION=2.1 SYMFONY_VERSION=5.3 SYMFONY_DEPRECATIONS_HELPER=weak, name: "PHP 8.0, Symfony 5.3" } - - { php: 7.4, env: PSR_MESSAGE_BRIDGE_VERSION=2.1 SYMFONY_VERSION=5.3 SYMFONY_DEPRECATIONS_HELPER=weak, name: "PHP 7.4, Symfony 5.3" } - - { php: 7.3, env: PSR_MESSAGE_BRIDGE_VERSION=2.1 SYMFONY_VERSION=5.3 SYMFONY_DEPRECATIONS_HELPER=weak, name: "PHP 7.3, Symfony 5.3" } - - { php: 7.4, env: PSR_MESSAGE_BRIDGE_VERSION=2.1 SYMFONY_VERSION=4.4, name: "PHP 7.4, Symfony 4.4" } - - { php: 7.3, env: PSR_MESSAGE_BRIDGE_VERSION=2.1 SYMFONY_VERSION=4.4, name: "PHP 7.3, Symfony 4.4" } - -before_install: - - travis_retry composer self-update - - phpenv config-rm xdebug.ini - - echo "memory_limit=2G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - -install: - - composer require "symfony/psr-http-message-bridge:${PSR_MESSAGE_BRIDGE_VERSION}" --no-update - - composer require "symfony/security-bundle:${SYMFONY_VERSION}" --no-update - - travis_retry make install - -script: - - make test - -jobs: - include: - - stage: coverage - script: make coverage - env: PSR_MESSAGE_BRIDGE_VERSION=2.1 SYMFONY_VERSION=5.3 diff --git a/README.md b/README.md index cfe9f00..b190877 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # HTTP HMAC Signer for PHP -[![Build Status](https://travis-ci.org/acquia/http-hmac-php.svg)](https://travis-ci.org/acquia/http-hmac-php) +[![Tests](https://github.com/acquia/http-hmac-php/actions/workflows/tests.yml/badge.svg)](https://github.com/acquia/http-hmac-php/actions/workflows/tests.yml) [![Total Downloads](https://poser.pugx.org/acquia/http-hmac-php/downloads)](https://packagist.org/packages/acquia/http-hmac-php) [![Latest Stable Version](https://poser.pugx.org/acquia/http-hmac-php/v/stable.svg)](https://packagist.org/packages/acquia/http-hmac-php) [![License](https://poser.pugx.org/acquia/http-hmac-php/license.svg)](https://packagist.org/packages/acquia/http-hmac-php) From 1cb1112201b0cc43568118bd05ca4f37bbc09a61 Mon Sep 17 00:00:00 2001 From: Jakob Perry Date: Tue, 18 Aug 2026 15:14:21 -0700 Subject: [PATCH 2/2] chore: pin the Tests badge to master and document the experimental PHP slot The badge now reports the default branch explicitly rather than whichever branch ran most recently. The non-blocking PHP 8.5 job is a permanent slot for the next PHP release, not a temporary hedge, so keep continue-on-error in place and promote the version through the matrix as releases land. --- .github/workflows/tests.yml | 6 ++++-- README.md | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d10c948..1476387 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,8 +22,10 @@ jobs: # Current PHP version. - php-version: "8.4" experimental: false - # Next PHP version -- reported, but not blocking while the test - # tooling catches up. + # Next PHP version. This slot is always non-blocking by design: it + # gives early warning about the upcoming release without failing the + # build over tooling that has not caught up yet. When 8.5 becomes + # current, promote it and open a new experimental slot for 8.6. - php-version: "8.5" experimental: true diff --git a/README.md b/README.md index b190877..dbf5cbe 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # HTTP HMAC Signer for PHP -[![Tests](https://github.com/acquia/http-hmac-php/actions/workflows/tests.yml/badge.svg)](https://github.com/acquia/http-hmac-php/actions/workflows/tests.yml) +[![Tests](https://github.com/acquia/http-hmac-php/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/acquia/http-hmac-php/actions/workflows/tests.yml) [![Total Downloads](https://poser.pugx.org/acquia/http-hmac-php/downloads)](https://packagist.org/packages/acquia/http-hmac-php) [![Latest Stable Version](https://poser.pugx.org/acquia/http-hmac-php/v/stable.svg)](https://packagist.org/packages/acquia/http-hmac-php) [![License](https://poser.pugx.org/acquia/http-hmac-php/license.svg)](https://packagist.org/packages/acquia/http-hmac-php)