GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.
castor
in tools input. #746- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: castor
Fixed support for self-hosted Debian 12 environments.
Fixed support for self-hosted environments using DEB822-STYLE .sources files.
Fixed re-enabling opcache extension on macOS. #749
Updated Node.js dependencies.
Full Changelog: https://github.com/shivammathur/setup-php/compare/2.25.4...2.25.5
Fixed regression in 2.25.3 in PHPUnit installation by specifying major
or major.minor
version in the tools
input. #743
Fixed fs
import in utls.test.ts
.
Updated Node.js dependencies.
Full Changelog: https://github.com/shivammathur/setup-php/compare/2.25.3...2.25.4
Added support for zts
intl builds for all supported ICU versions. #739, https://github.com/shivammathur/icu-intl/commit/d6ee42cd39943b532979d8f8ad6223042347b5cc.
Added docker to the shivammathur/node
images. #742
Fixed regression in support for Zend extensions installed using PECL. #738
Fixed PHPUnit
and phpcpd
support to set up versions compatible with the PHP version. #732
Fixed support for nektos/act
to run the action in self-hosted mode when using the tool. #742
Fixed parsing versions in tools input. #734
Updated Node.js dependencies.
Full Changelog: https://github.com/shivammathur/setup-php/compare/2.25.2...2.25.3
Thanks @ramsey and @pxlrbt for the sponsorship ❤️
extensions
input with version. #725memcache
extension to 8.2
in the builds cache for GitHub Actions Ubuntu environments for PHP 8.0 and above. #725Full Changelog: https://github.com/shivammathur/setup-php/compare/2.25.1...2.25.2
2.25.0
(#722).Add-DebugSymbols
on Windows.Full Changelog: https://github.com/shivammathur/setup-php/compare/2.25.0...2.25.1
ubuntu-22.04
or ubuntu-20.04
runners.- runs-on: ubuntu-18.04
+ runs-on: ubuntu-22.04
# or
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-20.04
Added support for php-version-file
input to read the input PHP version from a file Docs. (#690)
Example: If you have a file .php-version
in your file structure with the PHP version as its content, you can use the php-version-file
input.
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version-file: .php-version
intl
extension with ICU 73.1
. https://github.com/shivammathur/icu-intl/pull/5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
extensions: intl-73.1
snmp
and uuid
on macOS using shivammathur/extensions
tap. (https://github.com/shivammathur/homebrew-extensions/issues/2426, https://github.com/shivammathur/homebrew-extensions/issues/2452)- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
extensions: snmp, uuid
Added retry logic across Windows to decrease the network failure rate. (#700, #711)
Switched to using phpenmod
script to enable extensions on Linux.
Switched to using Write-Error
instead of Exit
on Windows as that did not stop the workflow on errors. (#709)
Improved support for relay
extension. #719
Fixed support for zts
build of zephir_parser
extension. #701
Fixed parameters in the xargs
call. #712
Fixed minor shellcheck error.
Fixed the wrapper used to install Debian packages to check for broken package failures.
Fixed the JIT config set up to match the docs.
Updated Node.js dependencies.
Full Changelog: https://github.com/shivammathur/setup-php/compare/2.24.0...2.25.0
utils.ts
by @viktorruskai in https://github.com/shivammathur/setup-php/pull/689
Thanks! for the contribution 🎉
relay
extension on Linux and macOS for PHP 7.4 to 8.2. (#682)- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: relay # or specific version like relay-0.4.6
env:
RELAY_KEY: ${{ secrets.RELAY_KEY }}
RELAY_ENVIRONMENT: development
RELAY_EVICTION_POLICY: lru
RELAY_MAX_MEMORY: 256M
zephir_parser
extension. (#681)- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: zephir_parser
Fixed support for self-hosted environments with outdated package lists. (#688)
Fixed logs for coverage extensions on PHP 8.3. (#685)
Fixed PECL options parsing on macOS. (#680)
Fixed support for blackfire-player
.
Fixed fetching phalcon
release asset URL on Windows.
Fixed protoc
support to account for release versions in major.minor
format.
Change the choco
install script URL to avoid redirecting.
Refactored function names in scripts for tools and extensions with custom support.
Updated Node.js dependencies.
Full Changelog: https://github.com/shivammathur/setup-php/compare/2.23.0...2.24.0
Thanks! @tillkruss, @quick-order, @jobbsy-dev, and @DracoBlue for the sponsorship ❤️
Thanks! @Rotzbua for the contribution 🎉
PHP 8.3
.
Note: Specifying nightly as the php-version
now will set up PHP 8.3
.- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
setup-php
. #673
Notes:
latest
or 8.x
as the php-version
now will set up PHP 8.2
.ubuntu-22.04
, all GitHub runners now have PHP 8.2
as the default version.- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
env:
phpts: ts
Improved extension support on macOS for various extensions using the shivammathur/extensions
tap.
ds
https://github.com/shivammathur/homebrew-extensions/issues/2250
gearman
https://github.com/shivammathur/homebrew-extensions/issues/2161
lua
https://github.com/shivammathur/homebrew-extensions/issues/1898
sqlsrv
and pdo_sqlsrv
https://github.com/shivammathur/homebrew-extensions/issues/2032
v8js
https://github.com/shivammathur/homebrew-extensions/issues/1899
Dropped support for macos-10.15
GitHub runner. Please update your workflows to use macos-latest
or macos-12
runner.
Fixed support for composer-unused
. #668
Fixed support for ini-values
with the =
sign in the value. #676
Added fallbacks to various tools and extensions that use the GitHub API for setup to avoid rate limit errors on Windows.
Fixed a minor error on macOS while patching updated dependency formulae.
Updated Node.js dependencies.
Full Changelog: https://github.com/shivammathur/setup-php/compare/2.22.0...2.23.0
Merry Christmas and happy holidays! 🎄🎁
Thanks! @jrfnl and @flavioheleno for the contributions 🎉
- name: Setup PHP with debugging symbols
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
env:
debug: true
- name: Setup PHP with intl
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: intl-72.1
Existing PHP version on GitHub actions Ubuntu images is now updated if ppa:ondrej/php
is missing regardless of the update
environment variable. (actions/runner-images#6331).
Environment variable COMPOSER_NO_AUDIT
is now set by default. If you would like to run the composer audit in your workflows, please add a step with composer audit
command. (#635, #636)
- name: Composer audit
run: composer audit
Switched to GITHUB_OUTPUT
environment file for setting up outputs. If you are using setup-php
on self-hosted runners, please update it to 2.297.0
or greater. More Info (#654)
Updated sqlsrv
and pdo_sqlsrv
version to 5.10.1
for PHP 7.0 and above on Linux.
Improved support for phalcon5
extension to set up the latest stable version.
Improved symfony-cli
support to fetch the artifact URL from the brew tap on Linux. (#641, #652, #653)
Improved fetching brew
taps on Linux to avoid brew's overhead.
Fixed installing extension packages on self-hosted Linux runners. (#642)
Fixed support for couchbase
and firebird
extensions after GitHub release page changes.
Fixed support for older versions of laravel/pint
. (#647)
Updated Node.js dependencies.
Full Changelog: https://github.com/shivammathur/setup-php/compare/2.21.2...2.22.0
Thanks! @alcaeus and @jderusse for the contributions 🎉
rector
in tools input. #627- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
tools: rector
ast
extension on macOS
using shivammathur/extensions
tap.- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: ast
symfony-cli
on Linux #632- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
tools: symfony
PECL
. #625