shivammathur/setup-php

Infrastructure & DevOpsMIT

Installs PHP with chosen extensions, ini settings and tools.

Latest 2.40.0 · by shivammathurWritten in TypeScriptWebsiteshivammathur/setup-phpRSS

Release activity

Release activity — 6 releases across 6 days in the last year. Each cell is one day; darker means more releases that day. Older weeks are hidden at this screen width.
AugSepOctNov
SundayNo releases on Aug 2, 2026No releases on Aug 9, 2026No releases on Aug 16, 2026No releases on Aug 23, 2026No releases on Aug 30, 2026No releases on Sep 6, 2026No releases on Sep 13, 2026No releases on Sep 20, 2026No releases on Sep 27, 2026No releases on Oct 4, 2026No releases on Oct 11, 2026No releases on Oct 18, 2026No releases on Oct 25, 2026No releases on Nov 1, 2026No releases on Nov 8, 2026No releases on Nov 15, 2026
MondayNo releases on Aug 3, 2026No releases on Aug 10, 2026No releases on Aug 17, 2026No releases on Aug 24, 2026No releases on Aug 31, 2026No releases on Sep 7, 2026No releases on Sep 14, 2026No releases on Sep 21, 2026No releases on Sep 28, 2026No releases on Oct 5, 2026No releases on Oct 12, 2026No releases on Oct 19, 2026No releases on Oct 26, 2026No releases on Nov 2, 2026No releases on Nov 9, 2026
TuesdayNo releases on Aug 4, 2026No releases on Aug 11, 2026No releases on Aug 18, 2026No releases on Aug 25, 2026No releases on Sep 1, 2026No releases on Sep 8, 2026No releases on Sep 15, 2026No releases on Sep 22, 20261 release on Sep 29, 2026No releases on Oct 6, 2026No releases on Oct 13, 2026No releases on Oct 20, 2026No releases on Oct 27, 2026No releases on Nov 3, 2026No releases on Nov 10, 2026
WednesdayNo releases on Aug 5, 2026No releases on Aug 12, 2026No releases on Aug 19, 2026No releases on Aug 26, 2026No releases on Sep 2, 2026No releases on Sep 9, 2026No releases on Sep 16, 2026No releases on Sep 23, 2026No releases on Sep 30, 2026No releases on Oct 7, 2026No releases on Oct 14, 2026No releases on Oct 21, 2026No releases on Oct 28, 2026No releases on Nov 4, 2026No releases on Nov 11, 2026
ThursdayNo releases on Aug 6, 2026No releases on Aug 13, 2026No releases on Aug 20, 2026No releases on Aug 27, 2026No releases on Sep 3, 2026No releases on Sep 10, 2026No releases on Sep 17, 2026No releases on Sep 24, 2026No releases on Oct 1, 20261 release on Oct 8, 2026No releases on Oct 15, 2026No releases on Oct 22, 2026No releases on Oct 29, 2026No releases on Nov 5, 2026No releases on Nov 12, 2026
FridayNo releases on Aug 7, 2026No releases on Aug 14, 2026No releases on Aug 21, 2026No releases on Aug 28, 2026No releases on Sep 4, 2026No releases on Sep 11, 2026No releases on Sep 18, 2026No releases on Sep 25, 2026No releases on Oct 2, 2026No releases on Oct 9, 2026No releases on Oct 16, 2026No releases on Oct 23, 2026No releases on Oct 30, 2026No releases on Nov 6, 2026No releases on Nov 13, 2026
SaturdayNo releases on Aug 8, 2026No releases on Aug 15, 2026No releases on Aug 22, 2026No releases on Aug 29, 2026No releases on Sep 5, 2026No releases on Sep 12, 2026No releases on Sep 19, 2026No releases on Sep 26, 2026No releases on Oct 3, 2026No releases on Oct 10, 2026No releases on Oct 17, 2026No releases on Oct 24, 2026No releases on Oct 31, 2026No releases on Nov 7, 2026No releases on Nov 14, 2026

6 releases in the last year

Changelog

2.40.0

Latest
Added 7
  • Support for PHP 8.7 nightly builds installed from the master branch of php/php-src
  • Support for Ubuntu 26.04 (ubuntu-26.04)
  • Support for pinning tools to SHA-256 and SHA-512 checksums
  • Support for the cpx tool
  • Support for the Laravel Cloud CLI
  • Configurable verbose logging using the verbose environment variable, with true or v showing command output and vv or vvv also enabling tracing
  • Opt-in support for cached PHP builds on Blacksmith and Depot runners using the use_builds_cache environment variable, currently experimental
Changed 7
  • Improved support for PHP version files, including version aliases, partial versions, and comments
  • Improved PHP installation on macOS using cached builds from shivammathur/php-darwin, reducing runtime from around a minute to 5-10 seconds
  • Improved Homebrew extension installation, timeout handling, and retries
  • Improved PHP installation on Windows using release manifests and cached builds from shivammathur/php-builder-windows
  • Improved caching and validation of versioned extensions on Linux, macOS, and Windows
  • Switched to Homebrew extension packages for Lua and GEOS extensions on supported macOS PHP versions
  • Updated Node.js dependencies and internal GitHub Actions workflows
Fixed 1
  • Couchbase, Oracle, and IBM extensions support on Ubuntu 26.04
Deprecated 2
  • The verbose and more-verbose tags in favor of the verbose environment variable
  • Support for Intel macOS and macOS 14 arm64 runners

From shivammathur/setup-php

Changelog
  • Added support for PHP 8.7 nightly builds. This installs PHP builds from the master branch of php/php-src.
- name: Setup PHP 8.7
  uses: shivammathur/setup-php@v2
  with:
    php-version: '8.7'
  • Added support for Ubuntu 26.04 (ubuntu-26.04). (#1083)

  • Added support for pinning tools to SHA-256 and SHA-512 checksums. (#1098, #1099)

- name: Setup PHP with tools pinned to checksums
  uses: shivammathur/setup-php@v2
  with:
    php-version: '8.5'
    tools: >
      composer:2.9.8@sha256:59b2c50e10cafa0d8efc19ede9a326d782f096c674a26baf98cf042ce23de890,
      phpunit:12.5.0@sha512:76430b433bd57f96e5fbbabaefc0c82e3a5b19b1a366bd836614344c441a7a87575d77faa07e0e58ecec52061af67584b036adc4311f0764bd4414bc62be4684
  • Fixed support for Couchbase, Oracle, and IBM extensions on Ubuntu 26.04. (#1123)

  • Added support for cpx. (#1104)

- name: Setup PHP with cpx
  uses: shivammathur/setup-php@v2
  with:
    php-version: '8.5'
    tools: cpx
  • Added support for Laravel Cloud CLI. (#1106)
- name: Setup PHP with Laravel Cloud CLI
  uses: shivammathur/setup-php@v2
  with:
    php-version: '8.5'
    tools: laravel-cloud
  • Added configurable verbose logging using the verbose environment variable. Set it to true or v to show command output, or vv or vvv to also enable tracing. Also, deprecated the verbose and more-verbose tags in favor of this environment variable. (#1077, #1118, #1119)
- name: Setup PHP with verbose logging
  uses: shivammathur/setup-php@v2
  with:
    php-version: '8.5'
  env:
    verbose: true
  • Improved support for PHP version files, including version aliases, partial versions, and comments. For example, a .php-version file containing 8.x can now be used to set up the latest stable PHP 8 version. (#1121)
- name: Checkout
  uses: actions/checkout@v7

- name: Setup PHP from a version file
  uses: shivammathur/setup-php@v2
  with:
    php-version-file: '.php-version'
  • Improved PHP installation on macOS using cached builds from shivammathur/php-darwin. This should improve the setup-php runtime from around a minute to 5-10s.

  • Improved Homebrew extension installation, timeout handling, and retries. (#1120)

  • Improved PHP installation on Windows using release manifests and cached builds from shivammathur/php-builder-windows.

  • Improved caching and validation of versioned extensions on Linux, macOS, and Windows. (#1108)

  • Added opt-in support for cached PHP builds on Blacksmith and Depot runners using use_builds_cache environment variable. This is currently experimental and uses the builds cache that we maintain for GitHub hosted runners. (#1056, #1129)

- name: Setup PHP with cached builds
  uses: shivammathur/setup-php@v2
  with:
    php-version: '8.5'
  env:
    use_builds_cache: true
  • Switched to Homebrew extension packages for Lua and GEOS extensions on supported macOS PHP versions.

  • Deprecated support for Intel macOS and macOS 14 arm64 runners. It is recommended to upgrade to arm64 based macOS runners (macos-15 or newer). (#1112)

  • Updated Node.js dependencies and internal GitHub Actions workflows.

For the complete list of changes, please refer to the Full Changelog

Thanks @kmaeda-rakus, @jrfnl, @WendellAdriel, @damiantw, @ibrahimlawal-paystack, @Perlence, and @Sainan for the contributions.

View originalPermalink
How 2.40.0 went

2.40.0-beta

Pre-release
Added 4
  • Support for PHP 8.7 nightly builds
  • Support for Ubuntu 26.04
  • Extension caching support
  • Configurable verbose logging
Changed 2
  • Improved PHP installation on macOS and Windows
  • Improved PHP version file support
Fixed 1
  • Fixed support for Intel macOS and macOS 14 arm64 based runners
Deprecated 1
  • Support for Intel macOS and macOS 14 arm64 based runners is deprecated and will be removed in a future release
View originalRead the notes
How 2.40.0-beta went

2.37.2

Changed 3
  • Switched to Visual Studio 18 (vs18) builds for PHP 8.6 on Windows
  • Improved looking up environment variables
  • Updated Node.js dependencies
Fixed 1
  • Fixed macOS setup by marking shivammathur/php and shivammathur/extensions as trusted taps
Security 1
  • Tightened security in internal GitHub action workflows
View originalRead the notes
How 2.37.2 went

2.37.1

Changed 7
  • Enabling the gearman extension on Linux was improved
  • Workflow examples were added for Drupal 11 composer-managed projects and WordPress plugins
  • Workflow examples were added for Yii3 web applications and Yii2 Starter Kit examples were replaced
  • Workflow examples were updated to use currently supported PHP versions
  • OS release mappings were updated for newer Ubuntu releases
  • Internal workflows were updated for Codecov v6 and NPM trusted publishing
  • Node.js dependencies were updated
Fixed 5
  • Support for phalcon on Windows was fixed
  • Restoring tools when using cached previous runs was fixed
  • Fallback when installing PhpManager and VcRedist modules on Windows was fixed
  • Parsing of extension inputs with backslash line continuation was fixed
  • Composer version in the README was fixed
Security 2
  • Shell command escaping and PHP version input validation were fixed (GHSA-pqwm-q9pv-ph8r / CVE-2026-46420)
  • GitHub OAuth configuration is now skipped when affected Composer versions are installed, and a warning to upgrade is shown (GHSA-5wxr-w449-57cm / CVE-2026-45793)
View originalRead the notes
How 2.37.1 went

2.37.0

Added 3
  • Added support for `master` in the `php-version` input to set up a nightly build from the master branch of `php-src`
  • Added support to install `ioncube` and `zephir_parser` extensions on PHP 8.5
  • Expanded support for installing extensions using Homebrew on macOS from the `shivammathur/homebrew-extensions` tap, including `pdo_firebird`, `sqlsrv`, `pdo_sqlsrv`, `pecl_http`, `swow`, `xhprof`, and several other supported extensions
Changed 10
  • Updated the action to use Node.js 24
  • Improved switching PHP versions on Linux so that missing alternatives are registered automatically before switching versions
  • Improved support for Homebrew on macOS to retry stuck `brew` commands with an inactivity watchdog
  • Improved support for adding tools to correctly use the latest release download URL when a version is not specified
  • Improved tool setup and caching on self-hosted runners
  • Improved support for `sqlsrv` and `pdo_sqlsrv` on PHP 8.1 and 8.2
Fixed 2
  • Fixed installing `pecl_http` on Windows by switching to `downloads.php.net` for fixing `ICU` version post install
  • Fixed cached `couchbase` installs on macOS using the `shivammathur/cache-extensions` action
View originalRead the notes
How 2.37.0 went

2.36.0

Added 4
  • Added support for PHP 8.5 stable release, usable via php-version '8.5'.
  • Added support for PHP 8.6.0-dev, where specifying 8.6 in the php-version input sets up a nightly build from the master branch of php-src.
  • Added support for the pdo_ibm and ibm_db2 extensions.
  • Added support to install the blackfire extension on PHP 8.5.
Changed 8
  • Improved detection of required libraries when building common extensions from source, such as installing gnupg from source automatically installing the required libgpgme library.
  • Improved symfony-cli support so it correctly sets up the requested version.
  • Improved support for the relay extension and added support to install its nightly version.
  • Improved installing PHP on macOS.
  • Improved support for deb822 format sources files on Linux, setting them up in deb822 format on Ubuntu 24.04, Debian 13, and newer, and automatically switching added repositories to the new format when supported.
  • Improved support for installing pdo_oci.
  • Updated the link for flex documentation in the README.
  • Updated Node.js dependencies.
Fixed 6
  • Fixed installing PHP on the macos-15-intel GitHub runner.
  • Fixed installing the gearman extension for PHP 5.6 and 7.0 on Linux.
  • Fixed an edge case in tools setup so it falls back to the latest version.
  • Fixed support for building extensions with uppercase names from PECL.
  • Fixed a warning on redis setup on macOS after a formula rename.
  • Fixed the fallback link for composer setup.
View originalRead the notes
How 2.36.0 went

2.35.5

Added 3
  • Added support for macOS 26 based environments
  • Added a fallback source for composer phar archives
  • Added a fallback source for PPA keys
Changed 3
  • Improved installing intl extension with a particular ICU versions
  • Improved errors when tools fail to install
  • Updated Node.js dependencies
Fixed 4
  • Fixed resolving tools' releases to the latest one for a version prefix in tools input
  • Fixed tools setup to use the new github-token input value to avoid rate limits
  • Fixed warning in get function on request failure
  • Fixed opcache.jit_buffer_size config on arm environments
View originalRead the notes
How 2.35.5 went

2.35.4

Changed 2
  • Updated actions in internal workflows
  • Updated Node.js dependencies
Fixed 1
  • Fixed updating brew core tap before installing PHP on macOS
View originalRead the notes
How 2.35.4 went

2.35.3

Changed 3
  • Improved github-token support for GitHub Enterprise, where the github-token input does not default to the GITHUB_TOKEN secret and it is recommended to set it to a Personal Access Token
  • Updated internal workflows to not run on forks
  • Updated Node.js dependencies
Fixed 1
  • Fixed support for the relay extension for PHP 7.4 on macOS
View originalRead the notes
How 2.35.3 went

2.35.2

Fixed 1
  • Fixed race condition in updating composer auth.json
View originalRead the notes
How 2.35.2 went
View all

Discussion

If you publish shivammathur/setup-php, you can claim this product by proving you administer its repository.