Compare commits

...
25 Commits
Author SHA1 Message Date
Shivam Mathur 8e2ac35f63 Update README 2022-12-26 03:45:00 +05:30
Shivam Mathur a1e6789a94 Improve Get-PhalconReleaseAssetUrl 2022-12-25 21:52:32 +05:30
Shivam Mathur 9114b007ae Restore stability workaround for PHP 8.1 on Windows 2022-12-25 21:26:22 +05:30
Shivam Mathur cb0c293f02 Fix typo in blackfire regex on Windows 2022-12-25 21:14:03 +05:30
Shivam Mathur 387ec95b46 Improve fetching phalcon release url on Windows 2022-12-25 20:48:17 +05:30
Shivam Mathur 3514d30f93 Allow major.minor protoc versions 2022-12-25 20:03:40 +05:30
Shivam Mathur e186e47261 Bump version to 2.23.0
Update Node.js dependencies
2022-12-25 19:18:47 +05:30
Shivam Mathur e51e662ef0 Add support to install extensions from shivammathur/php-extensions-windows 2022-12-23 18:40:56 +05:30
Shivam Mathur 5afd8a1842 Fix error in darwin.sh while updating dependencies 2022-12-23 18:11:26 +05:30
Shivam Mathur 1a42045d48 Use ls-remote to get default branch
Calling GitHub API on macOS without the token hits rate limit
2022-12-19 08:19:07 +05:30
Shivam Mathur b3a12ce01e Add fallback in PHP build cache in Windows 2022-12-19 07:19:21 +05:30
Shivam Mathur 04b2ed5b3e Fix protoc support on Windows 2022-12-19 06:57:44 +05:30
Shivam Mathur 189e8e6ec0 Update pre-installed PHP versions on GitHub runners
Minor fixes in README
2022-12-18 08:20:18 +05:30
Shivam Mathur 3407e6019c Quote ini values with equal sign 2022-12-15 05:32:32 +05:30
Shivam Mathur f20012026f Bump nightly versions in unix.sh 2022-12-15 05:32:31 +05:30
Shivam Mathur 7743b7976f Update version in actions.yml 2022-12-15 05:32:31 +05:30
Shivam Mathur b7b50ce742 Fix extension support on php 8.2 on windows
Add PHP 8.2 support for backfire extension
2022-12-15 05:32:30 +05:30
Shivam Mathur aa9b80f158 Fix extension support on php 8.2 on windows
Add PHP 8.2 support for backfire extension
2022-12-08 19:58:40 +05:30
Shivam Mathur 53adb47562 Mark PHP 8.2 as stable
Update OS support in README
2022-12-08 19:37:49 +05:30
Shivam Mathur f7d3c00320 Merge pull request #673 from jrfnl/feature/readme-update-php-list
README: update for release of PHP 8.2
2022-12-08 19:35:28 +05:30
jrfnl b359d922e7 README: update code samples 2022-12-08 14:59:54 +01:00
jrfnl 01aa440f0b README: update for release of PHP 8.2
I also realized that - while not mentioned in the changelog or the readme - PHP 8.3 _is_ already available via the `setup-php` action runner, so I've added it to the README now.

