GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: `8.1`
tools: pint
phalcon5
for all OS. https://github.com/shivammathur/homebrew-extensions/issues/1890
Also fixed phalcon3
and phalcon4
support on Ubuntu 22.04
.- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: `8.1`
extensions: phalcon5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
env:
PACKAGIST_TOKEN: ${{ secrets.PACKAGIST_TOKEN }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
env:
COMPOSER_AUTH_JSON: |
{
"http-basic": {
"example.org": {
"username": "${{ secrets.EXAMPLE_ORG_USERNAME }}",
"password": "${{ secrets.EXAMPLE_ORG_PASSWORD }}"
}
}
}
COMPOSER_TOKEN
in favor of GITHUB_TOKEN
. Docs
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Thanks! @phpstan for the sponsorship ❤️
Thanks! @d8vjork and @ChristophWurst for the contributions 🎉
Fixed support for prestissimo
with composer v1
. #612
Added support for Private Packagist and manual JSON based authentication for composer. ALPHA Docs - Private Packagist Authentication Docs - Manual Composer Authentication
Deprecated COMPOSER_TOKEN
in favor of GITHUB_TOKEN
. Docs
Updated Node.js dependencies.
Improved support for event
extension on Linux and macOS for PHP 5.4 and above. #604
Fixed support for composer plugins in tools
input. Since composer 2.2, the plugins are required to be marked as allowed in the composer config. This will now be done by default. #611
Added support to show code coverage driver's (Xdebug/PCOV) version in the logs when setup using the coverage
input. #610
Fixed a bug where PHP was not added to PATH
during the action run on self-hosted Windows environments. #609
Fixed a bug where the tool cache path was not set on self-hosted environments. #606
Updated Node.js dependencies.
Thanks! @jrfnl, @dino182 and @markseuffert for the contributions 🚀
Added support for ubuntu-22.04
runner. Docs
Added support for Couchbase extension 4.x
for PHP 7.4 and above. Also added support to specify the extension version you need. https://github.com/shivammathur/setup-php/issues/593
Note: Please use the extensions cache if using the latest Couchbase version on Linux as it can take 10+ minutes to build along with its library.
To install the latest version of couchbase extension
- name: Setup PHP
uses: shivammathur@setup-php@v2
with:
php-version: '8.1'
extensions: couchbase
To install a specific version - suffix couchbase with exact version you want in the extensions input.
- name: Setup PHP
uses: shivammathur@setup-php@v2
with:
php-version: '7.4'
extensions: couchbase-2.6.2
Improved fallback support upon cache failure in composer setup. This fixes an error when the latest composer version was installed on older PHP versions when fetching composer from shivammathur/composer-cache
failed.
Bumped Node.js version required to 16.x. Also bumped build target version to ES2021
.
If you use any of the following to run setup-php
, please upgrade to their latest versions.
Removed support for Debian 9 and Ubuntu 21.04 for self-hosted runners. Docs
Fixed tools setup with older composer versions which do not create composer.json
if missing in the directory.
Fixed support for extensions on macOS where the extension package name might conflict with package names in homebrew-core repo. This fixes support for redis
extension on macOS on PHP 7.0.
Fixed enabling cached extensions which depend on other extensions on PHP 7.1 and lower.
Fixed setting default INI values so that it is possible to override those using php -c
. https://github.com/shivammathur/setup-php/issues/595
Fixed PECL support for PHP 5.3, this was broken in previous release while adding support for specifying configure options, as that is only supported on PHP 5.4 and above.
Fixed identifying the latest protoc
release.
Removed unnecessary fs
dependency.
Added dependabot
config to update older actions in workflows. https://github.com/shivammathur/setup-php/pull/597
Added permissions for GITHUB_TOKEN
in workflows. https://github.com/shivammathur/setup-php/pull/596
Updated Node.js dependencies.
Thanks! @naveensrinivasan for the contributions 🚀
- name: Setup PHP with intl
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: intl-71.1
Added support for macOS Monterey (macos-12
) GitHub hosted environment.
Added support for mcrypt
extension using shivammathur/extensions
tap on macOS.
Fixed patching brew
for overwriting existing linked libraries.
Fixed identifying the latest protoc
release.
Updated Node.js dependencies.
Thanks! @jderusse for the contributions 🚀
mcrypt
extension using shivammathur/extensions
tap on macOS.Composer 2.3
.Added support for installing libraries and custom configure options for PECL
extensions. #575. Docs.
Added support for blackfire
extension on PHP 8.1 on Windows.
Improved support for http
extension on Windows and self-hosted environments.
Fixed installing php-dev
package on self-hosted environments when missing. #569
Fixed linking pecl ini file on self-hosted environments. #569
Fixed copying extensions when installed using brew from its Cellar to extension directory on macOS.
Fixed generating extension dependency map.
Fixed a bug in log functions on Linux and macOS by using local variables.
Improved switching versions on Linux. #572
Improved enabling default extensions by reducing PHP calls.
Bumped actions/checkout
, actions/upload-artifact
, actions/download-artifact
and actions/cache
version in examples and workflows to v3. #571, #577
Added PECL customization guide to README.
Updated Node.js dependencies.
Thanks! @jrfnl for the contributions 🚀
This release is possible because of our sponsors ❤️.
Help setup-php reach its sponsorship goals.
Added support for OpenSSL config on Windows. #564
Now setup-php
will set the environment variable OPENSSL_CONF
pointing to a valid openssl.cnf
file on Windows.
Added GitHub releases fallback URL for phing
.
Updated version of sqlsrv
and pdo_sqlsrv
extensions to 5.10.0
for PHP 7.4 and above.
Fixed logs for symfony-cli
on failure. #568
Fixed setting an environment variable on Windows in self-hosted environments.
Fixed a bug in adding a directory to PATH
. #562
Fixed a minor UUOC shellcheck warning in add_tools.sh
.
Updated Node.js dependencies.
Thanks! @mlocati for adding Set-OpenSSLConf
🚀