Compare commits

..

38 Commits

Author SHA1 Message Date
e6f75134d3 Update phpts section in README 2023-11-27 18:07:02 +05:30
1874353919 Fix linking grpc on macos but installed along protoc 2023-11-27 17:08:32 +05:30
eea39ea741 Disable xdebug and pcov when blackfire extension is installed 2023-11-27 16:39:18 +05:30
bac56c8d91 Add patch for geos 2023-11-27 15:47:27 +05:30
124d256c78 Add back support for nightly builds on self-hosted 2023-11-27 14:52:14 +05:30
eeddcfe955 Bump version to 2.28.0
Update Node.js dependencies
2023-11-27 13:57:32 +05:30
de2903ad82 Fix installing zts builds 2023-11-26 03:55:45 +05:30
bbe1204148 Use cached builds for zts 2023-11-26 03:34:57 +05:30
99a92d54d5 Test cache for PHP 8.3 and PHP 8.4 2023-11-24 01:06:24 +05:30
7c6c249257 Mark PHP 8.3 as stable 2023-11-23 17:12:56 +05:30
e6d44f159a Add PHP 8.4 to wiki extension pages 2023-11-23 12:12:26 +05:30
dc513528da Update os in docs workflow 2023-11-23 11:57:50 +05:30
bfbd3882c0 Merge pull request #787 from jrfnl/feature/ghactions-update-for-php-8.3
GH Actions/docs workflow: generate extensions page for PHP 8.3
2023-11-22 20:37:08 -08:00
3c525df325 GH Actions/docs workflow: generate extensions page for PHP 8.3 2023-11-23 03:19:38 +01:00
a36e1e52ff Bump version to 2.27.1
Bump Node.js dependencies
2023-11-07 13:55:37 +05:30
04ff9b08a2 Add HOMEBREW_NO_INSTALL_FROM_API=1 to darwin.sh 2023-11-07 13:43:28 +05:30
65fad67e88 Fix updating homebrew dependencies after sharding in core tap 2023-11-07 13:11:56 +05:30
6668249e24 Merge pull request #778 from shivammathur/dependabot/github_actions/develop/actions/setup-node-4
Bump actions/setup-node from 3 to 4
2023-11-06 04:04:01 -08:00
81c255f988 Bump actions/setup-node from 3 to 4
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 11:00:34 +00:00
81cd5ae092 Bump version to 2.27.0 2023-11-01 19:56:15 +05:30
29a9813921 Add required extensions for box 2023-11-01 10:23:55 +05:30
f60e7de98e Add PHP 8.4 to the php workflow
Enable PHP 8.3 for macOS in the php workflow
2023-11-01 09:35:10 +05:30
b5efb21934 Add tests for box and php-scoper 2023-11-01 09:29:02 +05:30
26e6a92f3b Merge pull request #776 from theofidry/patch-1
feat: Add Box and PHP-Scoper as tools
2023-11-01 08:53:26 +05:30
28b68529b5 feat: Add Box and PHP-Scoper as tools 2023-11-01 08:53:26 +05:30
4e4861ec30 Fix support for couchbase on PHP 7.4 2023-10-30 08:11:09 +05:30
70169700c3 Try to improve couchbase compilation 2023-10-30 06:58:16 +05:30
f4e27c9ead Bump Node.js dependencies
Bump version to 2.26.1
2023-10-30 01:47:34 +05:30
9855c76987 Set keepAlive to false. After Node 19 it is true by default. 2023-10-30 01:38:35 +05:30
546935924a Merge pull request #771 from shivammathur/dependabot/npm_and_yarn/babel/traverse-7.23.2
Bump @babel/traverse from 7.22.5 to 7.23.2
2023-10-19 16:04:25 +05:30
491e9de600 Bump @babel/traverse from 7.22.5 to 7.23.2
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.5 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-19 09:40:39 +00:00
e3bda5bed8 Add support for macOS Sonoma (14) and drop support for Big Sur (11) 2023-10-01 19:03:17 +05:30
e70f6d9e7c Fallback to pecl in add_brew_extension on macOS 2023-10-01 18:49:44 +05:30
92e992b198 Update versioning section in the README 2023-09-23 04:32:24 +05:30
99680be1df Rename branch in README 2023-09-23 03:29:31 +05:30
e83e329355 Fix find call in darwin.sh in copy_brew_extensions on failure 2023-09-22 14:07:12 +05:30
10c12b9377 Fix checking for existing php formula on macOS 2023-09-22 14:00:55 +05:30
91026460e4 Create tool_path_dir if it does not exist 2023-09-22 08:15:57 +05:30
29 changed files with 1706 additions and 1409 deletions

3
.github/SECURITY.md vendored
View File

@ -10,10 +10,9 @@ This security policy only applies to the latest patches of the following PHP ver
| Version | Supported | | Version | Supported |
|---------|--------------------| |---------|--------------------|
| 7.4 | :white_check_mark: |
| 8.0 | :white_check_mark: |
| 8.1 | :white_check_mark: | | 8.1 | :white_check_mark: |
| 8.2 | :white_check_mark: | | 8.2 | :white_check_mark: |
| 8.3 | :white_check_mark: |
## Reporting a Vulnerability ## Reporting a Vulnerability

View File

@ -15,8 +15,8 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-22.04, ubuntu-20.04, windows-2022, macos-11] operating-system: [ubuntu-22.04, ubuntu-20.04, windows-2022, macos-12]
php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
steps: steps:
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
@ -70,11 +70,11 @@ jobs:
git config --local user.name "${{ github.repository_owner }}" git config --local user.name "${{ github.repository_owner }}"
- name: Combine - name: Combine
run: | run: |
for os in ubuntu-22.04 ubuntu-20.04 windows-2022 windows-2019 macos-11 macos-10.15; do for os in ubuntu-22.04 ubuntu-20.04 windows-2022 windows-2019 macos-11 macos-12 macos-13; do
echo "These are extensions which are loaded by default on the following PHP versions. More extensions which are available as packages and available on pecl are supported by setup-php. Refer to [php extension support](https://github.com/shivammathur/setup-php#heavy_plus_sign-php-extension-support) for more details." > Php-extensions-loaded-on-"$os".md echo "These are extensions which are loaded by default on the following PHP versions. More extensions which are available as packages and available on pecl are supported by setup-php. Refer to [php extension support](https://github.com/shivammathur/setup-php#heavy_plus_sign-php-extension-support) for more details." > Php-extensions-loaded-on-"$os".md
for version in 5.3 5.4 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2; do for version in 5.3 5.4 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4; do
if [ "$os" = "macos-10.15" ]; then if [[ "$os" = "macos-11" || "$os" = "macos-13" ]]; then
cat lists/php"$version"-macos-11.md >> Php-extensions-loaded-on-"$os".md cat lists/php"$version"-macos-12.md >> Php-extensions-loaded-on-"$os".md
elif [ "$os" = "windows-2019" ]; then elif [ "$os" = "windows-2019" ]; then
cat lists/php"$version"-windows-2022.md >> Php-extensions-loaded-on-"$os".md cat lists/php"$version"-windows-2022.md >> Php-extensions-loaded-on-"$os".md
else else

View File

@ -34,7 +34,7 @@ jobs:
fetch-depth: 2 fetch-depth: 2
- name: Setup Node.js 16.x - name: Setup Node.js 16.x
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 16.x node-version: 16.x

View File

@ -29,14 +29,11 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-22.04, ubuntu-20.04, windows-2019, macos-latest] operating-system: [ubuntu-22.04, ubuntu-20.04, windows-2019, macos-latest]
php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
include: include:
- operating-system: ubuntu-22.04 - operating-system: ubuntu-22.04
php-versions: '' php-versions: ''
php-version-file: 'php-version-file' php-version-file: 'php-version-file'
exclude:
- operating-system: macos-latest
php-versions: '8.3'
env: env:
extensions: xml, opcache, xdebug, pcov, gd extensions: xml, opcache, xdebug, pcov, gd
key: cache-v5 key: cache-v5

View File

@ -28,7 +28,7 @@ jobs:
ref: ${{ github.event.inputs.tag }} ref: ${{ github.event.inputs.tag }}
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: '16.x' node-version: '16.x'
registry-url: https://registry.npmjs.org registry-url: https://registry.npmjs.org
@ -46,7 +46,7 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Change to GitHub Packages registry - name: Change to GitHub Packages registry
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
registry-url: https://npm.pkg.github.com registry-url: https://npm.pkg.github.com
scope: '@shivammathur' scope: '@shivammathur'

View File

@ -9,7 +9,7 @@
<p align="center"> <p align="center">
<a href="https://github.com/shivammathur/setup-php" title="GitHub action to setup PHP"><img alt="GitHub Actions status" src="https://github.com/shivammathur/setup-php/workflows/Main%20workflow/badge.svg"></a> <a href="https://github.com/shivammathur/setup-php" title="GitHub action to setup PHP"><img alt="GitHub Actions status" src="https://github.com/shivammathur/setup-php/workflows/Main%20workflow/badge.svg"></a>
<a href="https://codecov.io/gh/shivammathur/setup-php" title="Code coverage"><img alt="Codecov Code Coverage" src="https://img.shields.io/codecov/c/github/shivammathur/setup-php?logo=codecov"></a> <a href="https://codecov.io/gh/shivammathur/setup-php" title="Code coverage"><img alt="Codecov Code Coverage" src="https://img.shields.io/codecov/c/github/shivammathur/setup-php?logo=codecov"></a>
<a href="https://github.com/shivammathur/setup-php/blob/master/LICENSE" title="license"><img alt="LICENSE" src="https://img.shields.io/badge/license-MIT-428f7e.svg?logo=open%20source%20initiative&logoColor=white&labelColor=555555"></a> <a href="https://github.com/shivammathur/setup-php/blob/main/LICENSE" title="license"><img alt="LICENSE" src="https://img.shields.io/badge/license-MIT-428f7e.svg?logo=open%20source%20initiative&logoColor=white&labelColor=555555"></a>
<a href="#tada-php-support" title="PHP Versions Supported"><img alt="PHP Versions Supported" src="https://img.shields.io/badge/php-5.3%20to%208.4-777bb3.svg?logo=php&logoColor=white&labelColor=555555"></a> <a href="#tada-php-support" title="PHP Versions Supported"><img alt="PHP Versions Supported" src="https://img.shields.io/badge/php-5.3%20to%208.4-777bb3.svg?logo=php&logoColor=white&labelColor=555555"></a>
</p> </p>
<p align="center"> <p align="center">
@ -17,9 +17,6 @@
<a href="https://twitter.com/setup_php" title="setup-php twitter"><img alt="setup-php twitter" src="https://img.shields.io/badge/twitter-follow-1DA1F2?logo=twitter&logoColor=1DA1F2&labelColor=555555"></a> <a href="https://twitter.com/setup_php" title="setup-php twitter"><img alt="setup-php twitter" src="https://img.shields.io/badge/twitter-follow-1DA1F2?logo=twitter&logoColor=1DA1F2&labelColor=555555"></a>
<a href="https://status.setup-php.com" title="setup-php status"><img alt="setup-php status" src="https://img.shields.io/badge/status-subscribe-28A745?logo=statuspage&logoColor=28A745&labelColor=555555"></a> <a href="https://status.setup-php.com" title="setup-php status"><img alt="setup-php status" src="https://img.shields.io/badge/status-subscribe-28A745?logo=statuspage&logoColor=28A745&labelColor=555555"></a>
</p> </p>
<p align="center">
<a href="https://setup-php.com/support-ukraine" title="#StandWithUkraine"><img alt="#StandWithUkraine" src="https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg"></a>
</p>
Setup PHP with required extensions, php.ini configuration, code-coverage support and various tools like composer in [GitHub Actions](https://github.com/features/actions "GitHub Actions"). This action gives you a cross-platform interface to set up the PHP environment you need to test your application. Refer to [Usage](#memo-usage "How to use this") section and [examples](#examples "Examples of use") to see how to use this. Setup PHP with required extensions, php.ini configuration, code-coverage support and various tools like composer in [GitHub Actions](https://github.com/features/actions "GitHub Actions"). This action gives you a cross-platform interface to set up the PHP environment you need to test your application. Refer to [Usage](#memo-usage "How to use this") section and [examples](#examples "Examples of use") to see how to use this.
@ -77,8 +74,8 @@ Both `GitHub-hosted` and `self-hosted` runners are supported by `setup-php` on t
| Ubuntu 20.04 | `ubuntu-20.04` | `PHP 7.4` to `PHP 8.2` | | Ubuntu 20.04 | `ubuntu-20.04` | `PHP 7.4` to `PHP 8.2` |
| Windows Server 2022 | `windows-latest` or `windows-2022` | `PHP 8.2` | | Windows Server 2022 | `windows-latest` or `windows-2022` | `PHP 8.2` |
| Windows Server 2019 | `windows-2019` | `PHP 8.2` | | Windows Server 2019 | `windows-2019` | `PHP 8.2` |
| macOS Monterey 12.x | `macos-12` | `PHP 8.2` | | macOS Ventura 13.x | `macos-13` | `PHP 8.2` |
| macOS Big Sur 11.x | `macos-latest` or `macos-11` | `PHP 8.2` | | macOS Monterey 12.x | `macos-latest` or `macos-12` | `PHP 8.2` |
### Self-Hosted Runners ### Self-Hosted Runners
@ -90,9 +87,9 @@ Both `GitHub-hosted` and `self-hosted` runners are supported by `setup-php` on t
| Debian 10 | `self-hosted` or `Linux` | | Debian 10 | `self-hosted` or `Linux` |
| Windows 7 and newer | `self-hosted` or `Windows` | | Windows 7 and newer | `self-hosted` or `Windows` |
| Windows Server 2012 R2 and newer | `self-hosted` or `Windows` | | Windows Server 2012 R2 and newer | `self-hosted` or `Windows` |
| macOS Sonoma 14.x x86_64/arm64 | `self-hosted` or `macOS` |
| macOS Ventura 13.x x86_64/arm64 | `self-hosted` or `macOS` | | macOS Ventura 13.x x86_64/arm64 | `self-hosted` or `macOS` |
| macOS Monterey 12.x x86_64/arm64 | `self-hosted` or `macOS` | | macOS Monterey 12.x x86_64/arm64 | `self-hosted` or `macOS` |
| macOS Big Sur 11.x x86_64/arm64 | `self-hosted` or `macOS` |
- Refer to the [self-hosted setup](#self-hosted-setup) to use the action on self-hosted runners. - Refer to the [self-hosted setup](#self-hosted-setup) to use the action on self-hosted runners.
- Operating systems based on the above Ubuntu and Debian versions are also supported on best effort basis. - Operating systems based on the above Ubuntu and Debian versions are also supported on best effort basis.
@ -116,14 +113,14 @@ On all supported OS/Platforms the following PHP versions can be set up as per th
| `7.2` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` | | `7.2` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` |
| `7.3` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` | | `7.3` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` |
| `7.4` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` | | `7.4` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` |
| `8.0` | `Stable` | `Security fixes only` | `GitHub-hosted`, `self-hosted` | | `8.0` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` |
| `8.1` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` | | `8.1` | `Stable` | `Security fixes only` | `GitHub-hosted`, `self-hosted` |
| `8.2` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` | | `8.2` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` |
| `8.3` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` | | `8.3` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` |
| `8.4` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` | | `8.4` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` |
**Notes:** **Notes:**
- Specifying `8.3` and `8.4` in `php-version` input installs a nightly build of `PHP 8.3.0-dev` and `PHP 8.4.0-dev` respectively. See [nightly build setup](#nightly-build-setup) for more information. - Specifying `8.4` in `php-version` input installs a nightly build of `PHP 8.4.0-dev`. See [nightly build setup](#nightly-build-setup) for more information.
- To use JIT on `PHP 8.0` and above, refer to the [JIT configuration](#jit-configuration) section. - To use JIT on `PHP 8.0` and above, refer to the [JIT configuration](#jit-configuration) section.
## :heavy_plus_sign: PHP Extension Support ## :heavy_plus_sign: PHP Extension Support
@ -136,7 +133,7 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
- name: Setup PHP with PECL extension - name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
extensions: imagick, swoole extensions: imagick, swoole
``` ```
@ -164,7 +161,7 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
- name: Setup PHP with pre-release PECL extension - name: Setup PHP with pre-release PECL extension
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
extensions: xdebug-beta extensions: xdebug-beta
``` ```
@ -176,7 +173,7 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
- name: Setup PHP and disable opcache - name: Setup PHP and disable opcache
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
extensions: :opcache extensions: :opcache
``` ```
@ -188,7 +185,7 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
- name: Setup PHP without any shared extensions except mbstring - name: Setup PHP without any shared extensions except mbstring
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
extensions: none, mbstring extensions: none, mbstring
``` ```
@ -198,7 +195,7 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
- name: Setup PHP with intl - name: Setup PHP with intl
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
extensions: intl-70.1 extensions: intl-70.1
``` ```
@ -215,7 +212,7 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
- name: Setup PHP with fail-fast - name: Setup PHP with fail-fast
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
extensions: oci8 extensions: oci8
env: env:
fail-fast: true fail-fast: true
@ -231,7 +228,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP with tools - name: Setup PHP with tools
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
tools: php-cs-fixer, phpunit tools: php-cs-fixer, phpunit
``` ```
@ -241,7 +238,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP with tools - name: Setup PHP with tools
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
tools: vimeo/psalm tools: vimeo/psalm
``` ```
@ -261,8 +258,8 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP with tools - name: Setup PHP with tools
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
tools: php-cs-fixer:3.5, phpunit:9.5 tools: php-cs-fixer:3.39, phpunit:10.4
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
``` ```
@ -273,7 +270,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP with composer v2 - name: Setup PHP with composer v2
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
tools: composer:v2 tools: composer:v2
``` ```
@ -283,7 +280,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP without composer - name: Setup PHP without composer
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
tools: none tools: none
``` ```
@ -299,7 +296,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP with fail-fast - name: Setup PHP with fail-fast
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
tools: deployer tools: deployer
env: env:
fail-fast: true fail-fast: true
@ -322,7 +319,7 @@ Runs on all [PHP versions supported](#tada-php-support "List of PHP versions sup
- name: Setup PHP with Xdebug - name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
coverage: xdebug coverage: xdebug
``` ```
@ -350,7 +347,7 @@ Runs on PHP 7.1 and newer PHP versions.
- name: Setup PHP with PCOV - name: Setup PHP with PCOV
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
ini-values: pcov.directory=api #optional, see above for usage. ini-values: pcov.directory=api #optional, see above for usage.
coverage: pcov coverage: pcov
``` ```
@ -380,7 +377,7 @@ Disable coverage for these reasons:
- name: Setup PHP with no coverage driver - name: Setup PHP with no coverage driver
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
coverage: none coverage: none
``` ```
@ -453,7 +450,7 @@ On GitHub Actions you can assign the `setup-php` step an `id`, you can use the s
id: setup-php id: setup-php
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
- name: Print PHP version - name: Print PHP version
run: echo ${{ steps.setup-php.outputs.php-version }} run: echo ${{ steps.setup-php.outputs.php-version }}
@ -473,7 +470,7 @@ On GitHub Actions you can assign the `setup-php` step an `id`, you can use the s
#### `phpts` (optional) #### `phpts` (optional)
- Specify to set up a thread-safe build of PHP on Linux and Windows. - Specify to set up a thread-safe build of PHP on Linux and Windows.
- Accepts `ts` and `nts`. - Accepts `nts` for non-thread-safe and `zts` or `ts` for thread-safe.
- By default, it is set to `nts`. - By default, it is set to `nts`.
- See [thread safe setup](#thread-safe-setup) for more info. - See [thread safe setup](#thread-safe-setup) for more info.
@ -495,7 +492,7 @@ steps:
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
extensions: mbstring, intl extensions: mbstring, intl
ini-values: post_max_size=256M, max_execution_time=180 ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug coverage: xdebug
@ -534,7 +531,7 @@ jobs:
### Nightly Build Setup ### Nightly Build Setup
> Set up a nightly build of `PHP 8.3` or `PHP 8.4`. > Set up a nightly build of `PHP 8.4`.
- These PHP versions are currently in active development and might contain bugs and breaking changes. - These PHP versions are currently in active development and might contain bugs and breaking changes.
- Some user space extensions might not support this version currently. - Some user space extensions might not support this version currently.
@ -544,7 +541,7 @@ steps:
- name: Setup nightly PHP - name: Setup nightly PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
extensions: mbstring extensions: mbstring
ini-values: post_max_size=256M, max_execution_time=180 ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug coverage: xdebug
@ -563,7 +560,7 @@ steps:
- name: Setup PHP with debugging symbols - name: Setup PHP with debugging symbols
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
env: env:
debug: true # specify true or false debug: true # specify true or false
``` ```
@ -585,7 +582,7 @@ jobs:
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
env: env:
phpts: ts # specify ts or nts phpts: ts # specify ts or nts
``` ```
@ -602,7 +599,7 @@ jobs:
- name: Setup PHP with latest versions - name: Setup PHP with latest versions
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
env: env:
update: true # specify true or false update: true # specify true or false
``` ```
@ -617,14 +614,14 @@ To debug any issues, you can use the `verbose` tag instead of `v2`.
- name: Setup PHP with logs - name: Setup PHP with logs
uses: shivammathur/setup-php@verbose uses: shivammathur/setup-php@verbose
with: with:
php-version: '8.2' php-version: '8.3'
``` ```
### Multi-Arch Setup ### Multi-Arch Setup
> Set up PHP on multiple architecture on Ubuntu GitHub Runners. > Set up PHP on multiple architecture on Ubuntu GitHub Runners.
- `PHP 5.6` to `PHP 8.2` are supported by `setup-php` on multiple architecture on `Ubuntu`. - `PHP 5.6` to `PHP 8.3` are supported by `setup-php` on multiple architecture on `Ubuntu`.
- For this, you can use `shivammathur/node` images as containers. These have compatible `Nodejs` installed for `setup-php`. - For this, you can use `shivammathur/node` images as containers. These have compatible `Nodejs` installed for `setup-php`.
- Currently, for `ARM` based setup, you will need [self-hosted runners](#self-hosted-setup). - Currently, for `ARM` based setup, you will need [self-hosted runners](#self-hosted-setup).
@ -640,7 +637,7 @@ jobs:
- name: Install PHP - name: Install PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
``` ```
### Self Hosted Setup ### Self Hosted Setup
@ -662,7 +659,7 @@ jobs:
runs-on: self-hosted runs-on: self-hosted
strategy: strategy:
matrix: matrix:
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
name: PHP ${{ matrix.php-versions }} name: PHP ${{ matrix.php-versions }}
steps: steps:
- name: Setup PHP - name: Setup PHP
@ -690,7 +687,7 @@ jobs:
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
``` ```
Run the workflow locally with `act` using [`shivammathur/node`](https://github.com/shivammathur/node-docker "Docker image to run setup-php") docker images. Run the workflow locally with `act` using [`shivammathur/node`](https://github.com/shivammathur/node-docker "Docker image to run setup-php") docker images.
@ -723,7 +720,7 @@ For example to enable JIT in `tracing` mode with buffer size of `64 MB`.
- name: Setup PHP with JIT in tracing mode - name: Setup PHP with JIT in tracing mode
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
coverage: none coverage: none
ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=64M ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=64M
``` ```
@ -776,7 +773,7 @@ The `COMPOSER_TOKEN` environment variable has been deprecated in favor of `GITHU
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
``` ```
@ -789,7 +786,7 @@ If you use Private Packagist for your private composer dependencies, you can set
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
env: env:
PACKAGIST_TOKEN: ${{ secrets.PACKAGIST_TOKEN }} PACKAGIST_TOKEN: ${{ secrets.PACKAGIST_TOKEN }}
``` ```
@ -803,7 +800,7 @@ Please refer to the authentication section in [`composer documentation`](https:/
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
env: env:
COMPOSER_AUTH_JSON: | COMPOSER_AUTH_JSON: |
{ {
@ -826,7 +823,7 @@ Put the code in the run property of a step and specify the shell as `php {0}`.
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
- name: Run PHP code - name: Run PHP code
shell: php {0} shell: php {0}
@ -866,7 +863,7 @@ PHPStan supports error reporting in GitHub Actions, so it does not require probl
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
tools: phpstan tools: phpstan
- name: Run PHPStan - name: Run PHPStan
@ -881,7 +878,7 @@ Psalm supports error reporting in GitHub Actions with an output format `github`.
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
tools: psalm tools: psalm
- name: Run Psalm - name: Run Psalm
@ -899,7 +896,7 @@ For examples refer to the [cs2pr documentation](https://github.com/staabm/annota
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.2' php-version: '8.3'
tools: cs2pr, phpcs tools: cs2pr, phpcs
- name: Run phpcs - name: Run phpcs
@ -940,9 +937,10 @@ Examples of using `setup-php` with various PHP frameworks and packages.
- Use the `v2` tag as `setup-php` version. It is a rolling tag and is synced with the latest minor and patch releases. With `v2` you automatically get the bug fixes, security patches, new features and support for latest PHP releases. - Use the `v2` tag as `setup-php` version. It is a rolling tag and is synced with the latest minor and patch releases. With `v2` you automatically get the bug fixes, security patches, new features and support for latest PHP releases.
- Semantic release versions can also be used. It is recommended to [use dependabot](https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-github-dependabot "Setup Dependabot with GitHub Actions") with semantic versioning to keep the actions in your workflows up to date. - Semantic release versions can also be used. It is recommended to [use dependabot](https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-github-dependabot "Setup Dependabot with GitHub Actions") with semantic versioning to keep the actions in your workflows up to date.
- Commit SHA can also be used, but are not recommended. They have to be updated with every release manually, without which you will not get any bug fixes, security patches or new features. - Commit SHA can also be used, but are not recommended unless you set up tooling to update them with each release of the action.
- A new major version of the action will only be tagged when there are breaking changes in the setup-php API i.e. inputs, outputs, and environment flags.
- For debugging any issues `verbose` tag can be used temporarily. It outputs all the logs and is also synced with the latest releases. - For debugging any issues `verbose` tag can be used temporarily. It outputs all the logs and is also synced with the latest releases.
- It is highly discouraged to use the `master` branch as version, it might break your workflow after major releases as they have breaking changes. - It is highly discouraged to use the `main` branch as version, it might break your workflow after major releases as they have breaking changes.
- If you are using the `v1` tag or a `1.x.y` version, you should [switch to v2](https://github.com/shivammathur/setup-php/wiki/Switch-to-v2 "Guide for switching from setup-php v1 to v2") as `v1` only gets critical bug fixes. Maintenance support for `v1` will be dropped with the last `PHP 8.0` release. - If you are using the `v1` tag or a `1.x.y` version, you should [switch to v2](https://github.com/shivammathur/setup-php/wiki/Switch-to-v2 "Guide for switching from setup-php v1 to v2") as `v1` only gets critical bug fixes. Maintenance support for `v1` will be dropped with the last `PHP 8.0` release.
## :scroll: License ## :scroll: License

View File

@ -392,17 +392,19 @@ describe('Tools tests', () => {
it.each([ it.each([
[ [
'blackfire, blackfire-player, churn, cs2pr, flex, grpc_php_plugin, parallel-lint, php-cs-fixer, phpDocumentor, phplint, phpstan, phpunit, pecl, phing, phinx, phinx:1.2.3, phive, phpunit-bridge, phpunit-polyfills, pint, php-config, phpize, protoc, symfony, vapor, wp', 'blackfire, blackfire-player, box, churn, cs2pr, flex, grpc_php_plugin, parallel-lint, php-cs-fixer, php-scoper, phpDocumentor, phplint, phpstan, phpunit, pecl, phing, phinx, phinx:1.2.3, phive, phpunit-bridge, phpunit-polyfills, pint, php-config, phpize, protoc, symfony, vapor, wp',
[ [
'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer', 'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer',
'add_blackfire', 'add_blackfire',
'add_tool https://get.blackfire.io/blackfire-player-v1.22.0.phar blackfire-player "-V"', 'add_tool https://get.blackfire.io/blackfire-player-v1.22.0.phar blackfire-player "-V"',
'add_tool https://github.com/box-project/box/releases/latest/download/box.phar box "--version"',
'add_tool https://github.com/bmitch/churn-php/releases/latest/download/churn.phar churn "-V"', 'add_tool https://github.com/bmitch/churn-php/releases/latest/download/churn.phar churn "-V"',
'add_tool https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/latest/download/cs2pr cs2pr "-V"', 'add_tool https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/latest/download/cs2pr cs2pr "-V"',
'add_composer_tool flex flex symfony/ global', 'add_composer_tool flex flex symfony/ global',
'add_grpc_php_plugin latest', 'add_grpc_php_plugin latest',
'add_tool https://github.com/php-parallel-lint/PHP-Parallel-Lint/releases/latest/download/parallel-lint.phar parallel-lint "--version"', 'add_tool https://github.com/php-parallel-lint/PHP-Parallel-Lint/releases/latest/download/parallel-lint.phar parallel-lint "--version"',
'add_tool https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v3.2.1/php-cs-fixer.phar php-cs-fixer "-V"', 'add_tool https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v3.2.1/php-cs-fixer.phar php-cs-fixer "-V"',
'add_tool https://github.com/humbug/php-scoper/releases/latest/download/php-scoper.phar php-scoper "--version"',
'add_tool https://github.com/phpDocumentor/phpDocumentor/releases/latest/download/phpDocumentor.phar phpDocumentor "--version"', 'add_tool https://github.com/phpDocumentor/phpDocumentor/releases/latest/download/phpDocumentor.phar phpDocumentor "--version"',
'add_composer_tool phplint phplint overtrue/', 'add_composer_tool phplint phplint overtrue/',
'add_tool https://github.com/phpstan/phpstan/releases/latest/download/phpstan.phar phpstan "-V"', 'add_tool https://github.com/phpstan/phpstan/releases/latest/download/phpstan.phar phpstan "-V"',

17
dist/index.js vendored
View File

@ -249,7 +249,7 @@ async function addExtensionDarwin(extension_csv, version) {
add_script += await utils.parseExtensionSource(extension, ext_prefix); add_script += await utils.parseExtensionSource(extension, ext_prefix);
return; return;
case /^(7\.4|8\.[0-3])relay(-v?\d+\.\d+\.\d+)?$/.test(version_extension): case /^(7\.4|8\.[0-3])relay(-v?\d+\.\d+\.\d+)?$/.test(version_extension):
case /^(5\.[3-6]|7\.[0-4]|8\.[0-2])blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension): case /^(5\.[3-6]|7\.[0-4]|8\.[0-3])blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension):
case /^couchbase|^event|^gearman$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(extension): case /^couchbase|^event|^gearman$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(extension):
case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension): case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension):
case /(5\.6|7\.[0-3])phalcon3|7\.[2-4]phalcon4|(7\.4|8\.[0-2])phalcon5/.test(version_extension): case /(5\.6|7\.[0-3])phalcon3|7\.[2-4]phalcon4|(7\.4|8\.[0-2])phalcon5/.test(version_extension):
@ -299,7 +299,7 @@ async function addExtensionWindows(extension_csv, version) {
case /^none$/.test(ext_name): case /^none$/.test(ext_name):
add_script += '\nDisable-AllShared'; add_script += '\nDisable-AllShared';
break; break;
case /^(5\.[3-6]|7\.[0-4]|8\.[0-2])blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension): case /^(5\.[3-6]|7\.[0-4]|8\.[0-3])blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension):
case /^pdo_oci$|^oci8$|^pdo_firebird$/.test(extension): case /^pdo_oci$|^oci8$|^pdo_firebird$/.test(extension):
case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension): case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension):
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-2])phalcon5$/.test(version_extension): case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-2])phalcon5$/.test(version_extension):
@ -367,7 +367,7 @@ async function addExtensionLinux(extension_csv, version) {
add_script += await utils.parseExtensionSource(extension, ext_prefix); add_script += await utils.parseExtensionSource(extension, ext_prefix);
return; return;
case /^(7\.4|8\.[0-3])relay(-v?\d+\.\d+\.\d+)?$/.test(version_extension): case /^(7\.4|8\.[0-3])relay(-v?\d+\.\d+\.\d+)?$/.test(version_extension):
case /^(5\.[3-6]|7\.[0-4]|8\.[0-2])blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension): case /^(5\.[3-6]|7\.[0-4]|8\.[0-3])blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension):
case /^((5\.[3-6])|(7\.[0-2]))pdo_cubrid$|^((5\.[3-6])|(7\.[0-4]))cubrid$/.test(version_extension): case /^((5\.[3-6])|(7\.[0-2]))pdo_cubrid$|^((5\.[3-6])|(7\.[0-4]))cubrid$/.test(version_extension):
case /^couchbase|^event|^gearman$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(extension): case /^couchbase|^event|^gearman$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(extension):
case /(?<!5\.[3-5])intl-\d+\.\d+$/.test(version_extension): case /(?<!5\.[3-5])intl-\d+\.\d+$/.test(version_extension):
@ -476,7 +476,8 @@ async function fetch(input_url, auth_token, redirect_count = 5) {
const options = { const options = {
hostname: url_object.hostname, hostname: url_object.hostname,
path: url_object.pathname, path: url_object.pathname,
headers: headers headers: headers,
agent: new https.Agent({ keepAlive: false })
}; };
const req = https.get(options, (res) => { const req = https.get(options, (res) => {
if (res.statusCode === 200) { if (res.statusCode === 200) {
@ -549,7 +550,7 @@ const extensions = __importStar(__nccwpck_require__(3390));
const tools = __importStar(__nccwpck_require__(7740)); const tools = __importStar(__nccwpck_require__(7740));
const utils = __importStar(__nccwpck_require__(918)); const utils = __importStar(__nccwpck_require__(918));
async function getScript(os) { async function getScript(os) {
const url = 'https://setup-php.com/support-ukraine'; const url = 'https://setup-php.com/sponsor';
const filename = os + (await utils.scriptExtension(os)); const filename = os + (await utils.scriptExtension(os));
const script_path = path_1.default.join(__dirname, '../src/scripts', filename); const script_path = path_1.default.join(__dirname, '../src/scripts', filename);
const run_path = script_path.replace(os, 'run'); const run_path = script_path.replace(os, 'run');
@ -571,8 +572,8 @@ async function getScript(os) {
if (ini_values_csv) { if (ini_values_csv) {
script += await config.addINIValues(ini_values_csv, os); script += await config.addINIValues(ini_values_csv, os);
} }
script += '\n' + (await utils.stepLog(`#StandWithUkraine`, os)); script += '\n' + (await utils.stepLog(`Sponsor setup-php`, os));
script += '\n' + (await utils.addLog('$tick', 'read-more', url, os)); script += '\n' + (await utils.addLog('$tick', 'setup-php', url, os));
fs_1.default.writeFileSync(run_path, script, { mode: 0o755 }); fs_1.default.writeFileSync(run_path, script, { mode: 0o755 });
return run_path; return run_path;
} }
@ -1969,7 +1970,7 @@ class OidcClient {
.catch(error => { .catch(error => {
throw new Error(`Failed to get ID Token. \n throw new Error(`Failed to get ID Token. \n
Error Code : ${error.statusCode}\n Error Code : ${error.statusCode}\n
Error Message: ${error.result.message}`); Error Message: ${error.message}`);
}); });
const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
if (!id_token) { if (!id_token) {

2801
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "setup-php", "name": "setup-php",
"version": "2.26.0", "version": "2.28.0",
"private": false, "private": false,
"description": "Setup PHP for use with GitHub Actions", "description": "Setup PHP for use with GitHub Actions",
"main": "lib/install.js", "main": "lib/install.js",
@ -34,29 +34,29 @@
"author": "shivammathur", "author": "shivammathur",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.10.0", "@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/io": "^1.1.3", "@actions/io": "^1.1.3",
"compare-versions": "^6.1.0" "compare-versions": "^6.1.0"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^29.5.4", "@types/jest": "^29.5.10",
"@types/node": "^20.6.0", "@types/node": "^20.10.0",
"@typescript-eslint/eslint-plugin": "^6.6.0", "@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.6.0", "@typescript-eslint/parser": "^6.12.0",
"@vercel/ncc": "^0.38.0", "@vercel/ncc": "^0.38.1",
"eslint": "^8.49.0", "eslint": "^8.54.0",
"eslint-config-prettier": "^9.0.0", "eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.28.1", "eslint-plugin-import": "^2.29.0",
"eslint-plugin-jest": "^27.2.3", "eslint-plugin-jest": "^27.6.0",
"eslint-plugin-prettier": "^5.0.0", "eslint-plugin-prettier": "^5.0.1",
"jest": "^29.6.4", "jest": "^29.7.0",
"jest-circus": "^29.6.4", "jest-circus": "^29.7.0",
"nock": "^13.3.3", "nock": "^13.3.8",
"prettier": "^3.0.3", "prettier": "^3.1.0",
"simple-git-hooks": "^2.9.0", "simple-git-hooks": "^2.9.0",
"ts-jest": "^29.1.1", "ts-jest": "^29.1.1",
"typescript": "^5.2.2" "typescript": "^5.3.2"
}, },
"bugs": { "bugs": {
"url": "https://github.com/shivammathur/setup-php/issues" "url": "https://github.com/shivammathur/setup-php/issues"

View File

@ -17,3 +17,6 @@
21.04,hirsute 21.04,hirsute
21.10,impish 21.10,impish
22.04,jammy 22.04,jammy
23.04,lunar
23.10,mantic
24.04,noble

1 8 jessie
17 21.04 hirsute
18 21.10 impish
19 22.04 jammy
20 23.04 lunar
21 23.10 mantic
22 24.04 noble

View File

@ -1,7 +1,7 @@
{ {
"latest": "8.2", "latest": "8.3",
"nightly": "8.3", "nightly": "8.4",
"5.x": "5.6", "5.x": "5.6",
"7.x": "7.4", "7.x": "7.4",
"8.x": "8.2" "8.x": "8.3"
} }

View File

@ -1,4 +1,13 @@
{ {
"box": {
"type": "phar",
"repository": "box-project/box",
"packagist": "humbug/box",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "",
"version_parameter": "--version"
},
"churn": { "churn": {
"type": "phar", "type": "phar",
"repository": "bmitch/churn-php", "repository": "bmitch/churn-php",
@ -64,6 +73,15 @@
"version_prefix": "v", "version_prefix": "v",
"version_parameter": "-V" "version_parameter": "-V"
}, },
"php-scoper": {
"type": "phar",
"repository": "humbug/php-scoper",
"packagist": "humbug/php-scoper",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "",
"version_parameter": "--version"
},
"phpcbf": { "phpcbf": {
"type": "phar", "type": "phar",
"repository": "squizlabs/PHP_CodeSniffer", "repository": "squizlabs/PHP_CodeSniffer",

View File

@ -32,14 +32,14 @@ export async function addExtensionDarwin(
add_script += await utils.parseExtensionSource(extension, ext_prefix); add_script += await utils.parseExtensionSource(extension, ext_prefix);
return; return;
// match 7.4relay...8.3relay // match 7.4relay...8.3relay
// match 5.3blackfire...8.2blackfire // match 5.3blackfire...8.3blackfire
// match 5.3blackfire-(semver)...8.1blackfire-(semver) // match 5.3blackfire-(semver)...8.3blackfire-(semver)
// match couchbase, event, geos, pdo_oci, oci8, http, pecl_http // match couchbase, event, geos, pdo_oci, oci8, http, pecl_http
// match 5.3ioncube...7.4ioncube // match 5.3ioncube...7.4ioncube
// match 7.0phalcon3...7.3phalcon3, 7.2phalcon4...7.4phalcon4, and 7.4phalcon5...8.2phalcon5 // match 7.0phalcon3...7.3phalcon3, 7.2phalcon4...7.4phalcon4, and 7.4phalcon5...8.2phalcon5
// match 7.0zephir_parser...8.2zephir_parser // match 7.0zephir_parser...8.2zephir_parser
case /^(7\.4|8\.[0-3])relay(-v?\d+\.\d+\.\d+)?$/.test(version_extension): case /^(7\.4|8\.[0-3])relay(-v?\d+\.\d+\.\d+)?$/.test(version_extension):
case /^(5\.[3-6]|7\.[0-4]|8\.[0-2])blackfire(-\d+\.\d+\.\d+)?$/.test( case /^(5\.[3-6]|7\.[0-4]|8\.[0-3])blackfire(-\d+\.\d+\.\d+)?$/.test(
version_extension version_extension
): ):
case /^couchbase|^event|^gearman$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test( case /^couchbase|^event|^gearman$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(
@ -134,14 +134,14 @@ export async function addExtensionWindows(
case /^none$/.test(ext_name): case /^none$/.test(ext_name):
add_script += '\nDisable-AllShared'; add_script += '\nDisable-AllShared';
break; break;
// match 5.3blackfire...8.2blackfire // match 5.3blackfire...8.3blackfire
// match 5.3blackfire-(semver)...8.1blackfire-(semver) // match 5.3blackfire-(semver)...8.3blackfire-(semver)
// match pdo_oci and oci8 // match pdo_oci and oci8
// match 5.3ioncube...7.4ioncube // match 5.3ioncube...7.4ioncube
// match 7.0phalcon3...7.3phalcon3, 7.2phalcon4...7.4phalcon4, and 7.4phalcon5...8.2phalcon5 // match 7.0phalcon3...7.3phalcon3, 7.2phalcon4...7.4phalcon4, and 7.4phalcon5...8.2phalcon5
// match 7.1pecl_http...8.1pecl_http and 7.1http...8.1http // match 7.1pecl_http...8.1pecl_http and 7.1http...8.1http
// match 7.0zephir_parser...8.2zephir_parser // match 7.0zephir_parser...8.2zephir_parser
case /^(5\.[3-6]|7\.[0-4]|8\.[0-2])blackfire(-\d+\.\d+\.\d+)?$/.test( case /^(5\.[3-6]|7\.[0-4]|8\.[0-3])blackfire(-\d+\.\d+\.\d+)?$/.test(
version_extension version_extension
): ):
case /^pdo_oci$|^oci8$|^pdo_firebird$/.test(extension): case /^pdo_oci$|^oci8$|^pdo_firebird$/.test(extension):
@ -264,15 +264,15 @@ export async function addExtensionLinux(
add_script += await utils.parseExtensionSource(extension, ext_prefix); add_script += await utils.parseExtensionSource(extension, ext_prefix);
return; return;
// match 7.4relay...8.3relay // match 7.4relay...8.3relay
// match 5.3blackfire...8.2blackfire // match 5.3blackfire...8.3blackfire
// match 5.3blackfire-(semver)...8.1blackfire-(semver) // match 5.3blackfire-(semver)...8.3blackfire-(semver)
// match 5.3pdo_cubrid...7.2php_cubrid, 5.3cubrid...7.4cubrid // match 5.3pdo_cubrid...7.2php_cubrid, 5.3cubrid...7.4cubrid
// match couchbase, geos, pdo_oci, oci8, http, pecl_http // match couchbase, geos, pdo_oci, oci8, http, pecl_http
// match 5.3ioncube...7.4ioncube // match 5.3ioncube...7.4ioncube
// match 7.0phalcon3...7.3phalcon3, 7.2phalcon4...7.4phalcon4, 7.4phalcon5...8.2phalcon5 // match 7.0phalcon3...7.3phalcon3, 7.2phalcon4...7.4phalcon4, 7.4phalcon5...8.2phalcon5
// match 7.0zephir_parser...8.2zephir_parser // match 7.0zephir_parser...8.2zephir_parser
case /^(7\.4|8\.[0-3])relay(-v?\d+\.\d+\.\d+)?$/.test(version_extension): case /^(7\.4|8\.[0-3])relay(-v?\d+\.\d+\.\d+)?$/.test(version_extension):
case /^(5\.[3-6]|7\.[0-4]|8\.[0-2])blackfire(-\d+\.\d+\.\d+)?$/.test( case /^(5\.[3-6]|7\.[0-4]|8\.[0-3])blackfire(-\d+\.\d+\.\d+)?$/.test(
version_extension version_extension
): ):
case /^((5\.[3-6])|(7\.[0-2]))pdo_cubrid$|^((5\.[3-6])|(7\.[0-4]))cubrid$/.test( case /^((5\.[3-6])|(7\.[0-2]))pdo_cubrid$|^((5\.[3-6])|(7\.[0-4]))cubrid$/.test(

View File

@ -26,7 +26,8 @@ export async function fetch(
const options: https.RequestOptions = { const options: https.RequestOptions = {
hostname: url_object.hostname, hostname: url_object.hostname,
path: url_object.pathname, path: url_object.pathname,
headers: headers headers: headers,
agent: new https.Agent({keepAlive: false})
}; };
const req = https.get(options, (res: IncomingMessage) => { const req = https.get(options, (res: IncomingMessage) => {
if (res.statusCode === 200) { if (res.statusCode === 200) {

View File

@ -14,7 +14,7 @@ import * as utils from './utils';
* @param os * @param os
*/ */
export async function getScript(os: string): Promise<string> { export async function getScript(os: string): Promise<string> {
const url = 'https://setup-php.com/support-ukraine'; const url = 'https://setup-php.com/sponsor';
const filename = os + (await utils.scriptExtension(os)); const filename = os + (await utils.scriptExtension(os));
const script_path = path.join(__dirname, '../src/scripts', filename); const script_path = path.join(__dirname, '../src/scripts', filename);
const run_path = script_path.replace(os, 'run'); const run_path = script_path.replace(os, 'run');
@ -40,8 +40,8 @@ export async function getScript(os: string): Promise<string> {
if (ini_values_csv) { if (ini_values_csv) {
script += await config.addINIValues(ini_values_csv, os); script += await config.addINIValues(ini_values_csv, os);
} }
script += '\n' + (await utils.stepLog(`#StandWithUkraine`, os)); script += '\n' + (await utils.stepLog(`Sponsor setup-php`, os));
script += '\n' + (await utils.addLog('$tick', 'read-more', url, os)); script += '\n' + (await utils.addLog('$tick', 'setup-php', url, os));
fs.writeFileSync(run_path, script, {mode: 0o755}); fs.writeFileSync(run_path, script, {mode: 0o755});

View File

@ -43,7 +43,9 @@ copy_brew_extensions() {
extension_file="${brew_prefix:?}/opt/$dependency/$(get_extension_from_formula "${dependency%@*}").so" extension_file="${brew_prefix:?}/opt/$dependency/$(get_extension_from_formula "${dependency%@*}").so"
[ -e "$extension_file" ] && sudo cp "$extension_file" "$ext_dir" [ -e "$extension_file" ] && sudo cp "$extension_file" "$ext_dir"
done done
sudo find -- "$brew_prefix"/Cellar/"$formula"@"$version" -name "*.dylib" -exec cp {} "$ext_dir" \; if [ -d "$brew_prefix"/Cellar/"$formula"@"$version" ]; then
sudo find -- "$brew_prefix"/Cellar/"$formula"@"$version" -name "*.dylib" -exec cp {} "$ext_dir" \;
fi
} }
# Function to install a php extension from shivammathur/extensions tap. # Function to install a php extension from shivammathur/extensions tap.
@ -60,8 +62,7 @@ add_brew_extension() {
sudo mv "$tap_dir"/"$ext_tap"/.github/deps/"$formula"/* "${core_repo:?}/Formula/" 2>/dev/null || true sudo mv "$tap_dir"/"$ext_tap"/.github/deps/"$formula"/* "${core_repo:?}/Formula/" 2>/dev/null || true
update_dependencies >/dev/null 2>&1 update_dependencies >/dev/null 2>&1
disable_dependency_extensions "$extension" >/dev/null 2>&1 disable_dependency_extensions "$extension" >/dev/null 2>&1
brew install -f "$ext_tap/$formula@$version" >/dev/null 2>&1 (brew install -f "$ext_tap/$formula@$version" >/dev/null 2>&1 && copy_brew_extensions "$formula") || pecl_install "$extension" >/dev/null 2>&1
copy_brew_extensions "$formula"
add_extension_log "$extension" "Installed and enabled" add_extension_log "$extension" "Installed and enabled"
fi fi
} }
@ -125,7 +126,8 @@ patch_brew() {
# Helper function to update the dependencies. # Helper function to update the dependencies.
update_dependencies_helper() { update_dependencies_helper() {
dependency=$1 dependency=$1
get -q -n "$core_repo/Formula/$dependency.rb" "https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/$dependency.rb" [[ "${dependency:0:3}" = "lib" ]] && prefix=lib || prefix="${dependency:0:1}"
get -q -n "$core_repo/Formula/$prefix/$dependency.rb" "https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/$prefix/$dependency.rb"
link_libraries "$dependency" link_libraries "$dependency"
} }
@ -162,8 +164,11 @@ fix_dependencies() {
# Function to get PHP version if it is already installed using Homebrew. # Function to get PHP version if it is already installed using Homebrew.
get_brewed_php() { get_brewed_php() {
php_cellar="$brew_prefix"/Cellar/php cellar="$brew_prefix"/Cellar
if [ -d "$php_cellar" ] && ! [[ "$(find "$php_cellar" -maxdepth 1 -name "$version*" | wc -l 2>/dev/null)" -eq 0 ]]; then php_cellar="$cellar"/php
if [ -d "$cellar" ] && ! [[ "$(find "$cellar" -maxdepth 1 -name "php@$version*" | wc -l 2>/dev/null)" -eq 0 ]]; then
php_semver | cut -c 1-3
elif [ -d "$php_cellar" ] && ! [[ "$(find "$php_cellar" -maxdepth 1 -name "$version*" | wc -l 2>/dev/null)" -eq 0 ]]; then
php_semver | cut -c 1-3 php_semver | cut -c 1-3
else else
echo 'false'; echo 'false';
@ -254,7 +259,7 @@ setup_php() {
} }
# Variables # Variables
version=${1:-'8.2'} version=${1:-'8.3'}
ini=${2:-'production'} ini=${2:-'production'}
src=${0%/*}/.. src=${0%/*}/..
php_formula=shivammathur/php/php@"$version" php_formula=shivammathur/php/php@"$version"
@ -267,6 +272,7 @@ export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_ENV_HINTS=1 export HOMEBREW_NO_ENV_HINTS=1
export HOMEBREW_NO_INSTALL_CLEANUP=1 export HOMEBREW_NO_INSTALL_CLEANUP=1
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
export HOMEBREW_NO_INSTALL_FROM_API=1
# shellcheck source=. # shellcheck source=.
. "${scripts:?}"/unix.sh . "${scripts:?}"/unix.sh

View File

@ -125,9 +125,9 @@ Function Add-Extension {
if(($version -match $nightly_versions) -and (Select-String -Path $src\configs\windows_extensions -Pattern $extension -SimpleMatch -Quiet)) { if(($version -match $nightly_versions) -and (Select-String -Path $src\configs\windows_extensions -Pattern $extension -SimpleMatch -Quiet)) {
Add-NightlyExtension $extension Add-NightlyExtension $extension
} else { } else {
# Patch till DLLs for PHP 8.1 and 8.2 are released as stable. # Patch till DLLs for PHP 8.2 and above are released as stable.
$minimumStability = $stability $minimumStability = $stability
if ($version -match '8.[1-2]' -and $stability -eq 'stable') { if ($version -match '8.[2-4]' -and $stability -eq 'stable') {
$minimumStability = 'snapshot' $minimumStability = 'snapshot'
} }

View File

@ -22,6 +22,8 @@ Function Add-Blackfire() {
} else { } else {
$nts = if (!$installed.ThreadSafe) { "_nts" } else { "" } $nts = if (!$installed.ThreadSafe) { "_nts" } else { "" }
Get-File -Url "https://packages.blackfire.io/binaries/blackfire-php/${extension_version}/blackfire-php-windows_${arch}-php-${no_dot_version}${nts}.dll" -OutFile $ext_dir\blackfire.dll > $null 2>&1 Get-File -Url "https://packages.blackfire.io/binaries/blackfire-php/${extension_version}/blackfire-php-windows_${arch}-php-${no_dot_version}${nts}.dll" -OutFile $ext_dir\blackfire.dll > $null 2>&1
Disable-Extension xdebug > $null 2>&1
Disable-Extension pcov > $null 2>&1
Enable-PhpExtension -Extension blackfire -Path $php_dir Enable-PhpExtension -Extension blackfire -Path $php_dir
$status="Installed and enabled" $status="Installed and enabled"
} }

View File

@ -17,6 +17,8 @@ add_blackfire() {
fi fi
get -q -n "${ext_dir:?}/blackfire.so" https://packages.blackfire.io/binaries/blackfire-php/"$extension_version"/blackfire-php-"$platform"_amd64-php-"$no_dot_version".so >/dev/null 2>&1 get -q -n "${ext_dir:?}/blackfire.so" https://packages.blackfire.io/binaries/blackfire-php/"$extension_version"/blackfire-php-"$platform"_amd64-php-"$no_dot_version".so >/dev/null 2>&1
fi fi
disable_extension xdebug >/dev/null 2>&1
disable_extension pcov >/dev/null 2>&1
enable_extension blackfire extension enable_extension blackfire extension
add_extension_log blackfire "$status" add_extension_log blackfire "$status"
} }

View File

@ -32,6 +32,8 @@ get_couchbase_version() {
echo couchbase-3.0.4 echo couchbase-3.0.4
elif [ "${version:?}" = '7.3' ]; then elif [ "${version:?}" = '7.3' ]; then
echo couchbase-3.2.2 echo couchbase-3.2.2
elif [ "${version:?}" = '7.4' ]; then
echo couchbase-4.1.0
else else
echo couchbase echo couchbase
fi fi
@ -55,6 +57,9 @@ add_couchbase() {
else else
if [ "$ext" = "couchbase" ]; then if [ "$ext" = "couchbase" ]; then
ext="couchbase-$(get_pecl_version "couchbase" "stable")" ext="couchbase-$(get_pecl_version "couchbase" "stable")"
n_proc="$(nproc)"
export COUCHBASE_SUFFIX_OPTS="CMAKE_BUILD_TYPE=Release"
export CMAKE_BUILD_PARALLEL_LEVEL="$n_proc"
add_extension_from_source couchbase https://pecl.php.net couchbase couchbase "${ext##*-}" extension pecl >/dev/null 2>&1 add_extension_from_source couchbase https://pecl.php.net couchbase couchbase "${ext##*-}" extension pecl >/dev/null 2>&1
else else
pecl_install "${ext}" >/dev/null 2>&1 pecl_install "${ext}" >/dev/null 2>&1

View File

@ -13,7 +13,7 @@ get_event_configure_opts() {
) )
else else
event_opts+=( event_opts+=(
--with-openssl-dir="$(brew --prefix openssl@1.1)" --with-openssl-dir="$(brew --prefix openssl@3)"
--with-event-libevent-dir="$(brew --prefix libevent)" --with-event-libevent-dir="$(brew --prefix libevent)"
) )
fi fi

View File

@ -3,5 +3,7 @@ patch_geos() {
sed -i~ -e "s/, ce->name/, ZSTR_VAL(ce->name)/; s/ulong /zend_ulong /" geos.c sed -i~ -e "s/, ce->name/, ZSTR_VAL(ce->name)/; s/ulong /zend_ulong /" geos.c
fi fi
get -q -n /tmp/php8.patch https://git.remirepo.net/cgit/rpms/php/php-geos.git/plain/0003-add-all-arginfo-and-fix-build-with-PHP-8.patch get -q -n /tmp/php8.patch https://git.remirepo.net/cgit/rpms/php/php-geos.git/plain/0003-add-all-arginfo-and-fix-build-with-PHP-8.patch
get -q -n /tmp/toString.patch https://git.remirepo.net/cgit/rpms/php/php-geos.git/plain/0006-fix-__toString-with-8.2.patch
patch -p1 < /tmp/php8.patch 2>/dev/null || true patch -p1 < /tmp/php8.patch 2>/dev/null || true
patch -p1 < /tmp/toString.patch 2>/dev/null || true
} }

View File

@ -109,6 +109,11 @@ setup_old_versions() {
run_script "php5-ubuntu" "$version" run_script "php5-ubuntu" "$version"
} }
# Function to setup PHP from the cached builds.
setup_cached_versions() {
run_script "php-ubuntu" "$version" "${debug:?}" "${ts:?}"
}
# Function to add PECL. # Function to add PECL.
add_pecl() { add_pecl() {
add_devtools phpize >/dev/null 2>&1 add_devtools phpize >/dev/null 2>&1
@ -149,13 +154,9 @@ get_php_packages() {
# Function to install packaged PHP # Function to install packaged PHP
add_packaged_php() { add_packaged_php() {
if [ "$runner" = "self-hosted" ] || [ "${use_package_cache:-true}" = "false" ]; then add_ppa ondrej/php >/dev/null 2>&1 || update_ppa ondrej/php
add_ppa ondrej/php >/dev/null 2>&1 || update_ppa ondrej/php IFS=' ' read -r -a packages <<<"$(get_php_packages)"
IFS=' ' read -r -a packages <<<"$(get_php_packages)" install_packages "${packages[@]}"
install_packages "${packages[@]}"
else
run_script "php-ubuntu" "$version" "${debug:?}"
fi
} }
# Function to update PHP. # Function to update PHP.
@ -172,14 +173,18 @@ update_php() {
# Function to install PHP. # Function to install PHP.
add_php() { add_php() {
if [[ "$version" =~ ${nightly_versions:?} ]] || [[ "${ts:?}" = "zts" ]]; then if [ "${runner:?}" = "self-hosted" ] || [ "${use_package_cache:-true}" = "false" ]; then
setup_nightly if [[ "$version" =~ ${nightly_versions:?} ]]; then
setup_nightly
else
add_packaged_php
switch_version >/dev/null 2>&1
add_pecl
fi
elif [[ "$version" =~ ${old_versions:?} ]]; then elif [[ "$version" =~ ${old_versions:?} ]]; then
setup_old_versions setup_old_versions
else else
add_packaged_php setup_cached_versions
switch_version >/dev/null 2>&1
add_pecl
fi fi
status="Installed" status="Installed"
} }
@ -272,7 +277,7 @@ setup_php() {
} }
# Variables # Variables
version=${1:-'8.2'} version=${1:-'8.3'}
ini=${2:-'production'} ini=${2:-'production'}
src=${0%/*}/.. src=${0%/*}/..
debconf_fix="DEBIAN_FRONTEND=noninteractive" debconf_fix="DEBIAN_FRONTEND=noninteractive"

View File

@ -85,7 +85,9 @@ Function Add-ToolsHelper() {
$tool $tool
) )
$extensions = @(); $extensions = @();
if($tool -eq "codeception") { if($tool -eq "box") {
$extensions += @('iconv', 'mbstring', 'phar', 'sodium')
} elseif($tool -eq "codeception") {
$extensions += @('json', 'mbstring') $extensions += @('json', 'mbstring')
Copy-Item $env:codeception_bin\codecept.bat -Destination $env:codeception_bin\codeception.bat Copy-Item $env:codeception_bin\codecept.bat -Destination $env:codeception_bin\codeception.bat
} elseif($tool -eq "composer") { } elseif($tool -eq "composer") {

View File

@ -74,6 +74,8 @@ add_tools_helper() {
extensions=() extensions=()
if [ "$tool" = "blackfire-player" ]; then if [ "$tool" = "blackfire-player" ]; then
extensions+=(uuid) extensions+=(uuid)
elif [ "$tool" = "box" ]; then
extensions+=(iconv mbstring phar sodium)
elif [ "$tool" = "codeception" ]; then elif [ "$tool" = "codeception" ]; then
extensions+=(json mbstring) extensions+=(json mbstring)
sudo ln -s "$scoped_dir"/vendor/bin/codecept "$scoped_dir"/vendor/bin/codeception sudo ln -s "$scoped_dir"/vendor/bin/codecept "$scoped_dir"/vendor/bin/codeception
@ -130,6 +132,9 @@ add_tool() {
tool=$2 tool=$2
ver_param=$3 ver_param=$3
tool_path="$tool_path_dir/$tool" tool_path="$tool_path_dir/$tool"
if ! [ -d "$tool_path_dir" ]; then
sudo mkdir -p "$tool_path_dir"
fi
add_path "$tool_path_dir" add_path "$tool_path_dir"
if [ -e "$tool_path" ]; then if [ -e "$tool_path" ]; then
sudo cp -aL "$tool_path" /tmp/"$tool" sudo cp -aL "$tool_path" /tmp/"$tool"

View File

@ -24,8 +24,10 @@ get_grpc_tag() {
add_grpc_php_plugin_brew() { add_grpc_php_plugin_brew() {
. "${0%/*}"/tools/brew.sh . "${0%/*}"/tools/brew.sh
configure_brew configure_brew
[ -e /usr/local/bin/protoc ] && sudo mv /usr/local/bin/protoc /tmp/protoc && sudo mv /usr/local/include/google /tmp
brew install grpc brew install grpc
brew link --force --overwrite grpc >/dev/null 2>&1 brew link --force --overwrite grpc >/dev/null 2>&1
[ -e /tmp/protoc ] && sudo mv /tmp/protoc /usr/local/bin/protoc && sudo mv /tmp/google /usr/local/include/
grpc_tag="v$(brew info grpc | grep "grpc:" | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+")" grpc_tag="v$(brew info grpc | grep "grpc:" | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+")"
license_path="$(brew --prefix grpc)/LICENSE" license_path="$(brew --prefix grpc)/LICENSE"
} }

View File

@ -51,7 +51,7 @@ set_output() {
read_env() { read_env() {
update="${update:-${UPDATE:-false}}" update="${update:-${UPDATE:-false}}"
[ "${debug:-${DEBUG:-false}}" = "true" ] && debug=debug && update=true || debug=release [ "${debug:-${DEBUG:-false}}" = "true" ] && debug=debug && update=true || debug=release
[ "${phpts:-${PHPTS:-nts}}" = "ts" ] && ts=zts && update=true || ts=nts [[ "${phpts:-${PHPTS:-nts}}" = "ts" || "${phpts:-${PHPTS:-nts}}" = "zts" ]] && ts=zts && update=true || ts=nts
fail_fast="${fail_fast:-${FAIL_FAST:-false}}" fail_fast="${fail_fast:-${FAIL_FAST:-false}}"
[[ -z "${ImageOS}" && -z "${ImageVersion}" || -n ${ACT} ]] && _runner=self-hosted || _runner=github [[ -z "${ImageOS}" && -z "${ImageVersion}" || -n ${ACT} ]] && _runner=self-hosted || _runner=github
runner="${runner:-${RUNNER:-$_runner}}" runner="${runner:-${RUNNER:-$_runner}}"

View File

@ -332,8 +332,8 @@ if(-not([Environment]::Is64BitOperatingSystem) -or $version -lt '7.0') {
$arch = 'x86' $arch = 'x86'
} }
$ts = $env:PHPTS -eq 'ts' $ts = ($env:PHPTS -match '^z?ts$')
if($env:PHPTS -ne 'ts') { if(-not($ts)) {
$env:PHPTS = '-nts' $env:PHPTS = '-nts'
} else { } else {
$env:PHPTS = '' $env:PHPTS = ''