shivammathur/setup-php
### [`v2.16.0`](https://togithub.com/shivammathur/setup-php/releases/2.16.0)
[Compare Source](https://togithub.com/shivammathur/setup-php/compare/2.15.0...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.
[![Sponsor shivammathur](https://img.shields.io/badge/-Sponsor-fafbfc?logo=GitHub%20Sponsors)](https://togithub.com/sponsors/shivammathur)
***
- PHP 8.1 is now stable (`8.1.0`) and marked as the latest version. 🥳
```yml
- 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`, and `8.1.0` respectively. Set the update environment variable to true for always updating to the latest patch version.
```yml
- 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 from `PHP 7.3.33`.
- Add support for `ICU-70.1` based intl extension for `PHP 5.6` and above. [https://github.com/shivammathur/icu-intl/pull/2](https://togithub.com/shivammathur/icu-intl/pull/2)
```yml
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: intl-70.1
```
- Add support for `mailparse` and `xlswriter` extensions on macOS using shivammathur/extensions tap.
```yml
- 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. [https://github.com/shivammathur/setup-php/pull/528](https://togithub.com/shivammathur/setup-php/pull/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](https://togithub.com/shivammathur/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](https://togithub.com/shivammathur/setup-php/issues/511), [#517](https://togithub.com/shivammathur/setup-php/issues/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. [https://github.com/shivammathur/setup-php/issues/519](https://togithub.com/shivammathur/setup-php/issues/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. [https://github.com/shivammathur/setup-php/pull/518](https://togithub.com/shivammathur/setup-php/pull/518)
- Add workflow to publish to NPM and GitHub packages. [#513](https://togithub.com/shivammathur/setup-php/issues/513)
- Use `jest.each` for `extensions` and `install` modules' tests. [#514](https://togithub.com/shivammathur/setup-php/issues/514), [#516](https://togithub.com/shivammathur/setup-php/issues/516),
- Update Node.js dependencies.
***
Thanks! [@jrfnl](https://togithub.com/jrfnl), [@jderusse](https://togithub.com/jderusse), and [@aneeshrelan](https://togithub.com/aneeshrelan) for the contributions 🚀
Follow for updates
### [`v2.15.0`](https://togithub.com/shivammathur/setup-php/releases/2.15.0)
[Compare Source](https://togithub.com/shivammathur/setup-php/compare/2.14.0...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.
[![Sponsor shivammathur](https://img.shields.io/badge/-Sponsor-fafbfc?logo=GitHub%20Sponsors)](https://togithub.com/sponsors/shivammathur)
***
- PHP 5.6 to 7.2 have been rebuilt with patch for [`CVE-2021-21706`](https://bugs.php.net/bug.php?id=81420) backported from `7.3.31`.
- PHP 7.3 to PHP 8.0 packages have been updated to `7.3.31`, `7.4.24` and `8.0.11` respectively. Set the `update` environment variable to `true` for always updating to the latest patch version.
```yml
- name: Setup PHP
uses: shivammathur/setup-php@v2
env:
update: true
with:
php-version: '8.0'
```
- Add support for the following tools:
- `phpunit-polyfills` [#503](https://togithub.com/shivammathur/setup-php/issues/503)
- `phpDocumentor` or `phpdoc` [#498](https://togithub.com/shivammathur/setup-php/issues/498)
- `parallel-lint` [#500](https://togithub.com/shivammathur/setup-php/issues/500)
```yml
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
tools: phpDocumentor, parallel-lint, phpunit-polyfills
```
- Add support for `expect` and `ssh2` extensions on macOS. [https://github.com/shivammathur/homebrew-extensions/issues/1097](https://togithub.com/shivammathur/homebrew-extensions/issues/1097)
```yml
- 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` and `dev` 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](https://togithub.com/shivammathur/setup-php/issues/496)
- Fix logs for extensions with custom support when cached.
- Fix PPA setup to add/update list files in `/var/lib/apt/lists`. [#492](https://togithub.com/shivammathur/setup-php/issues/492)
- Fix typo to use correct key for `phpunit` in `tools.functionRecord`. [#501](https://togithub.com/shivammathur/setup-php/issues/501)
- Replace `husky` with `simple-git-hooks`.
- Cleanup trailing whitespace in README.
- Fix git command in `format` NPM script.
- Update Node.js dependencies.
***
Thanks [@jrfnl](https://togithub.com/jrfnl) for the contributions 🚀
Follow for updates
### [`v2.14.0`](https://togithub.com/shivammathur/setup-php/releases/2.14.0)
[Compare Source](https://togithub.com/shivammathur/setup-php/compare/2.13.0...2.14.0)
- Add support for `PHP 8.2`. [#490](https://togithub.com/shivammathur/setup-php/issues/490), [Docs](https://togithub.com/shivammathur/setup-php#tada-php-support)
- Specifying `8.2` in the `php-version` input will set up a nightly build of `PHP 8.2.0-dev` from the `master` branch of `php/php-src`.
```yml
- 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 the `master` branch. [#491](https://togithub.com/shivammathur/setup-php/issues/491), [Docs](https://togithub.com/shivammathur/setup-php#php-version-required)
- This will also set up `PHP 8.2.0-dev` from the `master` branch of `php/php-src`.
```yml
- name: Setup PHP 8.2
uses: shivammathur/setup-php@v2
with:
php-version: nightly
```
- Add support to disable all shared extensions. [#487](https://togithub.com/shivammathur/setup-php/issues/487) [Docs](https://togithub.com/shivammathur/setup-php#heavy_plus_sign-php-extension-support)
- 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](https://togithub.com/sebastianbergmann) and [@localheinz](https://togithub.com/localheinz) for sponsoring this feature.
```yml
- 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 disable `pdo_mysql`.
- Fix warnings in `Windows` when the required directory is already present.
- Fix to identify `opcache` if `Zend 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 to `config.test.ts` to avoid regression.
- Add `bugs`, `directories`, `files` and `types` properties in `package.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` and `coverage` test files to use `jest.each`.
- Update `tsconfig` to generate type declarations.
- Update documentation in the `README`.
- Update versions in `SECURITY.md`.
- Update Node.js dependencies.
### [`v2.13.0`](https://togithub.com/shivammathur/setup-php/releases/2.13.0)
[Compare Source](https://togithub.com/shivammathur/setup-php/compare/2.12.0...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.
```yml
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.
```yml
runs-on: windows-2022
steps:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
```
- Added support for `phpunit-bridge` and updated `symfony` examples to install it using `setup-php`.
```yml
- name: Setup PHP with Phive
with:
php-version: '8.0'
tools: phpunit-bridge
```
- Added documentation to run multi-line PHP code in workflows. [#482](https://togithub.com/shivammathur/setup-php/issues/482)
```yml
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
- name: Run PHP code
shell: php {0}
run: |
Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, click this checkbox.
This PR contains the following updates:
2.9.0
->2.16.0
Release Notes
shivammathur/setup-php
### [`v2.16.0`](https://togithub.com/shivammathur/setup-php/releases/2.16.0) [Compare Source](https://togithub.com/shivammathur/setup-php/compare/2.15.0...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. [![Sponsor shivammathur](https://img.shields.io/badge/-Sponsor-fafbfc?logo=GitHub%20Sponsors)](https://togithub.com/sponsors/shivammathur) *** - PHP 8.1 is now stable (`8.1.0`) and marked as the latest version. 🥳 ```yml - 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`, and `8.1.0` respectively. Set the update environment variable to true for always updating to the latest patch version. ```yml - 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 from `PHP 7.3.33`. - Add support for `ICU-70.1` based intl extension for `PHP 5.6` and above. [https://github.com/shivammathur/icu-intl/pull/2](https://togithub.com/shivammathur/icu-intl/pull/2) ```yml - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: 7.4 extensions: intl-70.1 ``` - Add support for `mailparse` and `xlswriter` extensions on macOS using shivammathur/extensions tap. ```yml - 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. [https://github.com/shivammathur/setup-php/pull/528](https://togithub.com/shivammathur/setup-php/pull/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](https://togithub.com/shivammathur/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](https://togithub.com/shivammathur/setup-php/issues/511), [#517](https://togithub.com/shivammathur/setup-php/issues/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. [https://github.com/shivammathur/setup-php/issues/519](https://togithub.com/shivammathur/setup-php/issues/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. [https://github.com/shivammathur/setup-php/pull/518](https://togithub.com/shivammathur/setup-php/pull/518) - Add workflow to publish to NPM and GitHub packages. [#513](https://togithub.com/shivammathur/setup-php/issues/513) - Use `jest.each` for `extensions` and `install` modules' tests. [#514](https://togithub.com/shivammathur/setup-php/issues/514), [#516](https://togithub.com/shivammathur/setup-php/issues/516), - Update Node.js dependencies. *** Thanks! [@jrfnl](https://togithub.com/jrfnl), [@jderusse](https://togithub.com/jderusse), and [@aneeshrelan](https://togithub.com/aneeshrelan) for the contributions 🚀Follow for updates
### [`v2.15.0`](https://togithub.com/shivammathur/setup-php/releases/2.15.0) [Compare Source](https://togithub.com/shivammathur/setup-php/compare/2.14.0...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. [![Sponsor shivammathur](https://img.shields.io/badge/-Sponsor-fafbfc?logo=GitHub%20Sponsors)](https://togithub.com/sponsors/shivammathur) *** - PHP 5.6 to 7.2 have been rebuilt with patch for [`CVE-2021-21706`](https://bugs.php.net/bug.php?id=81420) backported from `7.3.31`. - PHP 7.3 to PHP 8.0 packages have been updated to `7.3.31`, `7.4.24` and `8.0.11` respectively. Set the `update` environment variable to `true` for always updating to the latest patch version. ```yml - name: Setup PHP uses: shivammathur/setup-php@v2 env: update: true with: php-version: '8.0' ``` - Add support for the following tools: - `phpunit-polyfills` [#503](https://togithub.com/shivammathur/setup-php/issues/503) - `phpDocumentor` or `phpdoc` [#498](https://togithub.com/shivammathur/setup-php/issues/498) - `parallel-lint` [#500](https://togithub.com/shivammathur/setup-php/issues/500) ```yml - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: '8.0' tools: phpDocumentor, parallel-lint, phpunit-polyfills ``` - Add support for `expect` and `ssh2` extensions on macOS. [https://github.com/shivammathur/homebrew-extensions/issues/1097](https://togithub.com/shivammathur/homebrew-extensions/issues/1097) ```yml - 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` and `dev` 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](https://togithub.com/shivammathur/setup-php/issues/496) - Fix logs for extensions with custom support when cached. - Fix PPA setup to add/update list files in `/var/lib/apt/lists`. [#492](https://togithub.com/shivammathur/setup-php/issues/492) - Fix typo to use correct key for `phpunit` in `tools.functionRecord`. [#501](https://togithub.com/shivammathur/setup-php/issues/501) - Replace `husky` with `simple-git-hooks`. - Cleanup trailing whitespace in README. - Fix git command in `format` NPM script. - Update Node.js dependencies. *** Thanks [@jrfnl](https://togithub.com/jrfnl) for the contributions 🚀Follow for updates
### [`v2.14.0`](https://togithub.com/shivammathur/setup-php/releases/2.14.0) [Compare Source](https://togithub.com/shivammathur/setup-php/compare/2.13.0...2.14.0) - Add support for `PHP 8.2`. [#490](https://togithub.com/shivammathur/setup-php/issues/490), [Docs](https://togithub.com/shivammathur/setup-php#tada-php-support) - Specifying `8.2` in the `php-version` input will set up a nightly build of `PHP 8.2.0-dev` from the `master` branch of `php/php-src`. ```yml - 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 the `master` branch. [#491](https://togithub.com/shivammathur/setup-php/issues/491), [Docs](https://togithub.com/shivammathur/setup-php#php-version-required) - This will also set up `PHP 8.2.0-dev` from the `master` branch of `php/php-src`. ```yml - name: Setup PHP 8.2 uses: shivammathur/setup-php@v2 with: php-version: nightly ``` - Add support to disable all shared extensions. [#487](https://togithub.com/shivammathur/setup-php/issues/487) [Docs](https://togithub.com/shivammathur/setup-php#heavy_plus_sign-php-extension-support) - 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](https://togithub.com/sebastianbergmann) and [@localheinz](https://togithub.com/localheinz) for sponsoring this feature. ```yml - 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 disable `pdo_mysql`. - Fix warnings in `Windows` when the required directory is already present. - Fix to identify `opcache` if `Zend 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 to `config.test.ts` to avoid regression. - Add `bugs`, `directories`, `files` and `types` properties in `package.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` and `coverage` test files to use `jest.each`. - Update `tsconfig` to generate type declarations. - Update documentation in the `README`. - Update versions in `SECURITY.md`. - Update Node.js dependencies. ### [`v2.13.0`](https://togithub.com/shivammathur/setup-php/releases/2.13.0) [Compare Source](https://togithub.com/shivammathur/setup-php/compare/2.12.0...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. ```yml 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. ```yml runs-on: windows-2022 steps: - name: Install PHP uses: shivammathur/setup-php@v2 with: php-version: '8.0' ``` - Added support for `phpunit-bridge` and updated `symfony` examples to install it using `setup-php`. ```yml - name: Setup PHP with Phive with: php-version: '8.0' tools: phpunit-bridge ``` - Added documentation to run multi-line PHP code in workflows. [#482](https://togithub.com/shivammathur/setup-php/issues/482) ```yml - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: '8.0' - name: Run PHP code shell: php {0} run: |Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.