From f920be323dfe532928d3a4c9ce42b85d292a604e Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Sat, 5 Sep 2026 01:04:09 +0200 Subject: [PATCH 1/2] Added optional php-version input to the composer-install action The action passed matrix.php straight to setup-php. Callers without a PHP matrix ended up with an empty version and setup-php silently installed the latest stable PHP. The input is optional and falls back to matrix.php when empty, so existing matrix-based callers are not affected. Co-Authored-By: Claude Fable 5 --- actions/composer-install/action.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/actions/composer-install/action.yml b/actions/composer-install/action.yml index 4c1ebbf..f92a43a 100644 --- a/actions/composer-install/action.yml +++ b/actions/composer-install/action.yml @@ -17,6 +17,12 @@ inputs: satis-network-token: description: 'Satis Network Token' required: false + php-version: + description: >- + PHP version to set up (passed to setup-php). When empty, falls back to the calling job's + `matrix.php` for backwards compatibility. Jobs without a PHP matrix should set it explicitly, + otherwise setup-php installs its default (latest stable) PHP. + required: false php-extensions: description: 'Comma-separated list of PHP extensions to install' required: false @@ -48,7 +54,7 @@ runs: uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 id: setup_php with: - php-version: ${{ matrix.php }} + php-version: ${{ inputs.php-version != '' && inputs.php-version || matrix.php }} coverage: ${{ inputs.coverage }} extensions: ${{ inputs.php-extensions }} tools: cs2pr From 7a6d0ebd543251b87c745034c6d92f2c68c2fe68 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Sat, 5 Sep 2026 01:04:09 +0200 Subject: [PATCH 2/2] Exposed php-version input in the reusable Rector workflow The Rector job has no matrix, so composer-install resolved an empty PHP version and setup-php picked its default (PHP 8.5.10 observed in https://github.com/ibexa/cloud/actions/runs/33925477235). The input is passed through to composer-install with no default on purpose: current behavior stays unless a caller opts in with e.g. php-version: '8.3'. Co-Authored-By: Claude Fable 5 --- .github/workflows/rector.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index 4265bcc..b2b7e10 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -2,6 +2,11 @@ name: Rector PHP on: workflow_call: + inputs: + php-version: + description: 'PHP version to run Rector with. When empty, setup-php default (latest stable) is used.' + required: false + type: string secrets: SATIS_NETWORK_KEY: required: false @@ -20,6 +25,7 @@ jobs: - uses: ibexa/gh-workflows/actions/composer-install@main with: + php-version: ${{ inputs.php-version }} gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }} gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }} satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }}