Releases: shivammathur/setup-php
2.17.0
This release is possible because of our sponsors ❤️.
Help setup-php reach its sponsorship goals.
- Added
ini-file
input to specify the basephp.ini
file. Acceptsproduction
,development
ornone
. Docs (#450, #469)
By default the production php.ini
is used, you can change it to the development
one, or remove it using none
.
- name: Setup PHP
with:
php-version: '8.1'
ini-file: development
- Updated support for
symfony-cli
to use the new version fromsymfony-cli/symfony-cli
.
- name: Setup PHP
with:
php-version: '8.1'
tools: symfony-cli
- name: Setup PHP
with:
php-version: '8.1'
tools: churn
- Added support for
blackfire
extension on PHP 8.1.
- name: Setup PHP
with:
php-version: '8.1'
extensions: blackfire
-
Tools
pecl
,phpize
andphp-config
are now installed by default on Linux. Specifying these intools
input is no longer required. -
The environment variable
COMPOSER_NO_INTERACTION
is now set to1
by default, so using--no-interaction
in composer commands is not required. (#547) -
The environment is now considered self-hosted unless the GitHub hosted environment is detected. This should prevent broken PHP installs in self-hosted environments when the
runner
environment variable is not specified. (#554) -
Added support to enable disabled extensions when required by tools. For this extensions are now processed before tools.
-
Added support to enable
xml
extension before installing other extensions usingpecl
. (#553) -
Speed improvements
- Reduced the initial I/O in script creation.
- Reduced the number of PHP calls and it now uses
php-config
instead. - Reduced number of
brew
calls on macOS setup. - Windows builds for all PHP versions are now fetched from
shivammathur/php-builder-windows
releases as a faster cache withwindows.php.net
as a fallback. - SSL libraries for PHP 5.3 to 5.5 on Windows are now fetched in parallel.
- PHP builds for PHP 5.3 to 5.5 should now use cached
macports
builds fromshivammathur/php5-darwin
.
-
Added support for installing tools using composer in different scopes. This allows installing two tools with different versions of a common dependency. (#549)
-
Added support to fail immediately when composer setup fails. (#548)
-
Added support to parse PECL extension versions when wrongly hyphenated. (#536)
-
Added support for composer phars from shivammathur/composer-cache with PHP version as now different PHP versions can have different composer versions for a release type.
-
Added
setup-php.com
as a fallback in addition tojsdeliver.com
for script sources. -
Fixed support for fallback sources for tools in Windows.
-
Fixed potential exponential backtracking in regex to parse extension input when installing extensions from a git repository.
-
Fixed adding
sudo
to self-hosted Linux environments. (#555) -
Fixed enabling disabled extensions with other extensions as dependencies. For example
pecl_http
,redis
, etc. -
Fixed a bug where the ini file used for enabling extensions by
pecl
in the scan directory was deleted when disabling extensions. -
Fixed misconfiguration which prevented package lists from updating on Linux.
-
Fixed the fallback to install PowerShell packages using
Install-Module
on Windows when GitHub Releases is down. Also fixed not adding the Import-Module command to the profile when it fallbacks. -
Fixed tools setup to not overwrite an existing tool with a broken one if it fails to set up.
-
Fixed an error when copying tools to a directory in PATH in tools setup.
-
Fixed parsing composer phars from snapshot channel for its version when is a stable version.
-
Fixed support for
oci8
andpdo_oci
extensions on Windows. -
Fixed
pecl_http
setup. -
Fixed
restore-keys
input in composer cache example inREADME
with dependency range. -
Fixed error in tools setup on self-hosted environments when composer's bin directory is not present.
-
Fixed
tools.getLatestVersion
to handle failing GitHub API call. -
Fixed output on non-GitHub Action environments where GitHub Action specific command syntax was printed.
-
Fixed a bug where the status variable was overwritten in
ppa.sh
and was breaking the status output. -
Fixed scope of variables to local in bash scripts.
-
Fixed setting extension stability in
Add-Extension
Function on Windows. -
Fixed
node-release
workflow to add lib directory to the packages. -
Fixed sending coverage data to
codecov
on pull requests. -
Refactored
utils.fetch
to its own module and mocked thehttp
module usingnock
for fetch tests. Now the Node.js test suite does not make any external requests. -
Refactored setting environment variables and adding to PATH.
-
Refactored setting outputs to functions with a check to only run on GitHub Actions.
-
Refactored extension functions to
add_extension.sh
andadd_extension.ps1
. -
Refactored the default PHP packages for self-hosted Linux environments to a config file. Also added
cgi
,fpm
,mysql
,opcache
,pgsql
andzip
to the list. -
Refactored Nightly PHP setup to
Install-PhpNightly
Function on Windows. -
Refactored CI workflows and templates.
-
Rename
common.sh
tounix.sh
. -
Update security policy to specify clearly that the latest patch versions of both
v1
andv2
are supported for security updates. -
Updated Node workflows to use
16.x
. -
Updated README for the release.
-
Updated Node.js dependencies.
Thanks! @jrfnl and @villfa for the contributions 🚀
Follow for updates
1.11.6
v1 maintenance release
- Fix Node.js tests.
- Fix manifest URL for
v1
. - Add CodeQL workflow.
- Update Node workflow to use
Node 16
. - Update Node.js dependencies.
- Fix sending coverage data to
codecov
. - Update docs.
2.16.0
This release is possible because of our sponsors. So, if your company uses setup-php, please ask them to sponsor my work.
- PHP 8.1 is now stable (
8.1.0
) and marked as the latest version. 🥳
- name: Setup PHP 8.1
uses: shivammathur/setup-php@v2
with:
php-version: latest
- PHP 7.3 to PHP 8.1 packages have been updated to
7.3.33
,7.4.26
,8.0.13
, and8.1.0
respectively. Set the update environment variable to true for always updating to the latest patch version.
- name: Setup PHP
uses: shivammathur/setup-php@v2
env:
update: true
with:
php-version: '8.0'
-
PHP 5.6 to 7.2 have been rebuilt with patch for
CVE-2021-21707
backported fromPHP 7.3.33
. -
Add support for
ICU-70.1
based intl extension forPHP 5.6
and above. shivammathur/icu-intl#2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: intl-70.1
- Add support for
mailparse
andxlswriter
extensions on macOS using shivammathur/extensions tap.
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: mailparse, xlswriter
- Fix upgrading nightly versions on self-hosted runners. Now PHP 8.2 will update to the latest build when the update environment variable is set to true.
- Fix support for brew extensions with different package and extension name.
- Fix support for Imagick extension on Windows. #528
- Fix error while Blackfire configuration file is opened in tool's set up on Linux.
- Fix extension support to install extension packages from
ppa:ondrej/php
in php-builder builds. - Fix dependency support in self-hosted macOS.
- Fix to only copy problem-matchers configs to
RUNNER_TOOL_CACHE
. - Fix support for Phalcon extension.
- Fix CA certificate issues on windows. #511, #517
- Fix to suppress error when extensions are cached on Windows.
- Log error when wrong Xdebug version is requested as coverage driver for a PHP version. #519
- Add patch to support self-hosted environments on Debian 12 or distributions based on it.
- Add action to limit outbound requests to known endpoints in node workflow.
- Add links for all tools in the README. #518
- Add workflow to publish to NPM and GitHub packages. #513
- Use
jest.each
forextensions
andinstall
modules' tests. #514, #516, - Update Node.js dependencies.
Thanks! @jrfnl, @jderusse, and @aneeshrelan for the contributions 🚀
Follow for updates
2.15.0
Setup PHP depends on sponsorships. Maintaining it takes time and money especially with daily builds for upcoming PHP versions. So, if you found it helpful, please support the project.
-
PHP 5.6 to 7.2 have been rebuilt with patch for
CVE-2021-21706
backported from7.3.31
. -
PHP 7.3 to PHP 8.0 packages have been updated to
7.3.31
,7.4.24
and8.0.11
respectively. Set theupdate
environment variable totrue
for always updating to the latest patch version.
- name: Setup PHP
uses: shivammathur/setup-php@v2
env:
update: true
with:
php-version: '8.0'
-
Add support for the following tools:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
tools: phpDocumentor, parallel-lint, phpunit-polyfills
- Add support for
expect
andssh2
extensions on macOS. shivammathur/homebrew-extensions#1097
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
extensions: expect, ssh2
-
Fix parsing PHP 8.1 version with both
RC
anddev
suffixes in the semver notation. -
Fix to get correct
php-src
git ref for nightly builds. -
Fix version for extensions in logs when installed using
PECL
. -
Fix cache support for extensions with custom support. #496
-
Fix logs for extensions with custom support when cached.
-
Fix PPA setup to add/update list files in
/var/lib/apt/lists
. #492 -
Fix typo to use correct key for
phpunit
intools.functionRecord
. #501 -
Replace
husky
withsimple-git-hooks
. -
Cleanup trailing whitespace in README.
-
Fix git command in
format
NPM script. -
Update Node.js dependencies.
Thanks @jrfnl for the contributions 🚀
Follow for updates
1.11.5
- Add support for
expect
andssh2
extensions using shivammathur/extensions on macOS. - Fix version for extensions in logs when installed using
PECL
. - Replace
husky
withsimple-git-hooks
. - Update Node.js dependencies.
2.14.0
- Add support for
PHP 8.2
. #490, Docs - Specifying
8.2
in thephp-version
input will set up a nightly build ofPHP 8.2.0-dev
from themaster
branch ofphp/php-src
.
- name: Setup PHP 8.2
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- Add support for the
nightly
alias for setting up a build from themaster
branch. #491, Docs - This will also set up
PHP 8.2.0-dev
from themaster
branch ofphp/php-src
.
- name: Setup PHP 8.2
uses: shivammathur/setup-php@v2
with:
php-version: nightly
- Add support to disable all shared extensions. #487 Docs
- Specifying
none
in extensions input will now disable all shared extensions. - If none is specified along with other extensions then setup-php will first remove all shared extensions, and then process the other extensions in the input.
- As part of this feature from now on, shared extensions will just be disabled, and not removed completely.
❤️ Thanks! @sebastianbergmann and @localheinz for sponsoring this feature.
- name: Setup PHP without any shared extensions except mbstring
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
extensions: none, mbstring
-
Fix disabling extensions to identify dependent extensions using the Reflection data and disable them as well. For example, disabling
PDO
will also disablepdo_mysql
. -
Fix warnings in
Windows
when the required directory is already present. -
Fix to identify
opcache
ifZend OPcache
is specified in extensions input. -
Fix Windows script to install PHP 8.2 and future nightly builds correctly.
-
Fix to parse PHP 8.1 semver version.
-
Use
shivammathur/extensions
tap to install vips extension on macOS.
Internal
-
Add test cases for
ini-values
containing special characters toconfig.test.ts
to avoid regression. -
Add
bugs
,directories
,files
andtypes
properties inpackage.json
. -
Add an SVG with past and present individual sponsors to the
README
. -
Use commit hash from the path in URL instead of the query string for nightly builds on macOS.
-
Fix build error in
install.ts
after TypeScript upgrade. -
Minor refactor in
install.test.ts
. -
Refactor
config
andcoverage
test files to usejest.each
. -
Update
tsconfig
to generate type declarations. -
Update documentation in the
README
. -
Update versions in
SECURITY.md
. -
Update Node.js dependencies.
1.11.4
v1 maintenance release
- Add
Windows-2022
to theREADME
. - Use
PhpManager
on Windows for all PHP versions supported onv1
. - Fix unsupported PHP versions warning on
v1
. - Fix warnings in
Windows
when the required directory is already present. - Use
shivammathur/extensions
tap to installvips
extension on macOS. - Add an SVG with past and present individual sponsors to the
README
. - Update
tsconfig
to generate type declarations. - Add
bugs
,directories
,files
andtypes
properties in package.json. - Update
SECURITY.md
. - Update Node.js dependencies.
2.13.0
- Added support for Debian on self-hosted environments and containers.
- Debian 9 and above are supported in addition to existing Ubuntu support.
- Operating systems based on these versions of Debian are also supported on a best-effort basis.
container: debian:bullseye
steps:
- name: Install PHP on Debian
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
env:
runner: self-hosted
- Added
windows-2022
to the supported OS environments.
runs-on: windows-2022
steps:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
- Added support for
phpunit-bridge
and updatedsymfony
examples to install it usingsetup-php
.
- name: Setup PHP with Phive
with:
php-version: '8.0'
tools: phpunit-bridge
- Added documentation to run multi-line PHP code in workflows. #482
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
- name: Run PHP code
shell: php {0}
run: |
<?php
$welcome = "Hello, world";
echo $welcome;
- Added support for extensions
mongodb
andyaml
on macOS usingshivammathur/extensions
tap. - Added a specific
phive
version compatible with PHP 7.2. #481
- name: Setup PHP with Phive
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
tools: phive
- Added
--no-install-recommends
to apt install commands on Linux. - Added support for JavaScript actions on
shivammathur/node
images.spc
is no longer required for multi-arch workflows and normal GitHub Action syntax should work.
container: shivammathur/node:latest-${{ matrix.arch }}
strategy:
matrix:
arch: ["amd64", "i386"]
steps:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
- PHP 8.1 on Linux in
shivammathur/php-builder
is now built nightly with the same configuration and patches as official Debian builds of PHP.
- name: Setup PHP 8.1
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- Added a new flag
NO_TOOLS_CACHE
. The tool will be fetched from the source instead of any cache that setup-php implements when this is set to true. - This can be useful for maintainers to make sure a new version of their tool is used instead of the old cached version.
- As of this release, only
composer
phars are cached.
- name: Setup PHP
uses: shivammathur/setup-php@v2
env:
NO_TOOLS_CACHE: true
with:
php-version: '8.0'
- Removed support for Ubuntu 16.04. Please upgrade to Ubuntu 20.04 or Ubuntu 18.04 environments. #452
- Removed support for Blackfire v1. Specifying
blackfire
in tools will now install the latest version of Blackfire CLI v2. #478
- name: Setup PHP with Blackfire
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
tools: blackfire
-
Removed
software-properties-common
package from dependencies on self-hosted Linux. This package was used for adding third-party repositories(PPA). Removing this reduces self-hosted first run time from 2-3 minutes to 1-2 minutes. -
PPAs can now be added by
setup-php
without any dependencies and the deprecatedapt-key
. It follows the Debian specification for third-party repositories. -
Remove use of
/etc/lsb-release
file,/etc/os-release
is used now as it has better support. -
Fixed a bug where the status file was overwritten after PHP was set up on GitHub runners.
-
Fixed support for
php-cs-fixer
to parsereleases.atom
file and install correct latest version. #485
- name: Setup PHP with php-cs-fixer
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
tools: php-cs-fixer
- Fixed cache support for extensions on Windows which need additional libraries.
- Fixed permissions in composer set up on self-hosted environments. #477
- Fixed starting Blackfire service on Linux. #483
- Fixed a warning about shallow clones for Homebrew taps on macOS.
- Fixed a warning about macOS developer mode while using
brew cat
. - In
tsconfig.json
setlib
toES2020
andtarget
toES2019
for supporting Node 12 in self-hosted runners. - Update Node.js dependencies.
Thanks! @jrfnl and @lolautruche for the contributions 🎉
1.11.3
v1
maintenance release
- Added support for extensions
mongodb
andyaml
on macOS usingshivammathur/extensions
tap. - Added
--no-install-recommends
toapt-get install
commands on Linux. - Added a specific
phive
version compatible with PHP 7.2. #481 - Removed support for Ubuntu 16.04 on setup-php. #452
- Fixed permissions in composer set up on self-hosted environments. #477
- Fixed a warning about shallow clones for Homebrew taps on macOS.
- Fixed a warning about macOS developer mode while using
brew cat
. - Sync
tsconfig.json
withv2
. - Update Node.js dependencies.
2.12.0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: php-cs-fixer:3, phpunit:8.5
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup PHP
id: setup-php
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Print PHP version
run: echo ${{ steps.setup-php.outputs.php-version }}
- Like Ubuntu, add PHP commit hash in PHP 8.1 (nightly) logs on Windows and macOS.
- Use
composer
to installcomposer-require-checker
. #473 - Use
shivammathur/extensions
tap forrdkafka
extension on macOS. shivammathur/homebrew-php#365 - Support for Ubuntu 16.04 was dropped on August 1, 2021. 📢Announcement: #452
- Set the
Firebird
client version to3.0.7
on macOS. - Improve
grpc_php_plugin
support on Ubuntu and macOS. - Minor fixes for self-hosted setup on Ubuntu.
- Improve PHP setup on macOS to be more resilient to dependency version inconsistencies.
- Fix to enable extensions disabled with
phpdismod
on Ubuntu. actions/runner-images#3472 - Fix
Imagick
setup withshivammathur/cache-extensions
action on Windows. #455 - Fix support for OCI extensions
oci8
andpdo_oci
. #449 - Fix to not use system PHP on macOS.
- Fix support for
Imagick
for PHP 5.3 to 5.5 on macOS. - Fix installing
protoc
on macOS. - Hotfix: Fix permissions of
COMPOSER_HOME
directory. #477 - Hotfix: Fix support for phive on PHP 7.2. #481
Internal
- Update contributors SVG in
README.md
to include contributors fromsetup-php
and all related projects. - Move tools set up details from
tools.ts
totools.json
config. - Improve error handling in
utils.fetch
and its uses. - Refactor tests for tools using
jest.Each
. - Update Ubuntu 16.04 warning in
install.ts
. - Set
sourceMap
to true intsconfig.json
. - Update
Node.js
dependencies.