shivammathur / setup-php

GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.

Home Page:https://setup-php.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using Ubuntu 24.04 runner doesn't setup < PHP 8.3

LordSimal opened this issue Β· comments

Describe the bug
I just tried to upgrade my CI config to use the newly released Ubuntu 24.04 image/runners.

But it seems the setup script to setup any version other than PHP 8.3 doesn't work due to

Run shivammathur/setup-php@v2
  with:
    php-version: 8.1
    extensions: mbstring, intl
    ini-values: zend.assertions=1
    coverage: pcov
    ini-file: production
/usr/bin/bash /home/runner/work/_actions/shivammathur/setup-php/v[2](https://github.com/LordSimal/cakephp-sentry/actions/runs/8910785942/job/24964649384?pr=14#step:3:2)/src/scripts/run.sh

==> Setup PHP
βœ— PHP Could not setup PHP 8.1
Error: The process '/usr/bin/bash' failed with exit code 1

See https://github.com/LordSimal/cakephp-sentry/actions/runs/8910785942/job/24964649384

Version

  • I have checked releases, and the bug exists in the latest patch version of v1 or v2.
  • v2
  • v1

Runners

  • GitHub Hosted
  • Self Hosted

Operating systems
Ubuntu 24.04

PHP versions
Anything other than PHP 8.3 (aka current latest)

To Reproduce

name: CI

on:
  push:
    branches:
      - '3.x'
  pull_request:
    branches:
      - '*'
  workflow_dispatch:

permissions:
  contents: read # to fetch code (actions/checkout)

jobs:
  testsuite-linux:
    runs-on: ubuntu-22.04
    strategy:
      fail-fast: false
      matrix:
        php-version: [ '8.1', '8.3' ]
        dependencies: ['highest']
        include:
          - php-version: '8.1'
            dependencies: 'lowest'
          - php-version: '8.3'
            dependencies: 'highest'

    steps:
      - uses: actions/checkout@v4

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-version }}
          extensions: mbstring, intl
          ini-values: zend.assertions=1
          coverage: pcov

Expected behavior
It should build and setup the the desired PHP version as configured

Screenshots/Logs
image

Additional context
🀷🏻

Are you willing to submit a PR?
No idea how this script works, so sadly no 😒

@LordSimal

They just released it, I will add the builds soon πŸ˜…

thanks for the quick reply. Just wanted to inform you πŸ˜‰

@LordSimal I have added the builds, it should work now.

Can confirm it now works with PHP 7.4, 8.0, 8.1 and PHP 8.2 again πŸ‘πŸ»