Ref: https://www.php.net/supported-versions.php
2022-12-08 14:49:16 +01:00
Shivam Mathur 51f83e019c Switch composer-unused back to phar 2022-12-01 04:45:59 +05:30
Shivam Mathur 173ca15c9b Fix get_extension_from_formula in darwin.sh 2022-11-16 10:40:40 +05:30
Shivam Mathur 4704ad638a Improve extension support on macOS 2022-11-14 15:17:12 +05:30
25 changed files with 1180 additions and 1079 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-22.04, ubuntu-20.04, ubuntu-18.04, windows-2019, macos-latest] operating-system: [ubuntu-22.04, ubuntu-20.04, ubuntu-18.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'] 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']
env: env:
extensions: xml, opcache, xdebug, pcov, gd extensions: xml, opcache, xdebug, pcov, gd
key: cache-v5 key: cache-v5
+65 -65
View File
@@ -10,7 +10,7 @@
<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/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="#tada-php-support" title="PHP Versions Supported"><img alt="PHP Versions Supported" src="https://img.shields.io/badge/php-5.3%20to%208.2-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.3-777bb3.svg?logo=php&logoColor=white&labelColor=555555"></a>
</p> </p>
<p align="center"> <p align="center">
<a href="https://reddit.com/r/setup_php" title="setup-php reddit"><img alt="setup-php reddit" src="https://img.shields.io/badge/reddit-join-FF5700?logo=reddit&logoColor=FF5700&labelColor=555555"></a> <a href="https://reddit.com/r/setup_php" title="setup-php reddit"><img alt="setup-php reddit" src="https://img.shields.io/badge/reddit-join-FF5700?logo=reddit&logoColor=FF5700&labelColor=555555"></a>
@@ -71,16 +71,15 @@ Both `GitHub-hosted` and `self-hosted` runners are supported by `setup-php` on t
### GitHub-Hosted Runners ### GitHub-Hosted Runners
| Virtual environment | YAML workflow label | Pre-installed PHP | | Virtual environment | YAML workflow label | Pre-installed PHP |
|----------------------|------------------------------------|------------------------| |---------------------|------------------------------------|------------------------|
| Ubuntu 22.04 | `ubuntu-22.04` | `PHP 8.1` | | Ubuntu 22.04 | `ubuntu-latest` or `ubuntu-22.04` | `PHP 8.1` |
| Ubuntu 20.04 | `ubuntu-latest` or `ubuntu-20.04` | `PHP 7.4` to `PHP 8.1` | | Ubuntu 20.04 | `ubuntu-20.04` | `PHP 7.4` to `PHP 8.2` |
| Ubuntu 18.04 | `ubuntu-18.04` | `PHP 7.2` to `PHP 8.1` | | Ubuntu 18.04 | `ubuntu-18.04` | `PHP 7.2` to `PHP 8.2` |
| Windows Server 2022 | `windows-latest` or `windows-2022` | `PHP 8.1` | | Windows Server 2022 | `windows-latest` or `windows-2022` | `PHP 8.2` |
| Windows Server 2019 | `windows-2019` | `PHP 8.1` | | Windows Server 2019 | `windows-2019` | `PHP 8.2` |
| macOS Monterey 12.x | `macos-12` | `PHP 8.1` | | macOS Monterey 12.x | `macos-12` | `PHP 8.2` |
| macOS Big Sur 11.x | `macos-latest` or `macos-11` | `PHP 8.1` | | macOS Big Sur 11.x | `macos-latest` or `macos-11` | `PHP 8.2` |
| macOS Catalina 10.15 | `macos-10.15` | `PHP 8.1` |
### Self-Hosted Runners ### Self-Hosted Runners
@@ -93,9 +92,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 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` | | macOS Big Sur 11.x x86_64/arm64 | `self-hosted` or `macOS` |
| macOS Catalina 10.15 | `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.
@@ -103,10 +102,10 @@ Both `GitHub-hosted` and `self-hosted` runners are supported by `setup-php` on t
## :tada: PHP Support ## :tada: PHP Support
On all supported OS/Platforms the following PHP versions are supported as per the runner. On all supported OS/Platforms the following PHP versions can be set up as per the runner.
- PHP 5.3 to PHP 8.2 on GitHub-hosted runners. - PHP 5.3 to PHP 8.3 on GitHub-hosted runners.
- PHP 5.6 to PHP 8.2 on self-hosted runners. - PHP 5.6 to PHP 8.3 on self-hosted runners.
| PHP Version | Stability | Release Support | Runner Support | | PHP Version | Stability | Release Support | Runner Support |
|-------------|-----------|-----------------------|--------------------------------| |-------------|-----------|-----------------------|--------------------------------|
@@ -118,13 +117,14 @@ On all supported OS/Platforms the following PHP versions are supported as per th
| `7.1` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` | | `7.1` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` |
| `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` | `Security fixes only` | `GitHub-hosted`, `self-hosted` | | `7.4` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` |
| `8.0` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` | | `8.0` | `Stable` | `Security fixes only` | `GitHub-hosted`, `self-hosted` |
| `8.1` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` | | `8.1` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` |
| `8.2` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` | | `8.2` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` |
| `8.3` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` |
**Notes:** **Notes:**
- Specifying `8.2` in `php-version` input installs a nightly build of `PHP 8.2.0-dev`. See [nightly build setup](#nightly-build-setup) for more information. - Specifying `8.3` in `php-version` input installs a nightly build of `PHP 8.3.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
@@ -137,7 +137,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.1' php-version: '8.2'
extensions: imagick, swoole extensions: imagick, swoole
``` ```
@@ -165,7 +165,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.1' php-version: '8.2'
extensions: xdebug-beta extensions: xdebug-beta
``` ```
@@ -177,7 +177,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.1' php-version: '8.2'
extensions: :opcache extensions: :opcache
``` ```
@@ -189,7 +189,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.1' php-version: '8.2'
extensions: none, mbstring extensions: none, mbstring
``` ```
@@ -199,15 +199,15 @@ 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.1' php-version: '8.2'
extensions: intl-70.1 extensions: intl-70.1
``` ```
- Extensions loaded by default after `setup-php` runs can be found on the [wiki](https://github.com/shivammathur/setup-php/wiki). - Extensions loaded by default after `setup-php` runs can be found on the [wiki](https://github.com/shivammathur/setup-php/wiki).
- These extensions have custom support: - These extensions have custom support:
- `cubrid`, `pdo_cubrid` and `gearman` on `Ubuntu`. - `cubrid` and `pdo_cubrid` on `Ubuntu`.
- `geos` and `event` on `Ubuntu` and `macOS`. - `gearman`, `geos` and `event` on `Ubuntu` and `macOS`.
- `blackfire`, `couchbase`, `ioncube`, `oci8`, `pdo_firebird`, `pdo_oci`, `pecl_http`, `phalcon3`, `phalcon4` and `phalcon5` on all supported OS. - `blackfire`, `couchbase`, `ioncube`, `oci8`, `pdo_firebird`, `pdo_oci`, `pecl_http`, `phalcon3`, `phalcon4` and `phalcon5` on all supported OS.
- By default, extensions which cannot be added or disabled gracefully leave an error message in the logs, the execution is not interrupted. To change this behaviour you can set `fail-fast` flag to `true`. - By default, extensions which cannot be added or disabled gracefully leave an error message in the logs, the execution is not interrupted. To change this behaviour you can set `fail-fast` flag to `true`.
@@ -216,7 +216,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.1' php-version: '8.2'
extensions: oci8 extensions: oci8
env: env:
fail-fast: true fail-fast: true
@@ -232,7 +232,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.1' php-version: '8.2'
tools: php-cs-fixer, phpunit tools: php-cs-fixer, phpunit
``` ```
@@ -242,7 +242,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.1' php-version: '8.2'
tools: vimeo/psalm tools: vimeo/psalm
``` ```
@@ -262,19 +262,19 @@ 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.1' php-version: '8.2'
tools: php-cs-fixer:3.5, phpunit:9.5 tools: php-cs-fixer:3.5, phpunit:9.5
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
``` ```
- The latest stable version of `composer` is set up by default. You can set up the required `composer` version by specifying the major version `v1` or `v2`, or the version in `major.minor` or `semver` format. Additionally for composer `snapshot` and `preview` can also be specified to set up the respective releases. - The latest stable version of `composer` is set up by default. You can set up the required `composer` version by specifying the major version `v1` or `v2`, or the version in `major.minor` or `semver` format. Additionally, for composer `snapshot` and `preview` can also be specified to set up the respective releases.
```yaml ```yaml
- 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.1' php-version: '8.2'
tools: composer:v2 tools: composer:v2
``` ```
@@ -284,7 +284,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.1' php-version: '8.2'
tools: none tools: none
``` ```
@@ -300,7 +300,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.1' php-version: '8.2'
tools: deployer tools: deployer
env: env:
fail-fast: true fail-fast: true
@@ -323,7 +323,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.1' php-version: '8.2'
coverage: xdebug coverage: xdebug
``` ```
@@ -351,7 +351,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.1' php-version: '8.2'
ini-values: pcov.directory=api #optional, see above for usage. ini-values: pcov.directory=api #optional, see above for usage.
coverage: pcov coverage: pcov
``` ```
@@ -381,7 +381,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.1' php-version: '8.2'
coverage: none coverage: none
``` ```
@@ -445,7 +445,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.1' php-version: '8.2'
- name: Print PHP version - name: Print PHP version
run: echo ${{ steps.setup-php.outputs.php-version }} run: echo ${{ steps.setup-php.outputs.php-version }}
@@ -464,7 +464,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 thread-safe version of PHP on Windows. - Specify to set up a thread-safe build of PHP on Linux and Windows.
- Accepts `ts` and `nts`. - Accepts `ts` and `nts`.
- 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.
@@ -487,7 +487,7 @@ steps:
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.1' php-version: '8.2'
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
@@ -505,7 +505,7 @@ jobs:
strategy: strategy:
matrix: matrix:
operating-system: ['ubuntu-latest', 'windows-latest', 'macos-latest'] operating-system: ['ubuntu-latest', 'windows-latest', 'macos-latest']
php-versions: ['7.4', '8.0', '8.1'] php-versions: ['8.0', '8.1', '8.2']
phpunit-versions: ['latest'] phpunit-versions: ['latest']
include: include:
- operating-system: 'ubuntu-latest' - operating-system: 'ubuntu-latest'
@@ -524,7 +524,7 @@ jobs:
### Nightly Build Setup ### Nightly Build Setup
> Set up a nightly build of `PHP 8.2`. > Set up a nightly build of `PHP 8.3`.
- This PHP version is currently in active development and might contain bugs and breaking changes. - This PHP version is 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.
@@ -534,7 +534,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.2' php-version: '8.3'
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
@@ -553,29 +553,29 @@ 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.1' php-version: '8.2'
env: env:
debug: true # specify true or false debug: true # specify true or false
``` ```
### Thread Safe Setup ### Thread Safe Setup
> Set up `TS` or `NTS` PHP on `Windows`. > Set up `TS` or `NTS` PHP on `Linux` and `Windows`.
- `NTS` versions are set up by default. - `NTS` versions are set up by default.
- On `Ubuntu` and `macOS` only `NTS` versions are supported. - On `macOS` only `NTS` versions are supported currently.
- On `Windows` both `TS` and `NTS` versions are supported. - On `Linux` and `Windows` both `TS` and `NTS` versions are supported.
```yaml ```yaml
jobs: jobs:
run: run:
runs-on: windows-latest runs-on: [ubuntu-latest, windows-latest]
name: Setup PHP TS on Windows name: Setup PHP TS
steps: steps:
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.1' php-version: '8.2'
env: env:
phpts: ts # specify ts or nts phpts: ts # specify ts or nts
``` ```
@@ -592,7 +592,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.1' php-version: '8.2'
env: env:
update: true # specify true or false update: true # specify true or false
``` ```
@@ -607,14 +607,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.1' php-version: '8.2'
``` ```
### 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.1` are supported by `setup-php` on multiple architecture on `Ubuntu`. - `PHP 5.6` to `PHP 8.2` 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).
@@ -630,7 +630,7 @@ jobs:
- name: Install PHP - name: Install PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.1' php-version: '8.2'
``` ```
### Self Hosted Setup ### Self Hosted Setup
@@ -652,7 +652,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'] php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
name: PHP ${{ matrix.php-versions }} name: PHP ${{ matrix.php-versions }}
steps: steps:
- name: Setup PHP - name: Setup PHP
@@ -680,7 +680,7 @@ jobs:
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.1' php-version: '8.2'
``` ```
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.
@@ -716,7 +716,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.1' php-version: '8.2'
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
``` ```
@@ -769,7 +769,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.1' php-version: '8.2'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
``` ```
@@ -782,7 +782,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.1' php-version: '8.2'
env: env:
PACKAGIST_TOKEN: ${{ secrets.PACKAGIST_TOKEN }} PACKAGIST_TOKEN: ${{ secrets.PACKAGIST_TOKEN }}
``` ```
@@ -796,7 +796,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.1' php-version: '8.2'
env: env:
COMPOSER_AUTH_JSON: | COMPOSER_AUTH_JSON: |
{ {
@@ -819,7 +819,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.1' php-version: '8.2'
- name: Run PHP code - name: Run PHP code
shell: php {0} shell: php {0}
@@ -859,7 +859,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.1' php-version: '8.2'
tools: phpstan tools: phpstan
- name: Run PHPStan - name: Run PHPStan
@@ -874,7 +874,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.1' php-version: '8.2'
tools: psalm tools: psalm
- name: Run Psalm - name: Run Psalm
@@ -884,7 +884,7 @@ Psalm supports error reporting in GitHub Actions with an output format `github`.
#### Tools with checkstyle support #### Tools with checkstyle support
For tools that support `checkstyle` reporting like `phpstan`, `psalm`, `php-cs-fixer` and `phpcs` you can use `cs2pr` to annotate your code. For tools that support `checkstyle` reporting like `phpstan`, `psalm`, `php-cs-fixer` and `phpcs` you can use `cs2pr` to annotate your code.
For examples refer to [cs2pr documentation](https://github.com/staabm/annotate-pull-request-from-checkstyle). For examples refer to the [cs2pr documentation](https://github.com/staabm/annotate-pull-request-from-checkstyle).
> Here is an example with `phpcs`. > Here is an example with `phpcs`.
@@ -892,7 +892,7 @@ For examples refer to [cs2pr documentation](https://github.com/staabm/annotate-p
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.1' php-version: '8.2'
tools: cs2pr, phpcs tools: cs2pr, phpcs
- name: Run phpcs - name: Run phpcs
+3 -3
View File
@@ -93,7 +93,6 @@ describe('Extension tests', () => {
${'pdo_oci'} | ${'7.3'} | ${'add_oci pdo_oci'} ${'pdo_oci'} | ${'7.3'} | ${'add_oci pdo_oci'}
${'pecl_http'} | ${'7.3'} | ${'add_http'} ${'pecl_http'} | ${'7.3'} | ${'add_http'}
${'sqlite'} | ${'7.2'} | ${'add_extension sqlite3'} ${'sqlite'} | ${'7.2'} | ${'add_extension sqlite3'}
${'sqlsrv'} | ${'7.3'} | ${'add_sqlsrv sqlsrv'}
`( `(
'checking addExtensionOnDarwin for extension $extension on version $version', 'checking addExtensionOnDarwin for extension $extension on version $version',
async ({extension, version, output}) => { async ({extension, version, output}) => {
@@ -112,10 +111,11 @@ describe('Extension tests', () => {
const [formula, extension]: string[] = line.split('='); const [formula, extension]: string[] = line.split('=');
const prefix: string = const prefix: string =
extension == 'xdebug' ? 'zend_extension' : 'extension'; extension == 'xdebug' ? 'zend_extension' : 'extension';
const ext_name = extension.replace(/\d+|(pdo|pecl)[_-]/, '');
const output: string = fs.existsSync( const output: string = fs.existsSync(
`src/scripts/extensions/${extension}.sh` `src/scripts/extensions/${ext_name}.sh`
) )
? `add_${extension}` ? `add_${ext_name}`
: `add_brew_extension ${formula} ${prefix}`; : `add_brew_extension ${formula} ${prefix}`;
return [formula, formula === 'phalcon3' ? '7.3' : '7.4', output]; return [formula, formula === 'phalcon3' ? '7.3' : '7.4', output];
}); });
+1 -1
View File
@@ -421,7 +421,7 @@ describe('Tools tests', () => {
'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/ergebnis/composer-normalize/releases/latest/download/composer-normalize.phar composer-normalize "-V"', 'add_tool https://github.com/ergebnis/composer-normalize/releases/latest/download/composer-normalize.phar composer-normalize "-V"',
'add_composertool composer-require-checker composer-require-checker maglnet/ scoped', 'add_composertool composer-require-checker composer-require-checker maglnet/ scoped',
'add_composertool composer-unused composer-unused icanhazstring/ scoped', 'add_tool https://github.com/composer-unused/composer-unused/releases/latest/download/composer-unused.phar composer-unused "-V"',
'add_tool https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/download/1.2.3/cs2pr cs2pr "-V"', 'add_tool https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/download/1.2.3/cs2pr cs2pr "-V"',
'add_composertool flex flex symfony/ global', 'add_composertool flex flex symfony/ global',
'add_grpc_php_plugin 1.2.3', 'add_grpc_php_plugin 1.2.3',
+3
View File
@@ -109,6 +109,9 @@ describe('Utils tests', () => {
expect( expect(
await utils.CSVArray('a=E_ALL, b=E_ALL & ~ E_ALL, c="E_ALL", d=\'E_ALL\'') await utils.CSVArray('a=E_ALL, b=E_ALL & ~ E_ALL, c="E_ALL", d=\'E_ALL\'')
).toEqual(['a=E_ALL', 'b=E_ALL & ~ E_ALL', 'c=E_ALL', 'd=E_ALL']); ).toEqual(['a=E_ALL', 'b=E_ALL & ~ E_ALL', 'c=E_ALL', 'd=E_ALL']);
expect(
await utils.CSVArray('a="b=c;d=e", b=\'c=d,e\', c="g=h,i=j", d=g=h, a===')
).toEqual(["a='b=c;d=e'", "b='c=d,e'", "c='g=h,i=j'", "d='g=h'", "a='=='"]);
expect(await utils.CSVArray('')).toEqual([]); expect(await utils.CSVArray('')).toEqual([]);
expect(await utils.CSVArray(' ')).toEqual([]); expect(await utils.CSVArray(' ')).toEqual([]);
}); });
+1 -1
View File
@@ -7,7 +7,7 @@ branding:
inputs: inputs:
php-version: php-version:
description: 'Setup PHP version.' description: 'Setup PHP version.'
default: '8.1' default: '8.2'
required: true required: true
extensions: extensions:
description: 'Setup PHP extensions.' description: 'Setup PHP extensions.'
+9 -7
View File
@@ -244,8 +244,8 @@ async function addExtensionDarwin(extension_csv, version) {
case /.+-.+\/.+@.+/.test(extension): case /.+-.+\/.+@.+/.test(extension):
add_script += await utils.parseExtensionSource(extension, ext_prefix); add_script += await utils.parseExtensionSource(extension, ext_prefix);
return; return;
case /^(5\.[3-6]|7\.[0-4]|8\.[0-1])blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension): case /^(5\.[3-6]|7\.[0-4]|8\.[0-2])blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension):
case /^couchbase|^event|^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):
case /(?<!5\.[3-6])(pdo_)?sqlsrv$/.test(version_extension): case /(?<!5\.[3-6])(pdo_)?sqlsrv$/.test(version_extension):
@@ -261,7 +261,8 @@ async function addExtensionDarwin(extension_csv, version) {
add_script += await utils.getUnsupportedLog('pcov', version, 'darwin'); add_script += await utils.getUnsupportedLog('pcov', version, 'darwin');
return; return;
case /(?<!5\.[3-5])(amqp|apcu|expect|gnupg|grpc|igbinary|imagick|imap|mailparse|mcrypt|memcache|memcached|mongodb|msgpack|protobuf|psr|raphf|rdkafka|redis|ssh2|swoole|xdebug|xdebug2|yaml|zmq)/.test(version_extension): case /(?<!5\.[3-5])(amqp|apcu|expect|gnupg|grpc|igbinary|imagick|imap|mailparse|mcrypt|memcache|memcached|mongodb|msgpack|protobuf|psr|raphf|rdkafka|redis|ssh2|swoole|xdebug|xdebug2|yaml|zmq)/.test(version_extension):
case /(5\.6|7\.[0-4])propro/.test(version_extension): case /(?<!5\.[3-6])(ds|v8js)/.test(version_extension):
case /(5\.6|7\.[0-4])(propro|lua)/.test(version_extension):
case /(?<!5\.[3-6]|7\.0)pcov/.test(version_extension): case /(?<!5\.[3-6]|7\.0)pcov/.test(version_extension):
case /(?<!5\.[3-6])(ast|vips|xlswriter)/.test(version_extension): case /(?<!5\.[3-6])(ast|vips|xlswriter)/.test(version_extension):
add_script += await utils.joins('\nadd_brew_extension', ext_name, ext_prefix); add_script += await utils.joins('\nadd_brew_extension', ext_name, ext_prefix);
@@ -292,7 +293,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\.1)blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension): case /^(5\.[3-6]|7\.[0-4]|8\.[0-2])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):
@@ -357,10 +358,10 @@ async function addExtensionLinux(extension_csv, version) {
case /.+-.+\/.+@.+/.test(extension): case /.+-.+\/.+@.+/.test(extension):
add_script += await utils.parseExtensionSource(extension, ext_prefix); add_script += await utils.parseExtensionSource(extension, ext_prefix);
return; return;
case /^(5\.[3-6]|7\.[0-4]|8\.[0-1])blackfire(-\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-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):
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):
case /(?<!5\.[3-6])(pdo_)?sqlsrv$/.test(version_extension): case /(?<!5\.[3-6])(pdo_)?sqlsrv$/.test(version_extension):
@@ -1171,7 +1172,8 @@ async function CSVArray(values_csv) {
return value return value
.trim() .trim()
.replace(/^["']|["']$|(?<==)["']/g, '') .replace(/^["']|["']$|(?<==)["']/g, '')
.replace(/=(((?!E_).)*[?{}|&~![()^]+((?!E_).)+)/, "='$1'"); .replace(/=(((?!E_).)*[?{}|&~![()^]+((?!E_).)+)/, "='$1'")
.replace(/=(.*?)(=.*)/, "='$1$2'");
}) })
.filter(Boolean); .filter(Boolean);
} }
+917 -909
View File
File diff suppressed because it is too large Load Diff
+12 -12
View File
@@ -1,6 +1,6 @@
{ {
"name": "setup-php", "name": "setup-php",
"version": "2.22.0", "version": "2.23.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",
@@ -39,23 +39,23 @@
"@actions/io": "^1.1.2" "@actions/io": "^1.1.2"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^29.2.0", "@types/jest": "^29.2.4",
"@types/node": "^18.11.7", "@types/node": "^18.11.17",
"@typescript-eslint/eslint-plugin": "^5.41.0", "@typescript-eslint/eslint-plugin": "^5.47.0",
"@typescript-eslint/parser": "^5.41.0", "@typescript-eslint/parser": "^5.47.0",
"@vercel/ncc": "^0.34.0", "@vercel/ncc": "^0.36.0",
"eslint": "^8.26.0", "eslint": "^8.30.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0", "eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^27.1.3", "eslint-plugin-jest": "^27.1.7",
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^4.2.1",
"jest": "^29.2.2", "jest": "^29.3.1",
"jest-circus": "^29.2.2", "jest-circus": "^29.3.1",
"nock": "^13.2.9", "nock": "^13.2.9",
"prettier": "^2.7.1", "prettier": "^2.8.1",
"simple-git-hooks": "^2.8.1", "simple-git-hooks": "^2.8.1",
"ts-jest": "^29.0.3", "ts-jest": "^29.0.3",
"typescript": "^4.8.4" "typescript": "^4.9.4"
}, },
"bugs": { "bugs": {
"url": "https://github.com/shivammathur/setup-php/issues" "url": "https://github.com/shivammathur/setup-php/issues"
+6
View File
@@ -2,13 +2,16 @@ amqp=amqp
apcu=apcu apcu=apcu
ast=ast ast=ast
couchbase=couchbase couchbase=couchbase
ds=ds
event=event event=event
expect=expect expect=expect
gearman=gearman
gnupg=gnupg gnupg=gnupg
grpc=grpc grpc=grpc
igbinary=igbinary igbinary=igbinary
imagick=imagick imagick=imagick
imap=imap imap=imap
lua=lua
mailparse=mailparse mailparse=mailparse
mcrypt=mcrypt mcrypt=mcrypt
memcache=memcache memcache=memcache
@@ -16,6 +19,7 @@ memcached=memcached
mongodb=mongodb mongodb=mongodb
msgpack=msgpack msgpack=msgpack
pcov=pcov pcov=pcov
pdo_sqlsrv=pdo_sqlsrv
pecl_http=http pecl_http=http
phalcon3=phalcon phalcon3=phalcon
phalcon4=phalcon phalcon4=phalcon
@@ -26,8 +30,10 @@ psr=psr
raphf=raphf raphf=raphf
rdkafka=rdkafka rdkafka=rdkafka
redis=redis redis=redis
sqlsrv=sqlsrv
ssh2=ssh2 ssh2=ssh2
swoole=swoole swoole=swoole
v8js=v8js
vips=vips vips=vips
xdebug=xdebug xdebug=xdebug
xdebug2=xdebug xdebug2=xdebug
+3 -3
View File
@@ -1,7 +1,7 @@
{ {
"latest": "8.1", "latest": "8.2",
"nightly": "8.2", "nightly": "8.3",
"5.x": "5.6", "5.x": "5.6",
"7.x": "7.4", "7.x": "7.4",
"8.x": "8.1" "8.x": "8.2"
} }
+8 -5
View File
@@ -7,6 +7,14 @@
"version_prefix": "", "version_prefix": "",
"version_parameter": "-V" "version_parameter": "-V"
}, },
"composer-unused": {
"type": "phar",
"repository": "composer-unused/composer-unused",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "",
"version_parameter": "-V"
},
"composer-normalize": { "composer-normalize": {
"type": "phar", "type": "phar",
"repository": "ergebnis/composer-normalize", "repository": "ergebnis/composer-normalize",
@@ -142,11 +150,6 @@
"repository": "maglnet/composer-require-checker", "repository": "maglnet/composer-require-checker",
"scope": "scoped" "scope": "scoped"
}, },
"composer-unused": {
"type": "composer",
"repository": "icanhazstring/composer-unused",
"scope": "scoped"
},
"flex": { "flex": {
"type": "composer", "type": "composer",
"repository": "symfony/flex", "repository": "symfony/flex",
+2
View File
@@ -0,0 +1,2 @@
xdebug
pcov
+11 -13
View File
@@ -31,15 +31,15 @@ export async function addExtensionDarwin(
case /.+-.+\/.+@.+/.test(extension): case /.+-.+\/.+@.+/.test(extension):
add_script += await utils.parseExtensionSource(extension, ext_prefix); add_script += await utils.parseExtensionSource(extension, ext_prefix);
return; return;
// match 5.3blackfire...8.1blackfire // match 5.3blackfire...8.2blackfire
// match 5.3blackfire-(semver)...8.1blackfire-(semver) // match 5.3blackfire-(semver)...8.1blackfire-(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
case /^(5\.[3-6]|7\.[0-4]|8\.[0-1])blackfire(-\d+\.\d+\.\d+)?$/.test( case /^(5\.[3-6]|7\.[0-4]|8\.[0-2])blackfire(-\d+\.\d+\.\d+)?$/.test(
version_extension version_extension
): ):
case /^couchbase|^event|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test( case /^couchbase|^event|^gearman$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(
extension extension
): ):
case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension): case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension):
@@ -76,14 +76,12 @@ export async function addExtensionDarwin(
case /(5\.[3-6]|7\.0)pcov/.test(version_extension): case /(5\.[3-6]|7\.0)pcov/.test(version_extension):
add_script += await utils.getUnsupportedLog('pcov', version, 'darwin'); add_script += await utils.getUnsupportedLog('pcov', version, 'darwin');
return; return;
// match 5.6 and newer - amqp, apcu, expect, gnupg, grpc, igbinary, imagick, imap, memcache, memcached, mongodb, msgpack, protobuf, raphf, rdkafka, redis, ssh2, swoole, xdebug, xdebug2, yaml, zmq // match brew extensions
// match 7.1 and newer - pcov
// match 5.6 to 7.4 - propro
// match 7.0 and newer - vips, xlswriter
case /(?<!5\.[3-5])(amqp|apcu|expect|gnupg|grpc|igbinary|imagick|imap|mailparse|mcrypt|memcache|memcached|mongodb|msgpack|protobuf|psr|raphf|rdkafka|redis|ssh2|swoole|xdebug|xdebug2|yaml|zmq)/.test( case /(?<!5\.[3-5])(amqp|apcu|expect|gnupg|grpc|igbinary|imagick|imap|mailparse|mcrypt|memcache|memcached|mongodb|msgpack|protobuf|psr|raphf|rdkafka|redis|ssh2|swoole|xdebug|xdebug2|yaml|zmq)/.test(
version_extension version_extension
): ):
case /(5\.6|7\.[0-4])propro/.test(version_extension): case /(?<!5\.[3-6])(ds|v8js)/.test(version_extension):
case /(5\.6|7\.[0-4])(propro|lua)/.test(version_extension):
case /(?<!5\.[3-6]|7\.0)pcov/.test(version_extension): case /(?<!5\.[3-6]|7\.0)pcov/.test(version_extension):
case /(?<!5\.[3-6])(ast|vips|xlswriter)/.test(version_extension): case /(?<!5\.[3-6])(ast|vips|xlswriter)/.test(version_extension):
add_script += await utils.joins( add_script += await utils.joins(
@@ -130,13 +128,13 @@ 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.1blackfire // match 5.3blackfire...8.2blackfire
// match 5.3blackfire-(semver)...8.1blackfire-(semver) // match 5.3blackfire-(semver)...8.1blackfire-(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
case /^(5\.[3-6]|7\.[0-4]|8\.1)blackfire(-\d+\.\d+\.\d+)?$/.test( case /^(5\.[3-6]|7\.[0-4]|8\.[0-2])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):
@@ -254,13 +252,13 @@ export async function addExtensionLinux(
case /.+-.+\/.+@.+/.test(extension): case /.+-.+\/.+@.+/.test(extension):
add_script += await utils.parseExtensionSource(extension, ext_prefix); add_script += await utils.parseExtensionSource(extension, ext_prefix);
return; return;
// match 5.3blackfire...8.1blackfire // match 5.3blackfire...8.2blackfire
// match 5.3blackfire-(semver)...8.1blackfire-(semver) // match 5.3blackfire-(semver)...8.1blackfire-(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
case /^(5\.[3-6]|7\.[0-4]|8\.[0-1])blackfire(-\d+\.\d+\.\d+)?$/.test( case /^(5\.[3-6]|7\.[0-4]|8\.[0-2])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(
@@ -269,7 +267,7 @@ export async function addExtensionLinux(
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(
extension extension
): ):
case /(?<!5\.[3-5])intl-[\d]+\.[\d]+$/.test(version_extension): case /(?<!5\.[3-5])intl-\d+\.\d+$/.test(version_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( case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-2])phalcon5$/.test(
version_extension version_extension
+9 -6
View File
@@ -28,7 +28,7 @@ disable_extension_helper() {
get_extension_from_formula() { get_extension_from_formula() {
local formula=$1 local formula=$1
local extension local extension
extension=$(grep "$formula=" "$src"/configs/brew_extensions | cut -d '=' -f 2) extension=$(grep -E "^$formula=" "$src"/configs/brew_extensions | cut -d '=' -f 2)
[[ -z "$extension" ]] && extension="$(echo "$formula" | sed -E "s/pecl_|[0-9]//g")" [[ -z "$extension" ]] && extension="$(echo "$formula" | sed -E "s/pecl_|[0-9]//g")"
echo "$extension" echo "$extension"
} }
@@ -125,10 +125,13 @@ update_dependencies() {
patch_brew patch_brew
if ! [ -e /tmp/update_dependencies ]; then if ! [ -e /tmp/update_dependencies ]; then
if [ "${runner:?}" != "self-hosted" ] && [ "${ImageOS:-}" != "" ] && [ "${ImageVersion:-}" != "" ]; then if [ "${runner:?}" != "self-hosted" ] && [ "${ImageOS:-}" != "" ] && [ "${ImageVersion:-}" != "" ]; then
while read -r dependency; do deps_file="$tap_dir/$php_tap/.github/deps/${ImageOS:?}_${ImageVersion:?}"
update_dependencies_helper "$dependency" & if [ -e "$deps_file" ]; then
to_wait+=($!) while read -r dependency; do
done <"$tap_dir/$php_tap/.github/deps/${ImageOS:?}_${ImageVersion:?}" update_dependencies_helper "$dependency" &
to_wait+=($!)
done <"$deps_file"
fi
wait "${to_wait[@]}" wait "${to_wait[@]}"
else else
git -C "$core_repo" fetch origin master && git -C "$core_repo" reset --hard origin/master git -C "$core_repo" fetch origin master && git -C "$core_repo" reset --hard origin/master
@@ -241,7 +244,7 @@ setup_php() {
} }
# Variables # Variables
version=${1:-'8.1'} version=${1:-'8.2'}
ini=${2:-'production'} ini=${2:-'production'}
src=${0%/*}/.. src=${0%/*}/..
php_formula=shivammathur/php/php@"$version" php_formula=shivammathur/php/php@"$version"
+55 -18
View File
@@ -6,8 +6,9 @@ Function Set-ExtensionPrerequisites
[ValidateNotNull()] [ValidateNotNull()]
[ValidateLength(1, [int]::MaxValue)] [ValidateLength(1, [int]::MaxValue)]
[string] [string]
$deps_dir $extension
) )
$deps_dir = "$ext_dir\$extension-vc$($installed.VCVersion)-$arch"
$deps = Get-ChildItem -Recurse -Path $deps_dir $deps = Get-ChildItem -Recurse -Path $deps_dir
if ($deps.Count -ne 0) { if ($deps.Count -ne 0) {
# Symlink dependencies instead of adding the directory to PATH ... # Symlink dependencies instead of adding the directory to PATH ...
@@ -20,6 +21,41 @@ Function Set-ExtensionPrerequisites
} }
} }
# Function to enable extension.
Function Enable-Extension() {
Param (
[Parameter(Position = 0, Mandatory = $true)]
[ValidateNotNull()]
[ValidateLength(1, [int]::MaxValue)]
[string]
$extension
)
Enable-ExtensionDependencies $extension
Enable-PhpExtension -Extension $extension -Path $php_dir
Set-ExtensionPrerequisites $extension
Add-Log $tick $extension "Enabled"
}
# Function to add custom built PHP extension for nightly builds.
Function Add-NightlyExtension {
Param (
[Parameter(Position = 0, Mandatory = $true)]
[ValidateNotNull()]
[ValidateLength(1, [int]::MaxValue)]
[string]
$extension
)
if($ts) { $ts_part = 'ts' } else { $ts_part = 'nts' }
$repo = "$github/shivammathur/php-extensions-windows"
$url = "$repo/releases/download/builds/php$version`_$ts_part`_$arch`_$extension.dll"
Invoke-WebRequest -UseBasicParsing -Uri $url -OutFile "$ext_dir\php_$extension.dll"
if(Test-Path "$ext_dir\php_$extension.dll") {
Enable-Extension $extension > $null
} else {
throw "Failed to download the $extension"
}
}
# Function to add PHP extensions. # Function to add PHP extensions.
Function Add-Extension { Function Add-Extension {
Param ( Param (
@@ -52,31 +88,32 @@ Function Add-Extension {
Add-Log $tick $extension "Enabled" Add-Log $tick $extension "Enabled"
} }
default { default {
Enable-ExtensionDependencies $extension Enable-Extension $extension_info.Handle
Enable-PhpExtension -Extension $extension_info.Handle -Path $php_dir
Set-ExtensionPrerequisites $deps_dir
Add-Log $tick $extension "Enabled"
} }
} }
} }
else { else {
# Patch till PHP 8.1 DLLs are released as stable. if(($version -match $nightly_versions) -and (Select-String -Path $src\configs\windows_extensions -Pattern $extension -SimpleMatch -Quiet)) {
$minimumStability = $stability Add-NightlyExtension $extension
if($version -eq '8.1' -and $stability -eq 'stable') { } else {
$minimumStability = 'snapshot' # Patch till DLLs for PHP 8.1 and 8.2 are released as stable.
} $minimumStability = $stability
if ($version -match '8.[1-2]' -and $stability -eq 'stable') {
$minimumStability = 'snapshot'
}
$params = @{ Extension = $extension; MinimumStability = $minimumStability; MaximumStability = $stability; Path = $php_dir; AdditionalFilesPath = $deps_dir; NoDependencies = $true } $params = @{ Extension = $extension; MinimumStability = $minimumStability; MaximumStability = $stability; Path = $php_dir; AdditionalFilesPath = $deps_dir; NoDependencies = $true }
if($extension_version -ne '') { if ($extension_version -ne '')
$params["Version"] = $extension_version {
$params["Version"] = $extension_version
}
Install-PhpExtension @params
Set-ExtensionPrerequisites $extension
} }
Install-PhpExtension @params
Set-ExtensionPrerequisites $deps_dir
Add-Log $tick $extension "Installed and enabled" Add-Log $tick $extension "Installed and enabled"
} }
} } catch {
catch { Add-Log $cross $extension "Could not install $extension on PHP $( $installed.FullVersion )"
Add-Log $cross $extension "Could not install $extension on PHP $($installed.FullVersion)"
} }
} }
+6 -2
View File
@@ -17,6 +17,10 @@ add_gearman_helper() {
# Function to add gearman extension. # Function to add gearman extension.
add_gearman() { add_gearman() {
status="Enabled" status="Enabled"
add_gearman_helper >/dev/null 2>&1 if [ "$(uname -s)" = 'Linux' ]; then
add_extension_log "gearman" "$status" add_gearman_helper >/dev/null 2>&1
add_extension_log "gearman" "$status"
else
add_brew_extension gearman extension
fi
} }
+33 -9
View File
@@ -1,3 +1,34 @@
# Function to get the url of the phalcon release asset.
Function Get-PhalconReleaseAssetUrl() {
Param (
[Parameter(Position = 0, Mandatory = $true)]
[ValidateNotNull()]
[string]
$Semver
)
$domain = 'https://api.github.com/repos'
$releases = 'phalcon/cphalcon/releases'
if($extension_version -match '[3-4]') {
$nts = if (!$installed.ThreadSafe) { "_nts" } else { "" }
try {
$match = (Invoke-RestMethod -Uri "$domain/$releases/tags/v$Semver").assets | Select-String -Pattern "browser_download_url=.*(phalcon_${arch}_.*_php${version}_${extension_version}.*[0-9]${nts}.zip)"
} catch {
$match = (Invoke-WebRequest -Uri "$github/$releases/expanded_assets/v$Semver").Links.href | Select-String -Pattern "(phalcon_${arch}_.*_php${version}_${extension_version}.*[0-9]${nts}.zip)"
}
} else {
$nts = if (!$installed.ThreadSafe) { "-nts" } else { "-ts" }
try {
$match = (Invoke-RestMethod -Uri "$domain/$releases/tags/v$Semver").assets | Select-String -Pattern "browser_download_url=.*(phalcon-php${version}${nts}-windows.*-x64.zip)"
} catch {
$match = (Invoke-WebRequest -Uri "$github/$releases/expanded_assets/v$Semver").Links.href | Select-String -Pattern "(phalcon-php${version}${nts}-windows.*-x64.zip)"
}
}
if($NULL -ne $match) {
return "$github/$releases/download/v$Semver/$($match.Matches[0].Groups[1].Value)"
}
return false;
}
# Function to add phalcon using GitHub releases. # Function to add phalcon using GitHub releases.
Function Add-PhalconFromGitHub() { Function Add-PhalconFromGitHub() {
Param ( Param (
@@ -6,15 +37,8 @@ Function Add-PhalconFromGitHub() {
[string] [string]
$Semver $Semver
) )
$domain = 'https://api.github.com/repos' $zip_url = Get-PhalconReleaseAssetUrl $Semver
$nts = if (!$installed.ThreadSafe) { "_nts" } else { "" } if($zip_url) {
$match = $match = (Invoke-RestMethod -Uri "$domain/phalcon/cphalcon/releases/tags/v$Semver").assets | Select-String -Pattern "browser_download_url=(.*phalcon_${arch}_.*_php${version}_${extension_version}.*[0-9]${nts}.zip)"
if($NULL -eq $match) {
$nts = if (!$installed.ThreadSafe) { "-nts" } else { "-ts" }
$match = (Invoke-RestMethod -Uri "$domain/phalcon/cphalcon/releases/tags/v$Semver").assets | Select-String -Pattern "browser_download_url=(.*phalcon-php${version}${nts}-windows.*-x64.zip)"
}
if($NULL -ne $match) {
$zip_url = $match.Matches[0].Groups[1].Value
Invoke-WebRequest -Uri $zip_url -OutFile $ENV:RUNNER_TOOL_CACHE\phalcon.zip > $null 2>&1 Invoke-WebRequest -Uri $zip_url -OutFile $ENV:RUNNER_TOOL_CACHE\phalcon.zip > $null 2>&1
Expand-Archive -Path $ENV:RUNNER_TOOL_CACHE\phalcon.zip -DestinationPath $ENV:RUNNER_TOOL_CACHE\phalcon -Force > $null 2>&1 Expand-Archive -Path $ENV:RUNNER_TOOL_CACHE\phalcon.zip -DestinationPath $ENV:RUNNER_TOOL_CACHE\phalcon -Force > $null 2>&1
Copy-Item -Path "$ENV:RUNNER_TOOL_CACHE\phalcon\php_phalcon.dll" -Destination "$ext_dir\php_phalcon.dll" Copy-Item -Path "$ENV:RUNNER_TOOL_CACHE\phalcon\php_phalcon.dll" -Destination "$ext_dir\php_phalcon.dll"
+6 -10
View File
@@ -7,18 +7,14 @@ get_sqlsrv_version() {
fi fi
} }
add_unixodbc() {
if [ "$(uname -s)" = 'Linux' ]; then
install_packages unixodbc-dev
else
brew install unixodbc
fi
}
# Function to install sqlsrv and pdo_sqlsrv. # Function to install sqlsrv and pdo_sqlsrv.
add_sqlsrv() { add_sqlsrv() {
ext=$1 ext=$1
ext_version=$(get_sqlsrv_version) ext_version=$(get_sqlsrv_version)
add_unixodbc >/dev/null 2>&1 if [ "$(uname -s)" = 'Linux' ]; then
add_pecl_extension "$ext" "$ext_version" extension install_packages unixodbc-dev
add_pecl_extension "$ext" "$ext_version" extension
else
add_brew_extension "$ext" extension
fi
} }
+1 -1
View File
@@ -267,7 +267,7 @@ setup_php() {
} }
# Variables # Variables
version=${1:-'8.1'} version=${1:-'8.2'}
ini=${2:-'production'} ini=${2:-'production'}
src=${0%/*}/.. src=${0%/*}/..
debconf_fix="DEBIAN_FRONTEND=noninteractive" debconf_fix="DEBIAN_FRONTEND=noninteractive"
+1 -1
View File
@@ -4,7 +4,7 @@ fetch_brew_tap() {
tap_user=$(dirname "$tap") tap_user=$(dirname "$tap")
tap_name=$(basename "$tap") tap_name=$(basename "$tap")
mkdir -p "$tap_dir/$tap_user" mkdir -p "$tap_dir/$tap_user"
branch="$(get -s -n "" "https://api.github.com/repos/$tap" | grep default_branch | cut -d: -f 2 | grep -Eo '[^\", ]+' | tr -d '\n')" branch="$(git ls-remote --symref "https://github.com/$tap" HEAD | grep -Eo 'refs/heads/.*' | tr '\t' '\n' | head -1 | cut -d '/' -f 3)"
get -s -n "" "https://github.com/$tap/archive/$branch.tar.gz" | sudo tar -xzf - -C "$tap_dir/$tap_user" get -s -n "" "https://github.com/$tap/archive/$branch.tar.gz" | sudo tar -xzf - -C "$tap_dir/$tap_user"
sudo mv "$tap_dir/$tap_user/$tap_name-$branch" "$tap_dir/$tap_user/$tap_name" sudo mv "$tap_dir/$tap_user/$tap_name-$branch" "$tap_dir/$tap_user/$tap_name"
} }
+7 -5
View File
@@ -1,15 +1,17 @@
Function Get-ProtobufTag() { Function Get-ProtobufTag() {
$releases = 'https://github.com/protocolbuffers/protobuf/releases'
if("$protobuf_tag" -eq "latest") { if("$protobuf_tag" -eq "latest") {
$protobuf_tag = (Invoke-RestMethod https://api.github.com/repos/protocolbuffers/protobuf/releases).tag_name | Where-Object { $_ -match "v\d+.\d+.\d+$" } | Select-Object -First 1 $protobuf_tag = (Invoke-WebRequest -UseBasicParsing -Uri $releases/latest).BaseResponse.RequestMessage.RequestUri.Segments[-1]
} else { } else {
try { try {
[net.httpWebRequest] $request = [net.webRequest]::create("https://github.com/protocolbuffers/protobuf/releases/tag/v$protobuf_tag") $protobuf_tag = $protobuf_tag -replace '^v', ''
$req.Method = "HEAD" [net.httpWebRequest] $request = [net.webRequest]::create("$releases/tag/v$protobuf_tag")
$request.Method = "HEAD"
[net.httpWebResponse] $response = $request.getResponse() [net.httpWebResponse] $response = $request.getResponse()
$response.Close() $response.Close()
$protobuf_tag = "v$protobuf_tag" $protobuf_tag = "v$protobuf_tag"
} catch { } catch {
$protobuf_tag = (Invoke-RestMethod https://api.github.com/repos/protocolbuffers/protobuf/releases).tag_name | Where-Object { $_ -match "v\d+.\d+.\d+$" } | Select-Object -First 1 $protobuf_tag = (Invoke-WebRequest -UseBasicParsing -Uri $releases/latest).BaseResponse.RequestMessage.RequestUri.Segments[-1]
} }
} }
return $protobuf_tag return $protobuf_tag
@@ -18,7 +20,7 @@ Function Get-ProtobufTag() {
Function Add-Protoc() { Function Add-Protoc() {
param( param(
[Parameter(Mandatory = $true, Position = 0, HelpMessage = 'The PHP version to be installed')] [Parameter(Mandatory = $true, Position = 0, HelpMessage = 'The PHP version to be installed')]
[ValidatePattern('^latest$|^(v?)\d+\.\d+\.\d+$')] [ValidatePattern('^latest$|^(v?)\d+\.\d+(\.\d+)?$')]
[string] $protobuf_tag [string] $protobuf_tag
) )
$protobuf_tag = Get-ProtobufTag $protobuf_tag = Get-ProtobufTag
+1 -1
View File
@@ -4,7 +4,7 @@ export cross="✗"
export curl_opts=(-sL) export curl_opts=(-sL)
export old_versions="5.[3-5]" export old_versions="5.[3-5]"
export jit_versions="8.[0-9]" export jit_versions="8.[0-9]"
export nightly_versions="8.[2-9]" export nightly_versions="8.[3-9]"
export xdebug3_versions="7.[2-4]|8.[0-9]" export xdebug3_versions="7.[2-4]|8.[0-9]"
export latest="releases/latest/download" export latest="releases/latest/download"
export github="https://github.com/shivammathur" export github="https://github.com/shivammathur"
+17 -5
View File
@@ -3,7 +3,7 @@ param (
[ValidateNotNull()] [ValidateNotNull()]
[ValidateLength(1, [int]::MaxValue)] [ValidateLength(1, [int]::MaxValue)]
[string] [string]
$version = '8.1', $version = '8.2',
[Parameter(Position = 1, Mandatory = $true)] [Parameter(Position = 1, Mandatory = $true)]
[ValidateNotNull()] [ValidateNotNull()]
[ValidateLength(1, [int]::MaxValue)] [ValidateLength(1, [int]::MaxValue)]
@@ -218,10 +218,22 @@ Function Add-PhpConfig {
# Function to get PHP from GitHub releases cache # Function to get PHP from GitHub releases cache
Function Set-PhpCache { Function Set-PhpCache {
try { try {
$release = Invoke-RestMethod https://api.github.com/repos/shivammathur/php-builder-windows/releases/tags/php$version try {
$asset = $release.assets | ForEach-Object { $release = Invoke-RestMethod https://api.github.com/repos/shivammathur/php-builder-windows/releases/tags/php$version
if($_.name -match "php-$version.[0-9]+$env:PHPTS-Win32-.*-$arch.zip") { $asset = $release.assets | ForEach-Object {
return $_.name if($_.name -match "php-$version.[0-9]+$env:PHPTS-Win32-.*-$arch.zip") {
return $_.name
}
}
if($null -eq $asset) {
throw "Asset not found"
}
} catch {
$release = Invoke-WebRequest $php_builder/releases/expanded_assets/php$version
$asset = $release.links.href | ForEach-Object {
if($_ -match "php-$version.[0-9]+$env:PHPTS-Win32-.*-$arch.zip") {
return $_.split('/')[-1]
}
} }
} }
Invoke-WebRequest -UseBasicParsing -Uri $php_builder/releases/download/php$version/$asset -OutFile $php_dir\$asset Invoke-WebRequest -UseBasicParsing -Uri $php_builder/releases/download/php$version/$asset -OutFile $php_dir\$asset
+2 -1
View File
@@ -246,7 +246,8 @@ export async function CSVArray(values_csv: string): Promise<Array<string>> {
return value return value
.trim() .trim()
.replace(/^["']|["']$|(?<==)["']/g, '') .replace(/^["']|["']$|(?<==)["']/g, '')
.replace(/=(((?!E_).)*[?{}|&~![()^]+((?!E_).)+)/, "='$1'"); .replace(/=(((?!E_).)*[?{}|&~![()^]+((?!E_).)+)/, "='$1'")
.replace(/=(.*?)(=.*)/, "='$1$2'");
}) })
.filter(Boolean); .filter(Boolean);
} }