shivammathur/setup-php@v2 seems to use a different PHP version than expected.
Ge0 opened this issue · comments
Describe the bug
I am normally using the version 8.2.12 for this runner, which is able to use xdebug
as a coverage tool.
Lately, PHP has been updated to 8.2.13 which does not seem to be able to use xdebug
and my pipeline fails onwards.
I have tried to fix the version to 8.2.12 through the php-version
key but the runner does not seem to be picking it (still using 8.2.13 instead).
Version
- I have checked releases, and the bug exists in the latest patch version of
v1
orv2
. -
v2
-
v1
Runners
- GitHub Hosted
- Self Hosted
Operating systems
ubuntu-latest
PHP versions
8.2.13
To Reproduce
name: Test pipline
on: [push, workflow_dispatch]
jobs:
setup:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ["8.2"]
name: Setup on PHP ${{ matrix.php-versions }} and ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: apcu, ctype, dom, fileinfo, gmp, iconv, intl, json, libxml, mbstring, uuid, amqp, redis, pcre, PDO, Phar, SimpleXML, tokenizer, xml, xmlwriter, xsl, openssl, blackfire
coverage: xdebug
tools: cs2pr
env:
BLACKFIRE_SERVER_ID: ${{ secrets.BLACKFIRE_SERVER_ID }}
BLACKFIRE_SERVER_TOKEN: ${{ secrets.BLACKFIRE_SERVER_TOKEN }}
BLACKFIRE_CLIENT_ID: ${{ secrets.BLACKFIRE_CLIENT_ID }}
BLACKFIRE_CLIENT_TOKEN: ${{ secrets.BLACKFIRE_CLIENT_TOKEN }}
Expected behavior
Run shivammathur/setup-php@v2
/usr/bin/bash /home/runner/work/_actions/shivammathur/setup-php/v2/src/scripts/run.sh
==> Setup PHP
✓ PHP Installed PHP 8.2.12
==> Setup Extensions
✓ apcu Enabled
✓ ctype Enabled
✓ dom Enabled
✓ fileinfo Enabled
✓ gmp Enabled
✓ iconv Enabled
✓ intl Enabled
✓ json Enabled
✓ libxml Enabled
✓ mbstring Enabled
✓ uuid Installed and enabled
✓ amqp Enabled
✓ redis Enabled
✓ pcre Enabled
✓ pdo Enabled
✓ phar Enabled
✓ simplexml Enabled
✓ tokenizer Enabled
✓ xml Enabled
✓ xmlwriter Enabled
✓ xsl Enabled
✓ openssl Enabled
✓ blackfire Installed and enabled
==> Setup Tools
✓ composer Added composer 2.6.5
✓ cs2pr Added cs2pr 1.8.5
==> Setup Coverage
✓ xdebug Xdebug 3.2.1 enabled as coverage driver
==> #StandWithUkraine
✓ read-more https://setup-php.com/support-ukraine
Screenshots/Logs
First things first, xdebug
is not being set up:
Run shivammathur/setup-php@v2
/usr/bin/bash /home/runner/work/_actions/shivammathur/setup-php/v2/src/scripts/run.sh
==> Setup PHP
✓ PHP Installed PHP 8.2.[13](https://github.com/Grand-Angle/ga-api/actions/runs/7060004394/job/19218702588#step:3:14)
==> Setup Extensions
✓ apcu Enabled
✓ ctype Enabled
✓ dom Enabled
✓ fileinfo Enabled
✓ gmp Enabled
✓ iconv Enabled
✓ intl Enabled
✓ json Enabled
✓ libxml Enabled
✓ mbstring Enabled
✓ uuid Installed and enabled
✓ amqp Enabled
✓ redis Enabled
✓ pcre Enabled
✓ pdo Enabled
✓ phar Enabled
✓ simplexml Enabled
✓ tokenizer Enabled
✓ xml Enabled
✓ xmlwriter Enabled
✓ xsl Enabled
✓ openssl Enabled
✓ blackfire Installed and enabled
==> Setup Tools
✓ composer Added composer 2.6.5
✓ cs2pr Added cs2pr 1.8.5
==> Setup Coverage
✗ xdebug Could not install xdebug on PHP 8.2.13
==> Sponsor setup-php
✓ setup-php https://setup-php.com/sponsor
Additional context
Here is the actual failing step after I got to use PHP 8.2.13, altough I am not sure there is a link:
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
Output:
Run actions/cache@v2
with:
key: Linux-composer-bec7486ed7b8a9436b740d6c[2](https://github.com/Grand-Angle/ga-api/actions/runs/7060004394/job/19218702588#step:5:2)542bef15254c[3](https://github.com/Grand-Angle/ga-api/actions/runs/7060004394/job/19218702588#step:5:3)[4](https://github.com/Grand-Angle/ga-api/actions/runs/7060004394/job/19218702588#step:5:4)eeabef2f7ebc8ebe38dcc8600
restore-keys: Linux-composer-
env:
COMPOSER_PROCESS_TIMEOUT: 0
COMPOSER_NO_INTERACTION: 1
COMPOSER_NO_AUDIT: 1
Error: Input required and not supplied: path
Are you willing to submit a PR?
If needed, yes.
@Ge0 You can either use Blackfire or Xdebug in the same workflow. Please remove either since both do not work together.