Compare commits

..

12 Commits

Author SHA1 Message Date
00242b5fc2 Fix symfony-cli config [skip ci] 2025-10-15 09:17:20 +05:30
319ac00da8 Improve symfony-cli support
Fingers crossed symfony-cli keeps the artifact format in their releases
2025-10-15 08:46:18 +05:30
38e8065d61 Merge pull request #1008 from shyim/fix/flaky-symfony-cli-install
fix: directly download linux archive from symfony-cli releases
2025-10-15 07:52:14 +05:30
91a018aa46 Update SECURITY.md [skip ci] 2025-10-15 07:50:28 +05:30
bdaf698d5d Merge pull request #1009 from shivammathur/dependabot/github_actions/develop/github/codeql-action-4
Bump github/codeql-action from 3 to 4
2025-10-13 22:43:48 +00:00
ab68d9f583 Bump github/codeql-action from 3 to 4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-13 10:36:25 +00:00
d65cf8f3f2 Update sponsors [skip ci] 2025-10-12 12:49:03 +05:30
6beaa7dc34 Update actions in examples 2025-10-12 11:05:16 +05:30
79ab6fe269 ci: use direct link instead of api call 2025-10-07 11:02:25 +02:00
4cbbb6d82c fix: directly download linux archive from symfony-cli releases 2025-10-07 09:50:11 +02:00
4cba65b8c5 Improve workflows 2025-09-25 22:11:11 +05:30
7fea117d1c Add support for PHP 8.6.0-dev 2025-09-25 20:38:18 +05:30
72 changed files with 321 additions and 297 deletions

11
.github/SECURITY.md vendored
View File

@ -2,23 +2,20 @@
## Supported Versions ## Supported Versions
The latest patch versions of `v1` and `v2` releases of this project are supported for security updates. The latest patch version of `v2` release of this project is supported for security updates.
## Supported PHP Versions ## Supported PHP Versions
This security policy only applies to the latest patches of the following PHP versions. This security policy only applies to the latest patch releases of the following PHP versions.
| Version | Supported | | Version | Supported |
|---------|--------------------| |---------|--------------------|
| 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: | | 8.3 | :white_check_mark: |
| 8.4 | :white_check_mark: |
## Reporting a Vulnerability ## Reporting a Vulnerability
If you have found any issues that might have security implications in the versions supported, please send a report privately to [contact@shivammathur.com](mailto:contact@shivammathur.com). If you have found any issues that might have security implications in the versions supported, please send a report privately to [contact@setup-php.com](mailto:contact@setup-php.com).
Do not report security reports publicly. Do not report security reports publicly.
## Tidelift
If you use this GitHub Action through a Tidelift subscription, please refer to [https://tidelift.com/security](https://tidelift.com/security).

View File

@ -21,13 +21,13 @@ jobs:
fetch-depth: 2 fetch-depth: 2
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v3 uses: github/codeql-action/init@v4
with: with:
config-file: ./.github/codeql/codeql-configuration.yml config-file: ./.github/codeql/codeql-configuration.yml
languages: javascript languages: javascript
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@v3 uses: github/codeql-action/autobuild@v4
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3 uses: github/codeql-action/analyze@v4

View File

@ -16,8 +16,8 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-24.04, ubuntu-22.04, windows-2022, macos-13] operating-system: [ubuntu-24.04, ubuntu-22.04, windows-2022, macos-15-intel]
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', '8.5'] 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', '8.5', '8.6']
steps: steps:
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
@ -116,11 +116,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-24.04 ubuntu-22.04 windows-2022 windows-2019 macos-13 macos-14 macos-15; do for os in ubuntu-24.04 ubuntu-22.04 windows-2025 windows-2022 windows-2019 macos-13 macos-14 macos-15 macos-26; 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 8.3 8.4 8.5; 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 8.5 8.6; do
if [[ "${os%-*}" = "macos" ]]; then if [[ "${os%-*}" = "macos" ]]; then
cat lists/php"$version"-macos-13.md >> Php-extensions-loaded-on-"$os".md cat lists/php"$version"-macos-15-intel.md >> Php-extensions-loaded-on-"$os".md
elif [ "${os%-*}" = "windows" ]; then elif [ "${os%-*}" = "windows" ]; 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

@ -28,8 +28,8 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-24.04, ubuntu-22.04, windows-2022, macos-13] operating-system: [ubuntu-24.04, ubuntu-22.04, windows-2022, macos-15-intel]
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', '8.5'] 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', '8.5', '8.6']
include: include:
- operating-system: ubuntu-24.04 - operating-system: ubuntu-24.04
php-versions: '' php-versions: ''

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/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="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.5-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.6-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>
@ -68,19 +68,20 @@ Both `GitHub-hosted` and `self-hosted` runners are supported by `setup-php` on t
### GitHub-Hosted Runners ### GitHub-Hosted Runners
| Virtual environment | Arch | YAML workflow label | Pre-installed PHP | | Virtual environment | Arch | YAML workflow label | Pre-installed PHP |
|---------------------|---------|------------------------------------|------------------------| |---------------------|---------|------------------------------------|-------------------|
| Ubuntu 24.04 | x86_64 | `ubuntu-latest` or `ubuntu-24.04` | `PHP 8.3` | | Ubuntu 24.04 | x86_64 | `ubuntu-latest` or `ubuntu-24.04` | `PHP 8.3` |
| Ubuntu 22.04 | x86_64 | `ubuntu-22.04` | `PHP 8.1` | | Ubuntu 22.04 | x86_64 | `ubuntu-22.04` | `PHP 8.1` |
| Ubuntu 24.04 | aarch64 | `ubuntu-24.04-arm` | `PHP 8.3` | | Ubuntu 24.04 | aarch64 | `ubuntu-24.04-arm` | `PHP 8.3` |
| Ubuntu 22.04 | aarch64 | `ubuntu-22.04-arm` | `PHP 8.1` | | Ubuntu 22.04 | aarch64 | `ubuntu-22.04-arm` | `PHP 8.1` |
| Windows Server 2025 | x64 | `windows-2025` | `PHP 8.3` | | Windows Server 2025 | x64 | `windows-2025` | `PHP 8.3` |
| Windows Server 2022 | x64 | `windows-latest` or `windows-2022` | `PHP 8.3` | | Windows Server 2022 | x64 | `windows-latest` or `windows-2022` | `PHP 8.3` |
| Windows Server 2019 | x64 | `windows-2019` | `PHP 8.3` | | Windows Server 2019 | x64 | `windows-2019` | `PHP 8.3` |
| macOS Tahoe 26.x | arm64 | `macos-26` | - | | macOS Tahoe 26.x | arm64 | `macos-26` | - |
| macOS Sequoia 15.x | arm64 | `macos-latest` or `macos-15` | - | | macOS Sequoia 15.x | arm64 | `macos-latest` or `macos-15` | - |
| macOS Sonoma 14.x | arm64 | `macos-14` | - | | macOS Sonoma 14.x | arm64 | `macos-14` | - |
| macOS Ventura 13.x | x86_64 | `macos-13` | `PHP 8.3` | | macOS Sequoia 15.x | x86_64 | `macos-15-intel` | `PHP 8.3` |
| macOS Ventura 13.x | x86_64 | `macos-13` | `PHP 8.3` |
### Self-Hosted Runners ### Self-Hosted Runners
@ -103,11 +104,11 @@ 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 can be set up 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.5 on GitHub-hosted runners, except for macOS ARM64 runners (macos-14). - PHP 5.3 to PHP 8.6 on GitHub-hosted runners, except for macOS ARM64 runners (macos-14).
- PHP 5.6 to PHP 8.5 on GitHub-hosted macOS ARM64 runners (macos-14). - PHP 5.6 to PHP 8.6 on GitHub-hosted macOS ARM64 runners (macos-14).
- PHP 5.6 to PHP 8.5 on self-hosted runners. - PHP 5.6 to PHP 8.6 on self-hosted runners.
| PHP Version | Stability | Release Support | Runner Support | | PHP Version | Stability | Release Support | Runner Support |
|-------------|-----------|-----------------------|--------------------------------| |-------------|-----------|-----------------------|--------------------------------|
@ -126,10 +127,11 @@ On all supported OS/Platforms the following PHP versions can be set up as per th
| `8.3` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` | | `8.3` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` |
| `8.4` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` | | `8.4` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` |
| `8.5` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` | | `8.5` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` |
| `8.6` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` |
> [!Note] > [!Note]
> - Specifying `8.5` in `php-version` input installs a nightly build of `PHP 8.5.0-dev`. See [nightly build setup](#nightly-build-setup) for more information. > - Specifying `8.6` in `php-version` input installs a nightly build of `PHP 8.6.0-dev` from the master branch of PHP. Specifying `8.5` in `php-version` input installs a nightly build of `PHP 8.5.0-dev` from the PHP-8.5 branch of PHP. 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
@ -561,10 +563,10 @@ jobs:
### Nightly Build Setup ### Nightly Build Setup
> Set up a nightly build of `PHP 8.5`. > Set up a nightly build of `PHP 8.5` or `PHP 8.6`.
- 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 these versions currently.
```yaml ```yaml
steps: steps:
@ -1000,18 +1002,14 @@ Examples of using `setup-php` with various PHP frameworks and packages.
## :sparkling_heart: Support This Project ## :sparkling_heart: Support This Project
- Please star the project and share it. If you blog, please share your experience of using `setup-php`.
- Please [reach out](mailto:contact@setup-php.com) if you have any questions about sponsoring setup-php.
Many users and organisations support setup-php via [GitHub Sponsors](https://github.com/sponsors/shivammathur).
<a href="https://github.com/sponsors/shivammathur"><img src="https://setup-php.com/sponsors.svg?" alt="Sponsor shivammathur"></a>
These companies generously provide setup-php their products and services to aid in the development of this project. These companies generously provide setup-php their products and services to aid in the development of this project.
<p> <p>
<a target="_blank" href="https://www.jetbrains.com/?from=setup-php"> <a target="_blank" href="https://www.jetbrains.com/?from=setup-php#gh-light-mode-only">
<img src="https://setup-php.com/sponsors/jetbrains.svg" alt="JetBrains" width="140" height="80"> <img src="https://setup-php.com/sponsors/jetbrains.svg" alt="JetBrains" width="140" height="100">
</a>
<a target="_blank" href="https://www.jetbrains.com/?from=setup-php#gh-dark-mode-only">
<img src="https://setup-php.com/sponsors/jetbrains-white.svg" alt="JetBrains" width="140" height="100">
</a> </a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a target="_blank" href="https://www.cloudflare.com/lp/project-alexandria/#gh-light-mode-only"> <a target="_blank" href="https://www.cloudflare.com/lp/project-alexandria/#gh-light-mode-only">
@ -1028,11 +1026,22 @@ These companies generously provide setup-php their products and services to aid
<img src="https://setup-php.com/sponsors/macstadium-white.png" alt="Mac Stadium" width="200" height="80"> <img src="https://setup-php.com/sponsors/macstadium-white.png" alt="Mac Stadium" width="200" height="80">
</a> </a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a target="_blank" href="#"> <a target="_blank" href="https://m.do.co/c/f1a8ee1277b0#gh-light-mode-only">
<img src="https://setup-php.com/sponsors/tidelift.png" alt="Tidelift" width="94" height="80"> <img src="https://setup-php.com/sponsors/digitalocean.svg" alt="Digitalocean" width="100" height="100">
</a>
<a target="_blank" href="https://m.do.co/c/f1a8ee1277b0#gh-dark-mode-only">
<img src="https://setup-php.com/sponsors/digitalocean-white.svg" alt="Digitalocean" width="100" height="100">
</a> </a>
</p> </p>
Many users and organizations support setup-php via [GitHub Sponsors](https://github.com/sponsors/shivammathur).
<a href="https://github.com/sponsors/shivammathur"><img src="https://setup-php.com/sponsors.svg?" alt="Sponsor shivammathur"></a>
- If you use setup-php, please consider starring the project and share it.
- If you blog, please share your experience of using `setup-php`.
- Please [reach out](mailto:contact@setup-php.com) if you have any questions about sponsoring setup-php.
## :package: Dependencies ## :package: Dependencies
- [Node.js dependencies](https://github.com/shivammathur/setup-php/network/dependencies "Node.js dependencies") - [Node.js dependencies](https://github.com/shivammathur/setup-php/network/dependencies "Node.js dependencies")

View File

@ -181,9 +181,9 @@ describe('Utils tests', () => {
}); });
it('checking suppressOutput', async () => { it('checking suppressOutput', async () => {
expect(await utils.suppressOutput('win32')).toEqual(' '); expect(await utils.suppressOutput('win32')).toEqual(' >$null 2>&1');
expect(await utils.suppressOutput('linux')).toEqual(' '); expect(await utils.suppressOutput('linux')).toEqual(' >/dev/null 2>&1');
expect(await utils.suppressOutput('darwin')).toEqual(' '); expect(await utils.suppressOutput('darwin')).toEqual(' >/dev/null 2>&1');
expect(await utils.suppressOutput('openbsd')).toContain( expect(await utils.suppressOutput('openbsd')).toContain(
'Platform openbsd is not supported' 'Platform openbsd is not supported'
); );

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -11,7 +11,7 @@ jobs:
php-versions: ['7.4', '8.0', '8.1'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -19,7 +19,7 @@ jobs:
# blackfire-player supports PHP >= 5.5 # blackfire-player supports PHP >= 5.5
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -19,7 +19,7 @@ jobs:
# Blackfire supports PHP >= 5.3 on Ubuntu and macOS, and PHP >= 5.4 on Windows # Blackfire supports PHP >= 5.3 on Ubuntu and macOS, and PHP >= 5.4 on Windows
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -28,7 +28,7 @@ jobs:
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP
@ -75,7 +75,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP
@ -108,7 +108,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -28,7 +28,7 @@ jobs:
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP
@ -75,7 +75,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP
@ -108,7 +108,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP
@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP
@ -79,7 +79,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -37,7 +37,7 @@ jobs:
php-versions: ['7.4', '8.0', '8.1'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -39,7 +39,7 @@ jobs:
php-versions: ['7.4', '8.0', '8.1'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -12,7 +12,7 @@ jobs:
php-versions: ['7.4', '8.0', '8.1'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -37,7 +37,7 @@ jobs:
php-versions: ['7.4', '8.0', '8.1'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -39,7 +39,7 @@ jobs:
php-versions: ['7.4', '8.0', '8.1'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -12,7 +12,7 @@ jobs:
php-versions: ['7.4', '8.0', '8.1'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -36,7 +36,7 @@ jobs:
# php-versions: ['7.0', '7.1', '7.2', '7.3'] # php-versions: ['7.0', '7.1', '7.2', '7.3']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -37,7 +37,7 @@ jobs:
# php-versions: ['7.0', '7.1', '7.2', '7.3'] # php-versions: ['7.0', '7.1', '7.2', '7.3']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -12,10 +12,10 @@ jobs:
node-versions: ['16'] node-versions: ['16']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v1 uses: actions/setup-node@v5
with: with:
node-version: ${{ matrix.node-versions }} node-version: ${{ matrix.node-versions }}

View File

@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -23,7 +23,7 @@ jobs:
php-versions: ['7.4', '8.0', '8.1'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -23,7 +23,7 @@ jobs:
php-versions: ['7.4', '8.0', '8.1'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -12,7 +12,7 @@ jobs:
php-versions: ['7.4', '8.0', '8.1'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
# Docs: https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP - name: Setup PHP

View File

@ -29,10 +29,10 @@ jobs:
php-versions: ['7.4', '8.0'] php-versions: ['7.4', '8.0']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Set Node.js 10.x - name: Set Node.js 10.x
uses: actions/setup-node@v1 uses: actions/setup-node@v5
with: with:
node-version: 10.x node-version: 10.x

View File

@ -29,10 +29,10 @@ jobs:
php-versions: ['7.4', '8.0'] php-versions: ['7.4', '8.0']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Set Node.js 10.x - name: Set Node.js 10.x
uses: actions/setup-node@v1 uses: actions/setup-node@v5
with: with:
node-version: 10.x node-version: 10.x

View File

@ -17,7 +17,7 @@ export async function addINIValuesUnix(
return ( return (
'echo "' + 'echo "' +
ini_values.join('\n') + ini_values.join('\n') +
'" | sudo tee -a "${pecl_file:-${ini_file[@]}}" ' + '" | sudo tee -a "${pecl_file:-${ini_file[@]}}" >/dev/null 2>&1' +
script script
); );
} }

View File

@ -3,6 +3,7 @@
"highest": "8.4", "highest": "8.4",
"latest": "8.4", "latest": "8.4",
"nightly": "8.5", "nightly": "8.5",
"master": "8.6",
"5.x": "5.6", "5.x": "5.6",
"7.x": "7.4", "7.x": "7.4",
"8.x": "8.4" "8.x": "8.4"

View File

@ -266,7 +266,8 @@
"type": "custom-package", "type": "custom-package",
"repository": "symfony-cli/symfony-cli", "repository": "symfony-cli/symfony-cli",
"domain": "https://github.com", "domain": "https://github.com",
"version_prefix": "-V" "version_prefix": "v",
"version_parameter": "-V"
}, },
"blackfire-player": { "blackfire-player": {
"type": "custom-function", "type": "custom-function",

View File

@ -13,9 +13,9 @@ handle_dependency_extensions() {
suffix="$(get_php_formula_suffix)" suffix="$(get_php_formula_suffix)"
if [[ -n "$suffix" ]]; then if [[ -n "$suffix" ]]; then
brew_opts=(-sf) brew_opts=(-sf)
patch_abstract_file patch_abstract_file >/dev/null 2>&1
for dependency_extension in "${dependency_extensions[@]}"; do for dependency_extension in "${dependency_extensions[@]}"; do
brew install "${brew_opts[@]}" "$ext_tap/$dependency_extension@$version" && copy_brew_extensions "$dependency_extension" brew install "${brew_opts[@]}" "$ext_tap/$dependency_extension@$version" >/dev/null 2>&1 && copy_brew_extensions "$dependency_extension"
done done
fi fi
} }
@ -31,7 +31,7 @@ disable_extension_helper() {
sudo sed -Ei '' "/=(.*\/)?\"?$extension(.so)?$/d" "${ini_file:?}" sudo sed -Ei '' "/=(.*\/)?\"?$extension(.so)?$/d" "${ini_file:?}"
sudo rm -rf "$scan_dir"/*"$extension"* /tmp/php"$version"_extensions sudo rm -rf "$scan_dir"/*"$extension"* /tmp/php"$version"_extensions
mkdir -p /tmp/extdisabled/"$version" mkdir -p /tmp/extdisabled/"$version"
echo '' | sudo tee /tmp/extdisabled/"$version"/"$extension" echo '' | sudo tee /tmp/extdisabled/"$version"/"$extension" >/dev/null 2>&1
} }
# Function to get extension name from brew formula. # Function to get extension name from brew formula.
@ -69,9 +69,9 @@ add_brew_extension() {
else else
add_brew_tap "$php_tap" add_brew_tap "$php_tap"
add_brew_tap "$ext_tap" add_brew_tap "$ext_tap"
update_dependencies update_dependencies >/dev/null 2>&1
handle_dependency_extensions "$formula" "$extension" handle_dependency_extensions "$formula" "$extension" >/dev/null 2>&1
(brew install "${brew_opts[@]}" "$ext_tap/$formula@$version" && copy_brew_extensions "$formula") || pecl_install "$extension" (brew install "${brew_opts[@]}" "$ext_tap/$formula@$version" >/dev/null 2>&1 && copy_brew_extensions "$formula") || pecl_install "$extension" >/dev/null 2>&1
add_extension_log "$extension" "Installed and enabled" add_extension_log "$extension" "Installed and enabled"
fi fi
} }
@ -80,7 +80,7 @@ add_brew_extension() {
patch_abstract_file() { patch_abstract_file() {
abstract_path="$tap_dir"/"$ext_tap"/Abstract/abstract-php-extension.rb abstract_path="$tap_dir"/"$ext_tap"/Abstract/abstract-php-extension.rb
if [[ -e "$abstract_path" && ! -e /tmp/abstract_patch ]]; then if [[ -e "$abstract_path" && ! -e /tmp/abstract_patch ]]; then
echo '' | sudo tee /tmp/abstract_patch echo '' | sudo tee /tmp/abstract_patch >/dev/null 2>&1
sudo sed -i '' -e "s|php@#{\(.*\)}|php@#{\1}$suffix|g" -e "s|php_version /|\"#{php_version}$suffix\" /|g" "$abstract_path" sudo sed -i '' -e "s|php@#{\(.*\)}|php@#{\1}$suffix|g" -e "s|php_version /|\"#{php_version}$suffix\" /|g" "$abstract_path"
fi fi
} }
@ -90,9 +90,9 @@ add_extension_helper() {
local extension=$1 local extension=$1
prefix=$2 prefix=$2
if [[ "$version" =~ ${old_versions:?} ]] && [ "$extension" = "imagick" ]; then if [[ "$version" =~ ${old_versions:?} ]] && [ "$extension" = "imagick" ]; then
run_script "php5-darwin" "${version/./}" "$extension" run_script "php5-darwin" "${version/./}" "$extension" >/dev/null 2>&1
else else
pecl_install "$extension" && pecl_install "$extension" >/dev/null 2>&1 &&
if [[ "$version" =~ ${old_versions:?} ]]; then echo "$prefix=$ext_dir/$extension.so" >>"$ini_file"; fi if [[ "$version" =~ ${old_versions:?} ]]; then echo "$prefix=$ext_dir/$extension.so" >>"$ini_file"; fi
fi fi
add_extension_log "$extension" "Installed and enabled" add_extension_log "$extension" "Installed and enabled"
@ -106,8 +106,8 @@ add_devtools() {
# Function to handle request to add PECL. # Function to handle request to add PECL.
add_pecl() { add_pecl() {
enable_extension xml extension enable_extension xml extension >/dev/null 2>&1
configure_pecl configure_pecl >/dev/null 2>&1
pear_version=$(get_tool_version "pecl" "version") pear_version=$(get_tool_version "pecl" "version")
add_log "${tick:?}" "PECL" "Found PECL $pear_version" add_log "${tick:?}" "PECL" "Found PECL $pear_version"
} }
@ -139,7 +139,7 @@ update_dependencies() {
git_retry -C "$repo" fetch origin main && git -C "$repo" reset --hard origin/main git_retry -C "$repo" fetch origin main && git -C "$repo" reset --hard origin/main
fi fi
done done
echo '' | sudo tee /tmp/update_dependencies echo '' | sudo tee /tmp/update_dependencies >/dev/null 2>&1
fi fi
} }
@ -197,7 +197,7 @@ add_php_config() {
if [[ "$ini" = "production" || "$ini" = "development" ]]; then if [[ "$ini" = "production" || "$ini" = "development" ]]; then
sudo cp "$ini_dir"/php.ini-"$ini" "$ini_dir"/php.ini sudo cp "$ini_dir"/php.ini-"$ini" "$ini_dir"/php.ini
elif [ "$ini" = "none" ]; then elif [ "$ini" = "none" ]; then
echo '' | sudo tee "${ini_file[@]}" echo '' | sudo tee "${ini_file[@]}" >/dev/null 2>&1
fi fi
} }
@ -212,7 +212,7 @@ get_scan_dir() {
# Function to handle self-hosted runner setup. # Function to handle self-hosted runner setup.
self_hosted_helper() { self_hosted_helper() {
sudo mkdir -p /opt/hostedtoolcache || true sudo mkdir -p /opt/hostedtoolcache >/dev/null 2>&1 || true
} }
# Function to Setup PHP. # Function to Setup PHP.
@ -223,14 +223,14 @@ setup_php() {
check_pre_installed check_pre_installed
existing_version=$(get_brewed_php) existing_version=$(get_brewed_php)
if [[ "$version" =~ ${old_versions:?} ]]; then if [[ "$version" =~ ${old_versions:?} ]]; then
run_script "php5-darwin" "${version/./}" run_script "php5-darwin" "${version/./}" >/dev/null 2>&1
status="Installed" status="Installed"
elif [ "$existing_version" != "$version" ]; then elif [ "$existing_version" != "$version" ]; then
add_php "install" "$existing_version" add_php "install" "$existing_version" >/dev/null 2>&1
status="Installed" status="Installed"
elif [ "$existing_version" = "$version" ]; then elif [ "$existing_version" = "$version" ]; then
if [ "${update:?}" = "true" ]; then if [ "${update:?}" = "true" ]; then
add_php "upgrade" "$existing_version" add_php "upgrade" "$existing_version" >/dev/null 2>&1
status="Updated to" status="Updated to"
else else
status="Found" status="Found"

View File

@ -48,7 +48,7 @@ enable_extension() {
[ -d "$modules_dir" ] && sudo find "$modules_dir" -path "*disabled*$1" -delete [ -d "$modules_dir" ] && sudo find "$modules_dir" -path "*disabled*$1" -delete
enable_extension_dependencies "$1" "$2" enable_extension_dependencies "$1" "$2"
enable_cache_extension_dependencies "$1" "$2" enable_cache_extension_dependencies "$1" "$2"
if ! [[ "${version:?}" =~ ${old_versions:?} ]] && command -v phpenmod ; then if ! [[ "${version:?}" =~ ${old_versions:?} ]] && command -v phpenmod >/dev/null 2>&1; then
sudo sed -Ei "/=(.*\/)?\"?$extension(.so)?\"?$/d" "$pecl_file" sudo sed -Ei "/=(.*\/)?\"?$extension(.so)?\"?$/d" "$pecl_file"
mod="${ini_dir:?}"/../mods-available/"$1".ini mod="${ini_dir:?}"/../mods-available/"$1".ini
if ! [ -e "$mod" ]; then if ! [ -e "$mod" ]; then
@ -57,7 +57,7 @@ enable_extension() {
[ -n "$mod_priority_line" ] && priority=$(echo "$mod_priority_line" | cut -d'=' -f 2) [ -n "$mod_priority_line" ] && priority=$(echo "$mod_priority_line" | cut -d'=' -f 2)
(echo "; priority=$priority"; echo "$2=${ext_dir:?}/$1.so") | sudo tee "$mod" >/dev/null (echo "; priority=$priority"; echo "$2=${ext_dir:?}/$1.so") | sudo tee "$mod" >/dev/null
fi fi
sudo phpenmod -v "$version" "$1" sudo phpenmod -v "$version" "$1" >/dev/null 2>&1
else else
echo "$2=${ext_dir:?}/$1.so" | sudo tee -a "${pecl_file:-${ini_file[@]}}" >/dev/null echo "$2=${ext_dir:?}/$1.so" | sudo tee -a "${pecl_file:-${ini_file[@]}}" >/dev/null
fi fi
@ -69,7 +69,7 @@ enable_extensions() {
local extensions=("$@") local extensions=("$@")
to_wait=() to_wait=()
for ext in "${extensions[@]}"; do for ext in "${extensions[@]}"; do
enable_extension "$ext" extension & enable_extension "$ext" extension >/dev/null 2>&1 &
to_wait+=($!) to_wait+=($!)
done done
wait "${to_wait[@]}" wait "${to_wait[@]}"
@ -77,7 +77,7 @@ enable_extensions() {
# Function to get a map of extensions and their dependent shared extensions. # Function to get a map of extensions and their dependent shared extensions.
get_extension_map() { get_extension_map() {
php -d'error_reporting=0' "${src:?}"/scripts/extensions/extension_map.php /tmp/map"$version".orig php -d'error_reporting=0' "${src:?}"/scripts/extensions/extension_map.php /tmp/map"$version".orig >/dev/null 2>&1
} }
# Function to enable extension dependencies which are also extensions. # Function to enable extension dependencies which are also extensions.
@ -123,7 +123,7 @@ disable_extension() {
disable_all_shared() { disable_all_shared() {
get_extension_map get_extension_map
sudo sed -i.orig -E -e "/^(zend_)?extension\s*=/d" "${ini_file[@]}" "$pecl_file" 2>/dev/null || true sudo sed -i.orig -E -e "/^(zend_)?extension\s*=/d" "${ini_file[@]}" "$pecl_file" 2>/dev/null || true
sudo find "${ini_dir:-$scan_dir}"/.. -name "*.ini" -not -path "*php.ini" -not -path "*phar.ini" -not -path "*pecl.ini" -not -path "*mods-available*" -delete || true sudo find "${ini_dir:-$scan_dir}"/.. -name "*.ini" -not -path "*php.ini" -not -path "*phar.ini" -not -path "*pecl.ini" -not -path "*mods-available*" -delete >/dev/null 2>&1 || true
mkdir -p /tmp/extdisabled/"$version" mkdir -p /tmp/extdisabled/"$version"
sudo rm -f /tmp/php"$version"_extensions sudo rm -f /tmp/php"$version"_extensions
sudo find "$ext_dir" -name '*.so' -print0 | xargs -0 -n 1 basename -s .so | xargs -I{} touch /tmp/extdisabled/"$version"/{} sudo find "$ext_dir" -name '*.so' -print0 | xargs -0 -n 1 basename -s .so | xargs -I{} touch /tmp/extdisabled/"$version"/{}
@ -137,7 +137,7 @@ configure_pecl() {
for script in pear pecl; do for script in pear pecl; do
sudo "$script" channel-update "$script".php.net sudo "$script" channel-update "$script".php.net
done done
echo '' | sudo tee /tmp/pecl_config echo '' | sudo tee /tmp/pecl_config >/dev/null 2>&1
fi fi
} }
@ -175,8 +175,8 @@ get_pecl_version() {
pecl_install() { pecl_install() {
local extension=$1 local extension=$1
local prefix=${2:-extension} local prefix=${2:-extension}
add_pecl add_pecl >/dev/null 2>&1
disable_extension_helper "${extension%-*}" disable_extension_helper "${extension%-*}" >/dev/null 2>&1
# Compare version with 8.3 so it runs only on 8.4 and above # Compare version with 8.3 so it runs only on 8.4 and above
# Install using the source interface as it allows for patching. # Install using the source interface as it allows for patching.
if [[ $(printf "%s\n%s" "${version:?}" "8.3" | sort -V | head -n1) != "$version" ]]; then if [[ $(printf "%s\n%s" "${version:?}" "8.3" | sort -V | head -n1) != "$version" ]]; then
@ -189,11 +189,11 @@ pecl_install() {
prefix_opts="$(parse_args "$extension" CONFIGURE_PREFIX_OPTS) MAKEFLAGS='-j $cpu_count'" prefix_opts="$(parse_args "$extension" CONFIGURE_PREFIX_OPTS) MAKEFLAGS='-j $cpu_count'"
suffix_opts="$(parse_args "$extension" CONFIGURE_OPTS) $(parse_args "$extension" CONFIGURE_SUFFIX_OPTS)" suffix_opts="$(parse_args "$extension" CONFIGURE_OPTS) $(parse_args "$extension" CONFIGURE_SUFFIX_OPTS)"
IFS=' ' read -r -a libraries <<<"$(parse_args "$extension" LIBS) $(parse_args "$extension" "$(uname -s)"_LIBS)" IFS=' ' read -r -a libraries <<<"$(parse_args "$extension" LIBS) $(parse_args "$extension" "$(uname -s)"_LIBS)"
(( ${#libraries[@]} )) && add_libs "${libraries[@]}" (( ${#libraries[@]} )) && add_libs "${libraries[@]}" >/dev/null 2>&1
if [ "$version" = "5.3" ]; then if [ "$version" = "5.3" ]; then
yes '' 2>/dev/null | sudo "$prefix_opts" pecl install -f "$extension" yes '' 2>/dev/null | sudo "$prefix_opts" pecl install -f "$extension" >/dev/null 2>&1
else else
yes '' 2>/dev/null | sudo "$prefix_opts" pecl install -f -D "$(parse_pecl_configure_options "$suffix_opts")" "$extension" yes '' 2>/dev/null | sudo "$prefix_opts" pecl install -f -D "$(parse_pecl_configure_options "$suffix_opts")" "$extension" >/dev/null 2>&1
fi fi
local exit_code=$? local exit_code=$?
sudo pecl info "$extension" | grep -iq 'zend extension' && prefix=zend_extension sudo pecl info "$extension" | grep -iq 'zend extension' && prefix=zend_extension
@ -216,7 +216,7 @@ add_pecl_extension() {
add_log "${tick:?}" "$extension" "Enabled" add_log "${tick:?}" "$extension" "Enabled"
else else
[ -n "$pecl_version" ] && pecl_version="-$pecl_version" [ -n "$pecl_version" ] && pecl_version="-$pecl_version"
pecl_install "$extension$pecl_version" || ( [ "${fail_fast:?}" = "false" ] && add_extension "$extension" "$(get_extension_prefix "$extension")" ) pecl_install "$extension$pecl_version" || ( [ "${fail_fast:?}" = "false" ] && add_extension "$extension" "$(get_extension_prefix "$extension")" >/dev/null 2>&1)
extension_version="$(php -r "echo phpversion('$extension');")" extension_version="$(php -r "echo phpversion('$extension');")"
[ -n "$extension_version" ] && extension_version="-$extension_version" [ -n "$extension_version" ] && extension_version="-$extension_version"
add_extension_log "$extension$extension_version" "Installed and enabled" add_extension_log "$extension$extension_version" "Installed and enabled"

View File

@ -19,11 +19,11 @@ add_blackfire() {
extension_version=$(get -s -n "" https://blackfire.io/api/v1/releases | grep -Eo 'php":"([0-9]+.[0-9]+.[0-9]+)' | cut -d '"' -f 3) extension_version=$(get -s -n "" https://blackfire.io/api/v1/releases | grep -Eo 'php":"([0-9]+.[0-9]+.[0-9]+)' | cut -d '"' -f 3)
fi fi
fi fi
get -q -n "${ext_dir:?}/blackfire.so" https://packages.blackfire.io/binaries/blackfire-php/"$extension_version"/blackfire-php-"$platform"_"$arch_name"-php-"$no_dot_version".so get -q -n "${ext_dir:?}/blackfire.so" https://packages.blackfire.io/binaries/blackfire-php/"$extension_version"/blackfire-php-"$platform"_"$arch_name"-php-"$no_dot_version".so >/dev/null 2>&1
fi fi
if [ -e "${ext_dir:?}/blackfire.so" ]; then if [ -e "${ext_dir:?}/blackfire.so" ]; then
disable_extension xdebug disable_extension xdebug >/dev/null 2>&1
disable_extension pcov 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"
else else

View File

@ -59,9 +59,9 @@ add_couchbase() {
ext=$(get_couchbase_version) ext=$(get_couchbase_version)
fi fi
if [[ "$ext" =~ couchbase-[2-3].+ ]]; then if [[ "$ext" =~ couchbase-[2-3].+ ]]; then
add_couchbase_clibs "$ext" add_couchbase_clibs "$ext" >/dev/null 2>&1
else else
add_couchbase_cxxlibs add_couchbase_cxxlibs >/dev/null 2>&1
fi fi
enable_extension "couchbase" "extension" enable_extension "couchbase" "extension"
if check_extension "couchbase"; then if check_extension "couchbase"; then
@ -72,9 +72,9 @@ add_couchbase() {
n_proc="$(nproc)" n_proc="$(nproc)"
export COUCHBASE_SUFFIX_OPTS="CMAKE_BUILD_TYPE=Release" export COUCHBASE_SUFFIX_OPTS="CMAKE_BUILD_TYPE=Release"
export CMAKE_BUILD_PARALLEL_LEVEL="$n_proc" export CMAKE_BUILD_PARALLEL_LEVEL="$n_proc"
add_extension_from_source couchbase https://pecl.php.net couchbase couchbase "${ext##*-}" extension pecl add_extension_from_source couchbase https://pecl.php.net couchbase couchbase "${ext##*-}" extension pecl >/dev/null 2>&1
else else
pecl_install "${ext}" pecl_install "${ext}" >/dev/null 2>&1
fi fi
add_extension_log "couchbase" "Installed and enabled" add_extension_log "couchbase" "Installed and enabled"
fi fi

View File

@ -42,7 +42,7 @@ add_cubrid_helper() {
add_cubrid() { add_cubrid() {
ext=$1 ext=$1
status='Enabled' status='Enabled'
add_cubrid_helper "$ext" add_cubrid_helper "$ext" >/dev/null 2>&1
add_extension_log "$ext" "$status" add_extension_log "$ext" "$status"
check_extension "$ext" && add_license_log check_extension "$ext" && add_license_log
} }

View File

@ -39,9 +39,9 @@ add_event() {
add_log "${tick:?}" "event" "Enabled" add_log "${tick:?}" "event" "Enabled"
else else
if ! [[ "${version:?}" =~ ${old_versions:?} ]] && [ "$os" = "Darwin" ]; then if ! [[ "${version:?}" =~ ${old_versions:?} ]] && [ "$os" = "Darwin" ]; then
add_brew_extension event extension add_brew_extension event extension >/dev/null 2>&1
else else
add_event_helper "$ext" add_event_helper "$ext" >/dev/null 2>&1
fi fi
add_extension_log "event" "Installed and enabled" add_extension_log "event" "Installed and enabled"
fi fi

View File

@ -24,7 +24,7 @@ add_firebird_helper() {
add_firebird() { add_firebird() {
if [ "$(uname -s )" = "Darwin" ]; then if [ "$(uname -s )" = "Darwin" ]; then
add_firebird_client_darwin add_firebird_client_darwin >/dev/null 2>&1
fi fi
enable_extension pdo_firebird extension enable_extension pdo_firebird extension
status="Enabled" status="Enabled"
@ -32,12 +32,12 @@ add_firebird() {
status="Installed and enabled" status="Installed and enabled"
if [ "$(uname -s)" = "Linux" ]; then if [ "$(uname -s)" = "Linux" ]; then
if [[ "${version:?}" =~ 5.3|${nightly_versions:?} ]]; then if [[ "${version:?}" =~ 5.3|${nightly_versions:?} ]]; then
add_firebird_helper /usr add_firebird_helper /usr >/dev/null 2>&1
else else
add_pdo_extension firebird add_pdo_extension firebird >/dev/null 2>&1
fi fi
else else
add_firebird_helper /opt/firebird add_firebird_helper /opt/firebird >/dev/null 2>&1
fi fi
fi fi
add_extension_log pdo_firebird "$status" add_extension_log pdo_firebird "$status"

View File

@ -17,7 +17,7 @@ add_gearman_helper() {
add_gearman() { add_gearman() {
status="Enabled" status="Enabled"
if [ "$(uname -s)" = 'Linux' ]; then if [ "$(uname -s)" = 'Linux' ]; then
add_gearman_helper add_gearman_helper >/dev/null 2>&1
add_extension_log "gearman" "$status" add_extension_log "gearman" "$status"
else else
add_brew_extension gearman extension add_brew_extension gearman extension

View File

@ -11,7 +11,7 @@ add_geos() {
if check_extension "geos"; then if check_extension "geos"; then
add_log "${tick:?}" "geos" "Enabled" add_log "${tick:?}" "geos" "Enabled"
else else
add_geos_helper add_geos_helper >/dev/null 2>&1
add_extension_log "geos" "Installed and enabled" add_extension_log "geos" "Installed and enabled"
fi fi
} }

View File

@ -40,12 +40,12 @@ Function Repair-ICU() {
} }
Function Add-Http() { Function Add-Http() {
Add-Extension iconv Add-Extension iconv >$null 2>&1
Add-Extension raphf Add-Extension raphf >$null 2>&1
if($version -lt '8.0') { if($version -lt '8.0') {
Add-Extension propro Add-Extension propro >$null 2>&1
} }
Add-Extension pecl_http Add-Extension pecl_http >$null 2>&1
Repair-ICU Repair-ICU
Add-ExtensionLog http "Installed and enabled" Add-ExtensionLog http "Installed and enabled"
} }

View File

@ -75,7 +75,7 @@ add_http_latest() {
if [ "$os" = "Linux" ]; then if [ "$os" = "Linux" ]; then
add_http_dependencies add_http_dependencies
package="php$version-http" package="php$version-http"
add_ppa ondrej/php || update_ppa ondrej/php add_ppa ondrej/php >/dev/null 2>&1 || update_ppa ondrej/php
(check_package "$package" && install_packages "$package") || add_http_helper "$(get_http_version)" "$os" (check_package "$package" && install_packages "$package") || add_http_helper "$(get_http_version)" "$os"
else else
if ! [[ "${version:?}" =~ ${old_versions:?} ]]; then if ! [[ "${version:?}" =~ ${old_versions:?} ]]; then
@ -103,9 +103,9 @@ add_http() {
ext=$1 ext=$1
status="Enabled" status="Enabled"
if [[ "$ext" =~ ^(pecl_http|http)$ ]]; then if [[ "$ext" =~ ^(pecl_http|http)$ ]]; then
add_http_latest add_http_latest >/dev/null 2>&1
else else
add_http_version "$ext" add_http_version "$ext" >/dev/null 2>&1
fi fi
add_extension_log "http" "$status" add_extension_log "http" "$status"
} }

View File

@ -17,7 +17,7 @@ add_intl() {
add_log "${cross:?}" "intl" "ICU $icu is not supported for PHP $version" add_log "${cross:?}" "intl" "ICU $icu is not supported for PHP $version"
else else
[ "${ts:?}" = 'zts' ] && suffix='-zts' [ "${ts:?}" = 'zts' ] && suffix='-zts'
install_icu "$icu" install_icu "$icu" >/dev/null 2>&1
get -q -n "${ext_dir:?}/intl.so" "https://github.com/shivammathur/icu-intl/releases/download/intl-$icu/php${version:?}-intl-$icu$suffix$arch_suffix.so" get -q -n "${ext_dir:?}/intl.so" "https://github.com/shivammathur/icu-intl/releases/download/intl-$icu/php${version:?}-intl-$icu$suffix$arch_suffix.so"
enable_extension intl extension enable_extension intl extension
add_extension_log intl "Installed and enabled with ICU $icu" add_extension_log intl "Installed and enabled with ICU $icu"

View File

@ -24,10 +24,10 @@ add_ioncube() {
if [ -e "$loader_file" ]; then if [ -e "$loader_file" ]; then
sudo mv /tmp/ioncube/ioncube_loader_"${os_suffix%%_*}_${version:?}$ts_part".so "${ext_dir:?}/ioncube.so" sudo mv /tmp/ioncube/ioncube_loader_"${os_suffix%%_*}_${version:?}$ts_part".so "${ext_dir:?}/ioncube.so"
sudo cp /tmp/ioncube/LICENSE.txt "$ext_dir"/IONCUBE_LICENSE.txt sudo cp /tmp/ioncube/LICENSE.txt "$ext_dir"/IONCUBE_LICENSE.txt
echo "zend_extension=$ext_dir/ioncube.so" | sudo tee "${scan_dir:?}/00-ioncube.ini" echo "zend_extension=$ext_dir/ioncube.so" | sudo tee "${scan_dir:?}/00-ioncube.ini" >/dev/null 2>&1
fi fi
else else
echo "zend_extension=$ext_dir/ioncube.so" | sudo tee "${scan_dir:?}/00-ioncube.ini" echo "zend_extension=$ext_dir/ioncube.so" | sudo tee "${scan_dir:?}/00-ioncube.ini" >/dev/null 2>&1
fi fi
add_extension_log "ioncube" "$status" add_extension_log "ioncube" "$status"
check_extension "ioncube" && add_license_log check_extension "ioncube" && add_license_log

View File

@ -71,7 +71,7 @@ Function Add-Oci() {
} }
} else { } else {
$status = 'Installed and enabled' $status = 'Installed and enabled'
Add-Extension $extension Add-Extension $extension >$null 2>&1
} }
Add-ExtensionLog $extension $status Add-ExtensionLog $extension $status
Add-LicenseLog Add-LicenseLog

View File

@ -71,8 +71,8 @@ add_oci() {
oracle_home='/opt/oracle' oracle_home='/opt/oracle'
oracle_client=$oracle_home/instantclient oracle_client=$oracle_home/instantclient
os=$(uname -s) os=$(uname -s)
add_client add_client >/dev/null 2>&1
add_oci_helper add_oci_helper >/dev/null 2>&1
add_extension_log "$ext" "$status" add_extension_log "$ext" "$status"
check_extension "$ext" && add_license_log check_extension "$ext" && add_license_log
} }

View File

@ -34,7 +34,7 @@ add_phalcon_helper() {
add_brew_extension "$extension" extension add_brew_extension "$extension" extension
else else
package="php${version:?}-$extension" package="php${version:?}-$extension"
add_ppa ondrej/php || update_ppa ondrej/php add_ppa ondrej/php >/dev/null 2>&1 || update_ppa ondrej/php
[[ "$extension" =~ phalcon[4|5] ]] && (install_packages "php${version:?}-psr" || pecl_install psr || pecl_install psr-1.1.0) [[ "$extension" =~ phalcon[4|5] ]] && (install_packages "php${version:?}-psr" || pecl_install psr || pecl_install psr-1.1.0)
(check_package "$package" && install_packages "$package") || pecl_install phalcon-"$(get_phalcon_version)" || add_phalcon_from_repo (check_package "$package" && install_packages "$package") || pecl_install phalcon-"$(get_phalcon_version)" || add_phalcon_from_repo
fi fi
@ -94,7 +94,7 @@ add_phalcon() {
[ "$extension" = "phalcon" ] && extension=phalcon5 [ "$extension" = "phalcon" ] && extension=phalcon5
extension_major_version=${extension: -1} extension_major_version=${extension: -1}
if [[ "$extension_major_version" =~ [3-5] ]]; then if [[ "$extension_major_version" =~ [3-5] ]]; then
add_phalcon"$extension_major_version" add_phalcon"$extension_major_version" >/dev/null 2>&1
fi fi
add_extension_log "phalcon" "$status" add_extension_log "phalcon" "$status"
} }

View File

@ -71,7 +71,7 @@ add_relay_dependencies() {
configure_brew configure_brew
if [ "$relay_version" = "v0.7.0" ]; then if [ "$relay_version" = "v0.7.0" ]; then
brew install lz4 zstd concurrencykit brew install lz4 zstd concurrencykit
add_hiredis_1.1.0 add_hiredis_1.1.0 >/dev/null 2>&1
else else
brew install lz4 hiredis zstd concurrencykit brew install lz4 hiredis zstd concurrencykit
fi fi
@ -156,13 +156,13 @@ add_relay() {
relay_releases=https://github.com/cachewerk/relay/releases relay_releases=https://github.com/cachewerk/relay/releases
relay_trunk=https://builds.r2.relay.so relay_trunk=https://builds.r2.relay.so
relay_version=$(get_relay_version "$ext") relay_version=$(get_relay_version "$ext")
add_relay_dependencies add_relay_dependencies >/dev/null 2>&1
if shared_extension relay; then if shared_extension relay; then
message="Enabled" message="Enabled"
else else
add_relay_helper add_relay_helper >/dev/null 2>&1
message="Installed and enabled" message="Installed and enabled"
fi fi
configure_relay configure_relay >/dev/null 2>&1
add_extension_log relay "$message" add_extension_log relay "$message"
} }

View File

@ -47,7 +47,7 @@ check_lib() {
add_linux_libs() { add_linux_libs() {
local lib=$1 local lib=$1
if ! check_lib "$lib"; then if ! check_lib "$lib"; then
install_packages "$lib" || true install_packages "$lib" >/dev/null 2>&1 || true
fi fi
add_lib_log "$lib" add_lib_log "$lib"
} }
@ -56,9 +56,9 @@ add_linux_libs() {
add_darwin_libs() { add_darwin_libs() {
local lib=$1 local lib=$1
if ! check_lib "$lib"; then if ! check_lib "$lib"; then
brew install "$lib" || true brew install "$lib" >/dev/null 2>&1 || true
if [[ "$lib" = *@* ]]; then if [[ "$lib" = *@* ]]; then
brew link --overwrite --force "$lib" || true brew link --overwrite --force "$lib" >/dev/null 2>&1 || true
fi fi
fi fi
add_lib_log "$lib" add_lib_log "$lib"
@ -80,7 +80,7 @@ add_libs() {
run_group() { run_group() {
local command=$1 local command=$1
local log=$2 local log=$2
echo "$command" | sudo tee ./run_group.sh echo "$command" | sudo tee ./run_group.sh >/dev/null 2>&1
echo "$GROUP$log" echo "$GROUP$log"
. ./run_group.sh . ./run_group.sh
local status=$? local status=$?
@ -143,7 +143,7 @@ add_extension_from_source() {
sub_dir="$(parse_args "$extension" PATH)" sub_dir="$(parse_args "$extension" PATH)"
step_log "Setup $slug" step_log "Setup $slug"
( (
add_devtools phpize add_devtools phpize >/dev/null 2>&1
disable_extension_helper "$extension" disable_extension_helper "$extension"
fetch_extension "$extension" "$fetch" fetch_extension "$extension" "$fetch"
if ! [ "$(find . -maxdepth 1 -name '*.m4' -exec grep -H 'PHP_NEW_EXTENSION' {} \; | wc -l)" != "0" ]; then if ! [ "$(find . -maxdepth 1 -name '*.m4' -exec grep -H 'PHP_NEW_EXTENSION' {} \; | wc -l)" != "0" ]; then
@ -151,7 +151,7 @@ add_extension_from_source() {
else else
[[ -n "${libraries// }" ]] && run_group "add_libs $libraries" "add libraries" [[ -n "${libraries// }" ]] && run_group "add_libs $libraries" "add libraries"
[ "${debug:?}" = "debug" ] && suffix_opts="$suffix_opts --enable-debug" [ "${debug:?}" = "debug" ] && suffix_opts="$suffix_opts --enable-debug"
patch_extension "$extension" patch_extension "$extension" >/dev/null 2>&1
run_group "phpize" "phpize" && \ run_group "phpize" "phpize" && \
run_group "sudo $prefix_opts ./configure $suffix_opts $opts" "configure" && \ run_group "sudo $prefix_opts ./configure $suffix_opts $opts" "configure" && \
run_group "sudo $prefix_opts make -j$(nproc 2>/dev/null || sysctl -n hw.ncpu)" "make" && \ run_group "sudo $prefix_opts make -j$(nproc 2>/dev/null || sysctl -n hw.ncpu)" "make" && \

View File

@ -67,10 +67,10 @@ Function Add-Sqlsrv() {
Add-ExtensionFromGithub $extension > $null 2>&1 Add-ExtensionFromGithub $extension > $null 2>&1
} catch {} } catch {}
if (-not(Test-Extension $extension)) { if (-not(Test-Extension $extension)) {
Add-SqlsrvFromMSGithub $extension Add-SqlsrvFromMSGithub $extension >$null 2>&1
} }
if (-not(Test-Extension $extension)) { if (-not(Test-Extension $extension)) {
Add-Extension $extension Add-Extension $extension >$null 2>&1
} }
$status = 'Installed and enabled' $status = 'Installed and enabled'
} }

View File

@ -77,7 +77,7 @@ Function Add-ZephirParser() {
try { try {
Add-ZephirParserFromGitHub $extension Add-ZephirParserFromGitHub $extension
} catch { } catch {
Add-Extension $extension Add-Extension $extension >$null 2>&1
} }
} }
Add-ExtensionLog zephir_parser $status Add-ExtensionLog zephir_parser $status

View File

@ -33,7 +33,7 @@ add_zephir_parser() {
zp_releases=https://github.com/"$repo"/releases zp_releases=https://github.com/"$repo"/releases
if ! shared_extension zephir_parser; then if ! shared_extension zephir_parser; then
message='Installed and enabled' message='Installed and enabled'
add_zephir_parser_helper "$ext" add_zephir_parser_helper "$ext" >/dev/null 2>&1
else else
message='Enabled' message='Enabled'
enable_extension zephir_parser extension enable_extension zephir_parser extension

View File

@ -20,23 +20,23 @@ self_hosted_helper() {
sudo ln -sf /usr/bin/apt-get /usr/bin/apt-fast sudo ln -sf /usr/bin/apt-get /usr/bin/apt-fast
trap "sudo rm -f /usr/bin/apt-fast 2>/dev/null" exit trap "sudo rm -f /usr/bin/apt-fast 2>/dev/null" exit
fi fi
sudo mkdir -p /opt/hostedtoolcache || true sudo mkdir -p /opt/hostedtoolcache >/dev/null 2>&1 || true
install_packages apt-transport-https ca-certificates curl file make jq unzip autoconf automake gcc g++ gnupg install_packages apt-transport-https ca-certificates curl file make jq unzip autoconf automake gcc g++ gnupg
} }
# Function to fix broken packages. # Function to fix broken packages.
fix_broken_packages() { fix_broken_packages() {
sudo apt --fix-broken install sudo apt --fix-broken install >/dev/null 2>&1
} }
# Function to install a package # Function to install a package
install_packages() { install_packages() {
packages=("$@") packages=("$@")
if ! [ -e /etc/dpkg/dpkg.cfg.d/force-confnew ]; then if ! [ -e /etc/dpkg/dpkg.cfg.d/force-confnew ]; then
echo "force-confnew" | sudo tee /etc/dpkg/dpkg.cfg.d/force-confnew echo "force-confnew" | sudo tee /etc/dpkg/dpkg.cfg.d/force-confnew >/dev/null 2>&1
trap "sudo rm -f /etc/dpkg/dpkg.cfg.d/force-confnew 2>/dev/null" exit trap "sudo rm -f /etc/dpkg/dpkg.cfg.d/force-confnew 2>/dev/null" exit
fi fi
$apt_install "${packages[@]}" || (update_lists && fix_broken_packages && $apt_install "${packages[@]}" ) $apt_install "${packages[@]}" >/dev/null 2>&1 || (update_lists && fix_broken_packages && $apt_install "${packages[@]}" >/dev/null 2>&1)
} }
# Function to disable an extension. # Function to disable an extension.
@ -48,10 +48,10 @@ disable_extension_helper() {
disable_extension_dependents "$extension" disable_extension_dependents "$extension"
fi fi
sudo sed -Ei "/=(.*\/)?\"?$extension(.so)?\"?$/d" "${ini_file[@]}" "$pecl_file" sudo sed -Ei "/=(.*\/)?\"?$extension(.so)?\"?$/d" "${ini_file[@]}" "$pecl_file"
sudo find "$ini_dir"/.. -name "*-$extension.ini" -not -path "*phar.ini" -not -path "*pecl.ini" -not -path "*mods-available*" -delete || true sudo find "$ini_dir"/.. -name "*-$extension.ini" -not -path "*phar.ini" -not -path "*pecl.ini" -not -path "*mods-available*" -delete >/dev/null 2>&1 || true
sudo rm -f /tmp/php"$version"_extensions sudo rm -f /tmp/php"$version"_extensions
mkdir -p /tmp/extdisabled/"$version" mkdir -p /tmp/extdisabled/"$version"
echo '' | sudo tee /tmp/extdisabled/"$version"/"$extension" echo '' | sudo tee /tmp/extdisabled/"$version"/"$extension" >/dev/null 2>&1
} }
# Function to add PDO extension. # Function to add PDO extension.
@ -64,7 +64,7 @@ add_pdo_extension() {
ext_name=$1 ext_name=$1
if shared_extension pdo; then if shared_extension pdo; then
disable_extension_helper pdo disable_extension_helper pdo
echo "extension=pdo.so" | sudo tee "${ini_file[@]/php.ini/conf.d/10-pdo.ini}" echo "extension=pdo.so" | sudo tee "${ini_file[@]/php.ini/conf.d/10-pdo.ini}" >/dev/null 2>&1
fi fi
if [ "$ext" = "mysql" ]; then if [ "$ext" = "mysql" ]; then
enable_extension "mysqlnd" "extension" enable_extension "mysqlnd" "extension"
@ -72,15 +72,15 @@ add_pdo_extension() {
elif [ "$ext" = "dblib" ]; then elif [ "$ext" = "dblib" ]; then
ext_name="sybase" ext_name="sybase"
elif [ "$ext" = "firebird" ]; then elif [ "$ext" = "firebird" ]; then
install_packages libfbclient2 install_packages libfbclient2 >/dev/null 2>&1
enable_extension "pdo_firebird" "extension" enable_extension "pdo_firebird" "extension"
ext_name="interbase" ext_name="interbase"
elif [ "$ext" = "sqlite" ]; then elif [ "$ext" = "sqlite" ]; then
ext="sqlite3" ext="sqlite3"
ext_name="sqlite3" ext_name="sqlite3"
fi fi
add_extension "$ext_name" "extension" add_extension "$ext_name" "extension" >/dev/null 2>&1
add_extension "$pdo_ext" "extension" add_extension "$pdo_ext" "extension" >/dev/null 2>&1
add_extension_log "$pdo_ext" "Enabled" add_extension_log "$pdo_ext" "Enabled"
fi fi
} }
@ -94,7 +94,7 @@ check_package() {
add_extension_helper() { add_extension_helper() {
local extension=$1 local extension=$1
packages=(php"$version"-"$extension") packages=(php"$version"-"$extension")
add_ppa ondrej/php || update_ppa ondrej/php add_ppa ondrej/php >/dev/null 2>&1 || update_ppa ondrej/php
[ "${debug:?}" = "debug" ] && check_package php"$version"-"$extension"-dbgsym && packages+=(php"$version"-"$extension"-dbgsym) [ "${debug:?}" = "debug" ] && check_package php"$version"-"$extension"-dbgsym && packages+=(php"$version"-"$extension"-dbgsym)
(check_package "${packages[0]}" && install_packages "${packages[@]}") || pecl_install "$extension" (check_package "${packages[0]}" && install_packages "${packages[@]}") || pecl_install "$extension"
add_extension_log "$extension" "Installed and enabled" add_extension_log "$extension" "Installed and enabled"
@ -108,7 +108,7 @@ add_devtools() {
install_packages "php$version-dev" install_packages "php$version-dev"
fi fi
switch_version "phpize" "php-config" switch_version "phpize" "php-config"
add_extension xml extension add_extension xml extension >/dev/null 2>&1
add_log "${tick:?}" "$tool" "Added $tool $semver" add_log "${tick:?}" "$tool" "Added $tool $semver"
} }
@ -129,11 +129,11 @@ setup_cached_versions() {
# Function to add PECL. # Function to add PECL.
add_pecl() { add_pecl() {
add_devtools phpize add_devtools phpize >/dev/null 2>&1
if ! command -v pecl >/dev/null; then if ! command -v pecl >/dev/null; then
install_packages php-pear install_packages php-pear
fi fi
configure_pecl configure_pecl >/dev/null 2>&1
pear_version=$(get_tool_version "pecl" "version") pear_version=$(get_tool_version "pecl" "version")
add_log "${tick:?}" "PECL" "Added PECL $pear_version" add_log "${tick:?}" "PECL" "Added PECL $pear_version"
} }
@ -167,7 +167,7 @@ get_php_packages() {
# Function to install packaged PHP # Function to install packaged PHP
add_packaged_php() { add_packaged_php() {
add_ppa ondrej/php || 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[@]}"
} }
@ -191,7 +191,7 @@ add_php() {
setup_php_builder setup_php_builder
else else
add_packaged_php add_packaged_php
switch_version switch_version >/dev/null 2>&1
add_pecl add_pecl
fi fi
elif [[ "$version" =~ ${old_versions:?} ]]; then elif [[ "$version" =~ ${old_versions:?} ]]; then
@ -204,7 +204,7 @@ add_php() {
# Function to ini file for pear and link it to each SAPI. # Function to ini file for pear and link it to each SAPI.
link_pecl_file() { link_pecl_file() {
echo '' | sudo tee "$pecl_file" echo '' | sudo tee "$pecl_file" >/dev/null 2>&1
for file in "${ini_file[@]}"; do for file in "${ini_file[@]}"; do
sapi_scan_dir="$(realpath -m "$(dirname "$file")")/conf.d" sapi_scan_dir="$(realpath -m "$(dirname "$file")")/conf.d"
if [ "$sapi_scan_dir" != "$scan_dir" ] && ! [ -h "$sapi_scan_dir" ]; then if [ "$sapi_scan_dir" != "$scan_dir" ] && ! [ -h "$sapi_scan_dir" ]; then
@ -237,9 +237,9 @@ add_php_config() {
elif [ "$ini" = "development" ]; then elif [ "$ini" = "development" ]; then
echo "${ini_file[@]}" | xargs -n 1 -P 6 sudo cp "$php_lib_dir"/php.ini-development echo "${ini_file[@]}" | xargs -n 1 -P 6 sudo cp "$php_lib_dir"/php.ini-development
elif [ "$ini" = "none" ]; then elif [ "$ini" = "none" ]; then
echo '' | sudo tee "${ini_file[@]}" echo '' | sudo tee "${ini_file[@]}" >/dev/null 2>&1
fi fi
echo "$ini" | sudo tee "$current_ini" echo "$ini" | sudo tee "$current_ini" >/dev/null 2>&1
} }
# Function to Setup PHP # Function to Setup PHP
@ -250,13 +250,13 @@ setup_php() {
check_pre_installed check_pre_installed
if [[ -z "$php_config" ]] || [ "$(php_semver | cut -c 1-3)" != "$version" ]; then if [[ -z "$php_config" ]] || [ "$(php_semver | cut -c 1-3)" != "$version" ]; then
if [ ! -e "/usr/bin/php$version" ] || [ ! -e "/usr/bin/php-config$version" ]; then if [ ! -e "/usr/bin/php$version" ] || [ ! -e "/usr/bin/php-config$version" ]; then
add_php add_php >/dev/null 2>&1
else else
if ! [[ "$version" =~ ${old_versions:?} ]]; then if ! [[ "$version" =~ ${old_versions:?} ]]; then
switch_version switch_version >/dev/null 2>&1
fi fi
if [ "${update:?}" = "true" ]; then if [ "${update:?}" = "true" ]; then
update_php update_php >/dev/null 2>&1
else else
status="Switched to" status="Switched to"
fi fi
@ -264,7 +264,7 @@ setup_php() {
php_config="$(command -v php-config)" php_config="$(command -v php-config)"
else else
if [ "$update" = "true" ]; then if [ "$update" = "true" ]; then
update_php update_php >/dev/null 2>&1
else else
status="Found" status="Found"
fi fi
@ -284,7 +284,7 @@ setup_php() {
link_pecl_file link_pecl_file
configure_php configure_php
set_output "php-version" "$semver" set_output "php-version" "$semver"
sudo rm -rf /usr/local/bin/phpunit sudo rm -rf /usr/local/bin/phpunit >/dev/null 2>&1
sudo chmod 777 "${ini_file[@]}" "$pecl_file" "${tool_path_dir:?}" sudo chmod 777 "${ini_file[@]}" "$pecl_file" "${tool_path_dir:?}"
sudo cp "$src"/configs/pm/*.json "$RUNNER_TOOL_CACHE/" sudo cp "$src"/configs/pm/*.json "$RUNNER_TOOL_CACHE/"
add_log "${tick:?}" "PHP" "$status PHP $semver$extra_version" add_log "${tick:?}" "PHP" "$status PHP $semver$extra_version"
@ -298,8 +298,8 @@ debconf_fix="DEBIAN_FRONTEND=noninteractive"
apt_install="sudo $debconf_fix apt-fast install -y --no-install-recommends" apt_install="sudo $debconf_fix apt-fast install -y --no-install-recommends"
scripts="$src"/scripts scripts="$src"/scripts
add_sudo add_sudo >/dev/null 2>&1
link_apt_fast link_apt_fast >/dev/null 2>&1
. /etc/os-release . /etc/os-release
# shellcheck source=. # shellcheck source=.
@ -308,7 +308,6 @@ link_apt_fast
. "${scripts:?}"/tools/add_tools.sh . "${scripts:?}"/tools/add_tools.sh
. "${scripts:?}"/extensions/source.sh . "${scripts:?}"/extensions/source.sh
. "${scripts:?}"/extensions/add_extensions.sh . "${scripts:?}"/extensions/add_extensions.sh
set -x
read_env read_env
self_hosted_setup self_hosted_setup
setup_php setup_php

View File

@ -176,7 +176,7 @@ Function Add-ToolsHelper() {
$extensions += @('json', 'tokenizer') $extensions += @('json', 'tokenizer')
} elseif($tool -eq "phpDocumentor") { } elseif($tool -eq "phpDocumentor") {
$extensions+=('ctype', 'hash', 'json', 'fileinfo', 'iconv', 'mbstring', 'simplexml', 'xml') $extensions+=('ctype', 'hash', 'json', 'fileinfo', 'iconv', 'mbstring', 'simplexml', 'xml')
Add-Extension fileinfo Add-Extension fileinfo >$null 2>&1
Copy-Item $bin_dir\phpDocumentor.bat -Destination $bin_dir\phpdoc.bat Copy-Item $bin_dir\phpDocumentor.bat -Destination $bin_dir\phpdoc.bat
} elseif($tool -eq "phpunit") { } elseif($tool -eq "phpunit") {
$extensions += @('dom', 'json', 'libxml', 'mbstring', 'xml', 'xmlwriter') $extensions += @('dom', 'json', 'libxml', 'mbstring', 'xml', 'xmlwriter')
@ -189,7 +189,7 @@ Function Add-ToolsHelper() {
Copy-Item $bin_dir\wp-cli.bat -Destination $bin_dir\wp.bat Copy-Item $bin_dir\wp-cli.bat -Destination $bin_dir\wp.bat
} }
foreach($extension in $extensions) { foreach($extension in $extensions) {
Add-Extension $extension Add-Extension $extension >$null 2>&1
} }
} }
@ -236,7 +236,7 @@ Function Add-Tool() {
$bat_content += "php %BIN_TARGET% %*" $bat_content += "php %BIN_TARGET% %*"
Set-Content -Path $bin_dir\$tool.bat -Value $bat_content Set-Content -Path $bin_dir\$tool.bat -Value $bat_content
Add-ToolsHelper $tool Add-ToolsHelper $tool
Add-ToProfile $current_profile $tool "New-Alias $tool $bin_dir\$tool.bat" Add-ToProfile $current_profile $tool "New-Alias $tool $bin_dir\$tool.bat" >$null 2>&1
$tool_version = Get-ToolVersion $tool $ver_param $tool_version = Get-ToolVersion $tool $ver_param
Add-Log $tick $tool "Added $tool $tool_version" Add-Log $tick $tool "Added $tool $tool_version"
} else { } else {
@ -276,9 +276,9 @@ Function Add-ComposerToolHelper() {
Remove-Item -Path $composer_lock -Force Remove-Item -Path $composer_lock -Force
} }
if((composer global show $prefix$tool $tool_version -a 2>&1 | findstr '^type *: *composer-plugin') -and ($composer_args -ne '')) { if((composer global show $prefix$tool $tool_version -a 2>&1 | findstr '^type *: *composer-plugin') -and ($composer_args -ne '')) {
composer global config --no-plugins allow-plugins."$prefix$tool" true composer global config --no-plugins allow-plugins."$prefix$tool" true >$null 2>&1
} }
composer global require $prefix$release $composer_args composer global require $prefix$release $composer_args >$null 2>&1
return composer global show $prefix$tool 2>&1 | findstr '^versions' return composer global show $prefix$tool 2>&1 | findstr '^versions'
} else { } else {
$release_stream = [System.IO.MemoryStream]::New([System.Text.Encoding]::ASCII.GetBytes($release)) $release_stream = [System.IO.MemoryStream]::New([System.Text.Encoding]::ASCII.GetBytes($release))
@ -289,9 +289,9 @@ Function Add-ComposerToolHelper() {
New-Item -ItemType Directory -Force -Path $scoped_dir > $null 2>&1 New-Item -ItemType Directory -Force -Path $scoped_dir > $null 2>&1
Set-Content -Path $scoped_dir\composer.json -Value "{}" Set-Content -Path $scoped_dir\composer.json -Value "{}"
if((composer show $prefix$tool $tool_version -d $unix_scoped_dir -a 2>&1 | findstr '^type *: *composer-plugin') -and ($composer_args -ne '')) { if((composer show $prefix$tool $tool_version -d $unix_scoped_dir -a 2>&1 | findstr '^type *: *composer-plugin') -and ($composer_args -ne '')) {
composer config -d $unix_scoped_dir --no-plugins allow-plugins."$prefix$tool" true composer config -d $unix_scoped_dir --no-plugins allow-plugins."$prefix$tool" true >$null 2>&1
} }
composer require $prefix$release -d $unix_scoped_dir $composer_args composer require $prefix$release -d $unix_scoped_dir $composer_args >$null 2>&1
} }
[System.Environment]::SetEnvironmentVariable(($tool.replace('-', '_') + '_bin'), "$scoped_dir\vendor\bin") [System.Environment]::SetEnvironmentVariable(($tool.replace('-', '_') + '_bin'), "$scoped_dir\vendor\bin")
Add-Path $scoped_dir\vendor\bin Add-Path $scoped_dir\vendor\bin

View File

@ -67,7 +67,7 @@ update_auth_json() {
# Function to check if public GitHub token authentication is possible. # Function to check if public GitHub token authentication is possible.
can_access_public_github() { can_access_public_github() {
curl --fail -s -H "Authorization: token $1" 'https://api.github.com/' curl --fail -s -H "Authorization: token $1" 'https://api.github.com/' >/dev/null 2>&1
} }
# Function to setup authentication in composer. # Function to setup authentication in composer.
@ -108,7 +108,7 @@ set_composer_env() {
add_env_path "$composer_env" add_env_path "$composer_env"
if [ -n "$COMPOSER_ALLOW_PLUGINS" ]; then if [ -n "$COMPOSER_ALLOW_PLUGINS" ]; then
echo "$COMPOSER_ALLOW_PLUGINS" | tr ',' '\n' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | grep -v '^$' | while IFS= read -r plugin; do echo "$COMPOSER_ALLOW_PLUGINS" | tr ',' '\n' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | grep -v '^$' | while IFS= read -r plugin; do
composer global config --no-plugins "allow-plugins.$plugin" true composer global config --no-plugins "allow-plugins.$plugin" true >/dev/null 2>&1
done done
fi fi
} }
@ -167,7 +167,7 @@ add_tools_helper() {
sudo ln -s "$tool_path" "$tool_path_dir"/"${tool%-*}" sudo ln -s "$tool_path" "$tool_path_dir"/"${tool%-*}"
fi fi
for extension in "${extensions[@]}"; do for extension in "${extensions[@]}"; do
add_extension "$extension" extension add_extension "$extension" extension >/dev/null 2>&1
done done
} }
@ -218,22 +218,22 @@ add_composer_tool_helper() {
enable_extensions curl mbstring openssl enable_extensions curl mbstring openssl
tool_version=${release##*:}; [ "$tool_version" = "$tool" ] && tool_version="*" tool_version=${release##*:}; [ "$tool_version" = "$tool" ] && tool_version="*"
if [ "$scope" = "global" ]; then if [ "$scope" = "global" ]; then
sudo rm -f "$composer_lock" || true sudo rm -f "$composer_lock" >/dev/null 2>&1 || true
if composer global show "$prefix$tool" "$tool_version" -a 2>&1 | grep -qE '^type *: *composer-plugin' && [ -n "$composer_args" ]; then if composer global show "$prefix$tool" "$tool_version" -a 2>&1 | grep -qE '^type *: *composer-plugin' && [ -n "$composer_args" ]; then
composer global config --no-plugins allow-plugins."$prefix$tool" true composer global config --no-plugins allow-plugins."$prefix$tool" true >/dev/null 2>&1
fi fi
composer global require "$prefix$release" "$composer_args" composer global require "$prefix$release" "$composer_args" >/dev/null 2>&1
composer global show "$prefix$tool" 2>&1 | grep -E ^versions | sudo tee /tmp/composer.log composer global show "$prefix$tool" 2>&1 | grep -E ^versions | sudo tee /tmp/composer.log >/dev/null 2>&1
else else
scoped_dir="$composer_bin/_tools/$tool-$(echo -n "$release" | shasum -a 256 | cut -d ' ' -f 1)" scoped_dir="$composer_bin/_tools/$tool-$(echo -n "$release" | shasum -a 256 | cut -d ' ' -f 1)"
if ! [ -d "$scoped_dir" ]; then if ! [ -d "$scoped_dir" ]; then
mkdir -p "$scoped_dir" mkdir -p "$scoped_dir"
echo '{}' | tee "$scoped_dir/composer.json" >/dev/null echo '{}' | tee "$scoped_dir/composer.json" >/dev/null
if composer show "$prefix$tool" "$tool_version" -d "$scoped_dir" -a 2>&1 | grep -qE '^type *: *composer-plugin' && [ -n "$composer_args" ]; then if composer show "$prefix$tool" "$tool_version" -d "$scoped_dir" -a 2>&1 | grep -qE '^type *: *composer-plugin' && [ -n "$composer_args" ]; then
composer config -d "$scoped_dir" --no-plugins allow-plugins."$prefix$tool" true composer config -d "$scoped_dir" --no-plugins allow-plugins."$prefix$tool" true >/dev/null 2>&1
fi fi
composer require "$prefix$release" -d "$scoped_dir" "$composer_args" composer require "$prefix$release" -d "$scoped_dir" "$composer_args" >/dev/null 2>&1
composer show "$prefix$tool" -d "$scoped_dir" 2>&1 | grep -E ^versions | sudo tee /tmp/composer.log composer show "$prefix$tool" -d "$scoped_dir" 2>&1 | grep -E ^versions | sudo tee /tmp/composer.log >/dev/null 2>&1
fi fi
add_path "$scoped_dir"/vendor/bin add_path "$scoped_dir"/vendor/bin
fi fi

View File

@ -6,14 +6,14 @@ Function Add-Blackfire() {
} }
$cli_version = (Invoke-RestMethod https://blackfire.io/api/v1/releases).cli $cli_version = (Invoke-RestMethod https://blackfire.io/api/v1/releases).cli
$url = "https://packages.blackfire.io/binaries/blackfire/${cli_version}/blackfire-windows_${arch_name}.zip" $url = "https://packages.blackfire.io/binaries/blackfire/${cli_version}/blackfire-windows_${arch_name}.zip"
Get-File -Url $url -OutFile $bin_dir\blackfire.zip Get-File -Url $url -OutFile $bin_dir\blackfire.zip >$null 2>&1
Expand-Archive -Path $bin_dir\blackfire.zip -DestinationPath $bin_dir -Force Expand-Archive -Path $bin_dir\blackfire.zip -DestinationPath $bin_dir -Force >$null 2>&1
Add-ToProfile $current_profile 'blackfire' "New-Alias blackfire $bin_dir\blackfire.exe" Add-ToProfile $current_profile 'blackfire' "New-Alias blackfire $bin_dir\blackfire.exe"
if ((Test-Path env:BLACKFIRE_SERVER_ID) -and (Test-Path env:BLACKFIRE_SERVER_TOKEN)) { if ((Test-Path env:BLACKFIRE_SERVER_ID) -and (Test-Path env:BLACKFIRE_SERVER_TOKEN)) {
blackfire agent:config --server-id=$env:BLACKFIRE_SERVER_ID --server-token=$env:BLACKFIRE_SERVER_TOKEN blackfire agent:config --server-id=$env:BLACKFIRE_SERVER_ID --server-token=$env:BLACKFIRE_SERVER_TOKEN >$null 2>&1
} }
if ((Test-Path env:BLACKFIRE_CLIENT_ID) -and (Test-Path env:BLACKFIRE_CLIENT_TOKEN)) { if ((Test-Path env:BLACKFIRE_CLIENT_ID) -and (Test-Path env:BLACKFIRE_CLIENT_TOKEN)) {
blackfire client:config --client-id=$env:BLACKFIRE_CLIENT_ID --client-token=$env:BLACKFIRE_CLIENT_TOKEN --ca-cert=$php_dir\ssl\cacert.pem blackfire client:config --client-id=$env:BLACKFIRE_CLIENT_ID --client-token=$env:BLACKFIRE_CLIENT_TOKEN --ca-cert=$php_dir\ssl\cacert.pem >$null 2>&1
} }
Add-Log $tick "blackfire" "Added blackfire $cli_version" Add-Log $tick "blackfire" "Added blackfire $cli_version"
} }

View File

@ -32,9 +32,9 @@ blackfire_config() {
# Function to add blackfire cli. # Function to add blackfire cli.
add_blackfire() { add_blackfire() {
os="$(uname -s)" os="$(uname -s)"
[ "$os" = "Linux" ] && add_blackfire_linux [ "$os" = "Linux" ] && add_blackfire_linux >/dev/null 2>&1
[ "$os" = "Darwin" ] && add_blackfire_darwin [ "$os" = "Darwin" ] && add_blackfire_darwin >/dev/null 2>&1
blackfire_config blackfire_config >/dev/null 2>&1
tool_version=$(get_tool_version "blackfire" "version") tool_version=$(get_tool_version "blackfire" "version")
add_log "${tick:?}" "blackfire" "Added blackfire $tool_version" add_log "${tick:?}" "blackfire" "Added blackfire $tool_version"
} }

View File

@ -14,11 +14,11 @@ add_brew_tap() {
tap=$1 tap=$1
if ! [ -d "$tap_dir/$tap" ]; then if ! [ -d "$tap_dir/$tap" ]; then
if [ "${runner:?}" = "self-hosted" ]; then if [ "${runner:?}" = "self-hosted" ]; then
brew tap "$tap" brew tap "$tap" >/dev/null 2>&1
else else
fetch_brew_tap "$tap" fetch_brew_tap "$tap" >/dev/null 2>&1
if ! [ -d "$tap_dir/$tap" ]; then if ! [ -d "$tap_dir/$tap" ]; then
brew tap "$tap" brew tap "$tap" >/dev/null 2>&1
fi fi
fi fi
fi fi
@ -49,7 +49,7 @@ add_brew() {
brew_prefix="$(get_brew_prefix)" brew_prefix="$(get_brew_prefix)"
if ! [ -d "$brew_prefix"/bin ]; then if ! [ -d "$brew_prefix"/bin ]; then
step_log "Setup Brew" step_log "Setup Brew"
get -s "" "/tmp/install.sh" "https://raw.githubusercontent.com/Homebrew/install/main/install.sh" | bash -s get -s "" "/tmp/install.sh" "https://raw.githubusercontent.com/Homebrew/install/main/install.sh" | bash -s >/dev/null 2>&1
add_log "${tick:?}" "Brew" "Installed Homebrew" add_log "${tick:?}" "Brew" "Installed Homebrew"
fi fi
add_brew_bins_to_path "$brew_prefix" add_brew_bins_to_path "$brew_prefix"

View File

@ -1,7 +1,7 @@
Function Add-Msys2() { Function Add-Msys2() {
$msys_location = 'C:\msys64' $msys_location = 'C:\msys64'
if (-not(Test-Path $msys_location)) { if (-not(Test-Path $msys_location)) {
choco install msys2 -y choco install msys2 -y >$null 2>&1
$msys_location = 'C:\tools\msys64' $msys_location = 'C:\tools\msys64'
} }
return $msys_location return $msys_location
@ -15,7 +15,7 @@ Function Add-GrpcPhpPlugin() {
} else { } else {
$grpc_package = 'mingw-w64-x86_64-grpc' $grpc_package = 'mingw-w64-x86_64-grpc'
} }
$logs = . $msys_location\usr\bin\bash -l -c "pacman -S --noconfirm $grpc_package" $logs = . $msys_location\usr\bin\bash -l -c "pacman -S --noconfirm $grpc_package" >$null 2>&1
$grpc_version = Get-ToolVersion 'Write-Output' "$logs" $grpc_version = Get-ToolVersion 'Write-Output' "$logs"
Add-Path $msys_location\mingw64\bin Add-Path $msys_location\mingw64\bin
Set-Output grpc_php_plugin_path "$msys_location\mingw64\bin\grpc_php_plugin.exe" Set-Output grpc_php_plugin_path "$msys_location\mingw64\bin\grpc_php_plugin.exe"

View File

@ -26,7 +26,7 @@ add_grpc_php_plugin_brew() {
configure_brew configure_brew
[ -e /usr/local/bin/protoc ] && sudo mv /usr/local/bin/protoc /tmp/protoc && sudo mv /usr/local/include/google /tmp [ -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 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/ [ -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"
@ -50,9 +50,9 @@ add_grpc_php_plugin() {
grpc_tag=$1 grpc_tag=$1
license_path="" license_path=""
if [ "$grpc_tag" = "latest" ]; then if [ "$grpc_tag" = "latest" ]; then
add_grpc_php_plugin_brew add_grpc_php_plugin_brew >/dev/null 2>&1
else else
add_grpc_php_plugin_compile add_grpc_php_plugin_compile >/dev/null 2>&1
fi fi
set_output grpc_php_plugin_path "$(command -v grpc_php_plugin)" set_output grpc_php_plugin_path "$(command -v grpc_php_plugin)"
add_log "${tick:?}" "grpc_php_plugin" "Added grpc_php_plugin ${grpc_tag:1}" add_log "${tick:?}" "grpc_php_plugin" "Added grpc_php_plugin ${grpc_tag:1}"

View File

@ -28,8 +28,8 @@ Function Add-Mago() {
$arch_name = 'i686' $arch_name = 'i686'
} }
$url = "https://github.com/carthage-software/mago/releases/download/$mago_tag/mago-$mago_tag-$arch_name-pc-windows-msvc.zip" $url = "https://github.com/carthage-software/mago/releases/download/$mago_tag/mago-$mago_tag-$arch_name-pc-windows-msvc.zip"
Get-File -Url $url -OutFile $bin_dir\mago.zip Get-File -Url $url -OutFile $bin_dir\mago.zip >$null 2>&1
Expand-Archive -Path $bin_dir\mago.zip -DestinationPath $bin_dir\mago -Force Expand-Archive -Path $bin_dir\mago.zip -DestinationPath $bin_dir\mago -Force >$null 2>&1
Move-Item -Path $bin_dir\mago\mago-$mago_tag-$arch_name-pc-windows-msvc\mago.exe -Destination $bin_dir\mago.exe -Force Move-Item -Path $bin_dir\mago\mago-$mago_tag-$arch_name-pc-windows-msvc\mago.exe -Destination $bin_dir\mago.exe -Force
Add-ToProfile $current_profile 'mago' "New-Alias mago $bin_dir\mago.exe" Add-ToProfile $current_profile 'mago' "New-Alias mago $bin_dir\mago.exe"
Add-Log $tick "mago" "Added mago $mago_tag" Add-Log $tick "mago" "Added mago $mago_tag"

View File

@ -24,6 +24,6 @@ add_mago() {
sudo tar -xzf /tmp/mago.tar.gz -C /tmp/ sudo tar -xzf /tmp/mago.tar.gz -C /tmp/
sudo mv /tmp/mago-$mago_tag-$arch-$platform/mago /usr/local/bin/mago sudo mv /tmp/mago-$mago_tag-$arch-$platform/mago /usr/local/bin/mago
sudo chmod +x /usr/local/bin/mago sudo chmod +x /usr/local/bin/mago
) ) >/dev/null 2>&1
add_log "${tick:?}" "mago" "Added mago $mago_tag" add_log "${tick:?}" "mago" "Added mago $mago_tag"
} }

View File

@ -31,7 +31,7 @@ set_base_version() {
else else
set_base_version_codename set_base_version_codename
set_base_version_id set_base_version_id
printf "ID=%s\nVERSION_ID=%s\nVERSION_CODENAME=%s\n" "$ID" "$VERSION_ID" "$VERSION_CODENAME" | tee /tmp/os-release printf "ID=%s\nVERSION_ID=%s\nVERSION_CODENAME=%s\n" "$ID" "$VERSION_ID" "$VERSION_CODENAME" | tee /tmp/os-release >/dev/null 2>&1
fi fi
} }
@ -59,8 +59,8 @@ update_lists() {
list="$list_file" list="$list_file"
fi fi
if [ ! -e "$status_file" ]; then if [ ! -e "$status_file" ]; then
update_lists_helper "$list" update_lists_helper "$list" >/dev/null 2>&1
echo '' | tee "$status_file" echo '' | tee "$status_file" >/dev/null 2>&1
fi fi
} }
@ -100,7 +100,7 @@ add_key() {
key_urls+=("$ppa_sp/keys/$ppa.gpg") key_urls+=("$ppa_sp/keys/$ppa.gpg")
[ ! -e "$key_source" ] && get -q -n "$key_file" "${key_urls[@]}" [ ! -e "$key_source" ] && get -q -n "$key_file" "${key_urls[@]}"
if [[ "$(file "$key_file")" =~ .*('Public-Key (old)'|'Secret-Key') ]]; then if [[ "$(file "$key_file")" =~ .*('Public-Key (old)'|'Secret-Key') ]]; then
sudo gpg --batch --yes --dearmor "$key_file" && sudo mv "$key_file".gpg "$key_file" sudo gpg --batch --yes --dearmor "$key_file" >/dev/null 2>&1 && sudo mv "$key_file".gpg "$key_file"
fi fi
} }
@ -135,7 +135,7 @@ add_list() {
[ -e "$key_source" ] && key_file=$key_source || key_file="$key_dir"/"${ppa/\//-}"-keyring.gpg [ -e "$key_source" ] && key_file=$key_source || key_file="$key_dir"/"${ppa/\//-}"-keyring.gpg
add_key "$ppa" "$ppa_url" "$package_dist" "$key_source" "$key_file" add_key "$ppa" "$ppa_url" "$package_dist" "$key_source" "$key_file"
sudo rm -rf "$list_dir"/"${ppa/\//-}".list || true sudo rm -rf "$list_dir"/"${ppa/\//-}".list || true
echo "deb [arch=$arch signed-by=$key_file] $ppa_url $package_dist $branches" | sudo tee -a "$list_dir"/"${ppa%%/*}"-"$ID"-"${ppa#*/}"-"$package_dist".list echo "deb [arch=$arch signed-by=$key_file] $ppa_url $package_dist $branches" | sudo tee -a "$list_dir"/"${ppa%%/*}"-"$ID"-"${ppa#*/}"-"$package_dist".list >/dev/null 2>&1
update_lists "$ppa" "$ppa_search" update_lists "$ppa" "$ppa_search"
. /etc/os-release . /etc/os-release
fi fi

View File

@ -29,8 +29,8 @@ Function Add-Protoc() {
$arch_num = '32' $arch_num = '32'
} }
$url = "https://github.com/protocolbuffers/protobuf/releases/download/$protobuf_tag/protoc-$($protobuf_tag -replace 'v', '')-win$arch_num.zip" $url = "https://github.com/protocolbuffers/protobuf/releases/download/$protobuf_tag/protoc-$($protobuf_tag -replace 'v', '')-win$arch_num.zip"
Get-File -Url $url -OutFile $bin_dir\protoc.zip Get-File -Url $url -OutFile $bin_dir\protoc.zip >$null 2>&1
Expand-Archive -Path $bin_dir\protoc.zip -DestinationPath $bin_dir\protoc -Force Expand-Archive -Path $bin_dir\protoc.zip -DestinationPath $bin_dir\protoc -Force >$null 2>&1
Move-Item -Path $bin_dir\protoc\bin\protoc.exe -Destination $bin_dir\protoc.exe Move-Item -Path $bin_dir\protoc\bin\protoc.exe -Destination $bin_dir\protoc.exe
Add-ToProfile $current_profile 'protoc' "New-Alias protoc $bin_dir\protoc.exe" Add-ToProfile $current_profile 'protoc' "New-Alias protoc $bin_dir\protoc.exe"
Add-Log $tick "protoc" "Added protoc $($protobuf_tag -replace 'v', '')" Add-Log $tick "protoc" "Added protoc $($protobuf_tag -replace 'v', '')"

View File

@ -22,7 +22,7 @@ add_protoc() {
get -q -n /tmp/protobuf.zip "https://github.com/protocolbuffers/protobuf/releases/download/$protobuf_tag/protoc-${protobuf_tag:1}-$platform-$arch.zip" get -q -n /tmp/protobuf.zip "https://github.com/protocolbuffers/protobuf/releases/download/$protobuf_tag/protoc-${protobuf_tag:1}-$platform-$arch.zip"
sudo unzip /tmp/protobuf.zip -d /usr/local/ sudo unzip /tmp/protobuf.zip -d /usr/local/
sudo chmod -R 777 /usr/local/bin/protoc /usr/local/include/google sudo chmod -R 777 /usr/local/bin/protoc /usr/local/include/google
) ) >/dev/null 2>&1
add_log "${tick:?}" "protoc" "Added protoc ${protobuf_tag:1}" add_log "${tick:?}" "protoc" "Added protoc ${protobuf_tag:1}"
printf "$GROUP\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "protoc" "Click to read the protoc related license information" printf "$GROUP\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "protoc" "Click to read the protoc related license information"
curl "${curl_opts[@]:?}" https://raw.githubusercontent.com/protocolbuffers/protobuf/main/LICENSE curl "${curl_opts[@]:?}" https://raw.githubusercontent.com/protocolbuffers/protobuf/main/LICENSE

View File

@ -1,18 +1,32 @@
Function Add-Symfony() { Function Add-Symfony() {
$arch_name ='amd64' param(
if(-not([Environment]::Is64BitOperatingSystem) -or $version -lt '7.0') { [Parameter(Mandatory = $true, Position = 0, HelpMessage = 'Symfony version to be installed')]
$arch_name = '386' [string] $protobuf_tag
} )
$url = "https://github.com/symfony-cli/symfony-cli/releases/latest/download/symfony-cli_windows_${arch_name}.zip" $protobuf_tag = $protobuf_tag.replace('v', '')
Get-File -Url $url -OutFile $bin_dir\symfony.zip if($protobuf_tag -ne 'latest' -and $protobuf_tag -notmatch '^\d+(\.\d+)*$') {
Expand-Archive -Path $bin_dir\symfony.zip -DestinationPath $bin_dir -Force Add-Log $cross "symfony-cli" "Invalid symfony version: $protobuf_tag"
if(Test-Path $bin_dir\symfony.exe) {
Copy-Item -Path $bin_dir\symfony.exe -Destination $bin_dir\symfony-cli.exe > $null 2>&1
Add-ToProfile $current_profile 'symfony' "New-Alias symfony $bin_dir\symfony.exe"
Add-ToProfile $current_profile 'symfony_cli' "New-Alias symfony-cli $bin_dir\symfony-cli.exe"
$tool_version = Get-ToolVersion symfony "-V"
Add-Log $tick "symfony-cli" "Added symfony-cli $tool_version"
} else { } else {
Add-Log $cross "symfony-cli" "Could not setup symfony-cli" $arch_name = 'amd64'
if (-not ([Environment]::Is64BitOperatingSystem) -or $version -lt '7.0') {
$arch_name = '386'
}
$symfony_releases = "https://github.com/symfony-cli/symfony-cli/releases"
if ($protobuf_tag -eq 'latest') {
$url = "$symfony_releases/latest/download/symfony-cli_windows_${arch_name}.zip"
} else {
$url = "$symfony_releases/download/v$protobuf_tag/symfony-cli_windows_${arch_name}.zip"
}
Get-File -Url $url -OutFile $bin_dir\symfony.zip > $null 2>&1
Expand-Archive -Path $bin_dir\symfony.zip -DestinationPath $bin_dir -Force > $null 2>&1
if (Test-Path $bin_dir\symfony.exe) {
Copy-Item -Path $bin_dir\symfony.exe -Destination $bin_dir\symfony-cli.exe > $null 2>&1
Add-ToProfile $current_profile 'symfony' "New-Alias symfony $bin_dir\symfony.exe"
Add-ToProfile $current_profile 'symfony_cli' "New-Alias symfony-cli $bin_dir\symfony-cli.exe"
$tool_version = Get-ToolVersion symfony "-V"
Add-Log $tick "symfony-cli" "Added symfony-cli $tool_version"
} else {
Add-Log $cross "symfony-cli" "Could not setup symfony-cli"
}
} }
} }

View File

@ -1,41 +1,44 @@
add_symfony_with_brew() {
add_brew_tap symfony-cli/homebrew-tap
brew install symfony-cli/tap/symfony-cli
}
get_symfony_artifact_url() { get_symfony_artifact_url() {
arch=$(dpkg --print-architecture) local symfony_tag=$1
url=$(get -s -n "" https://raw.githubusercontent.com/symfony-cli/homebrew-tap/main/Formula/symfony-cli.rb 2<&1 | grep -m 1 "url.*linux.*${arch}" | cut -d\" -f 2) local os
if [ -z "$url" ]; then local arch
url=$(get -s -n "" https://api.github.com/repos/symfony-cli/symfony-cli/releases 2<&1 | grep -m 1 "url.*linux.*${arch}.*gz\"" | cut -d\" -f 4) os="$(uname -s | tr '[:upper:]' '[:lower:]')"
fi arch="$(uname -m)"
echo "$url" case "$arch" in
arm|armv6*|armv7*) arch="armv6" ;;
aarch64*|armv8*|arm64) arch="arm64" ;;
i[36]86) arch="386" ;;
x86_64|amd64) arch="amd64" ;;
esac
[ "$os" = "darwin" ] && arch="all"
symfony_releases="https://github.com/symfony-cli/symfony-cli/releases"
if [ "$symfony_tag" = "latest" ]; then
echo "$symfony_releases/latest/download/symfony-cli_${os}_${arch}.tar.gz"
else
echo "$symfony_releases/download/v$symfony_tag/symfony-cli_${os}_${arch}.tar.gz"
fi
} }
add_symfony_helper() { add_symfony_helper() {
if [ "$(uname -s)" = "Linux" ]; then local install_dir=/usr/local/bin
url="$(get_symfony_artifact_url)" [ "$(uname -s)" = "Darwin" ] && install_dir=${brew_prefix:?}/bin
if [ -z "$url" ]; then get -s -n "" "$(get_symfony_artifact_url "$symfony_tag")" | sudo tar -xz -C "$install_dir" 2>/dev/null
. "${0%/*}"/tools/brew.sh sudo chmod a+x "$install_dir"/symfony
configure_brew
add_symfony_with_brew
else
get -s -n "" "$url" | sudo tar -xz -C "${tool_path_dir:?}" 2>/dev/null
sudo chmod a+x /usr/local/bin/symfony
fi
elif [ "$(uname -s)" = "Darwin" ]; then
add_symfony_with_brew
fi
} }
add_symfony() { add_symfony() {
add_symfony_helper local symfony_tag="${1/v/}"
symfony_path="$(command -v symfony)" if ! [[ "$symfony_tag" =~ ^[0-9]+(\.[0-9]+)*$ || "$symfony_tag" == 'latest' ]]; then
if [[ -n "$symfony_path" ]]; then add_log "${cross:?}" "symfony-cli" "Version '$symfony_tag' is not valid for symfony-cli"
sudo ln -s "$symfony_path" "${tool_path_dir:?}"/symfony-cli
tool_version=$(get_tool_version "symfony" "-V")
add_log "${tick:?}" "symfony-cli" "Added symfony-cli $tool_version"
else else
add_log "${cross:?}" "symfony-cli" "Could not setup symfony-cli" add_symfony_helper "$symfony_tag" >/dev/null 2>&1
symfony_path="$(command -v symfony)"
if [[ -n "$symfony_path" ]]; then
sudo ln -s "$symfony_path" "${tool_path_dir:?}"/symfony-cli
tool_version=$(get_tool_version "symfony" "-V")
add_log "${tick:?}" "symfony-cli" "Added symfony-cli $tool_version"
else
add_log "${cross:?}" "symfony-cli" "Could not setup symfony-cli"
fi
fi fi
} }

View File

@ -43,7 +43,7 @@ set_output() {
name=$1 name=$1
value=$2 value=$2
if [ "${GITHUB_ACTIONS}" = "true" ]; then if [ "${GITHUB_ACTIONS}" = "true" ]; then
echo "${name}=${value}" | tee -a "$GITHUB_OUTPUT" echo "${name}=${value}" | tee -a "$GITHUB_OUTPUT" >/dev/null 2>&1
fi fi
} }
@ -68,7 +68,7 @@ read_env() {
if [[ "$runner" = "github" && "${ImageOS}" =~ ubuntu.* ]]; then if [[ "$runner" = "github" && "${ImageOS}" =~ ubuntu.* ]]; then
if ! check_ppa ondrej/php; then if ! check_ppa ondrej/php; then
update=true update=true
echo '' | sudo tee /tmp/sp_update echo '' | sudo tee /tmp/sp_update >/dev/null 2>&1
elif [ -e /tmp/sp_update ]; then elif [ -e /tmp/sp_update ]; then
update=true update=true
fi fi
@ -91,7 +91,7 @@ acquire_lock() {
else else
if sudo test -f "$lock_path/pid"; then if sudo test -f "$lock_path/pid"; then
lock_pid=$(sudo cat "$lock_path/pid") lock_pid=$(sudo cat "$lock_path/pid")
if ! ps -p "$lock_pid" ; then if ! ps -p "$lock_pid" >/dev/null 2>&1; then
sudo rm -rf "$lock_path" sudo rm -rf "$lock_path"
continue continue
fi fi
@ -171,10 +171,10 @@ add_path() {
path_to_add=$1 path_to_add=$1
[[ ":$PATH:" == *":$path_to_add:"* ]] && return [[ ":$PATH:" == *":$path_to_add:"* ]] && return
if [[ -n "$GITHUB_PATH" ]]; then if [[ -n "$GITHUB_PATH" ]]; then
echo "$path_to_add" | tee -a "$GITHUB_PATH" echo "$path_to_add" | tee -a "$GITHUB_PATH" >/dev/null 2>&1
else else
profile=$(get_shell_profile) profile=$(get_shell_profile)
([ -e "$profile" ] && grep -q ":$path_to_add\"" "$profile" 2>/dev/null) || echo "export PATH=\"\${PATH:+\${PATH}:}\"$path_to_add" | sudo tee -a "$profile" ([ -e "$profile" ] && grep -q ":$path_to_add\"" "$profile" 2>/dev/null) || echo "export PATH=\"\${PATH:+\${PATH}:}\"$path_to_add" | sudo tee -a "$profile" >/dev/null 2>&1
fi fi
export PATH="${PATH:+${PATH}:}$path_to_add" export PATH="${PATH:+${PATH}:}$path_to_add"
} }
@ -196,10 +196,10 @@ add_env() {
env_name=$1 env_name=$1
env_value=$2 env_value=$2
if [[ -n "$GITHUB_ENV" ]]; then if [[ -n "$GITHUB_ENV" ]]; then
echo "$env_name=$env_value" | tee -a "$GITHUB_ENV" echo "$env_name=$env_value" | tee -a "$GITHUB_ENV" >/dev/null 2>&1
else else
profile=$(get_shell_profile) profile=$(get_shell_profile)
echo "export $env_name=\"$env_value\"" | sudo tee -a "$profile" echo "export $env_name=\"$env_value\"" | sudo tee -a "$profile" >/dev/null 2>&1
fi fi
export "$env_name"="$env_value" export "$env_name"="$env_value"
} }
@ -220,7 +220,7 @@ self_hosted_setup() {
add_log "$cross" "PHP" "PHP $version is not supported on self-hosted runner" add_log "$cross" "PHP" "PHP $version is not supported on self-hosted runner"
exit 1 exit 1
else else
self_hosted_helper self_hosted_helper >/dev/null 2>&1
add_env RUNNER_TOOL_CACHE /opt/hostedtoolcache add_env RUNNER_TOOL_CACHE /opt/hostedtoolcache
fi fi
fi fi
@ -248,8 +248,8 @@ configure_php() {
[[ "$arch" = "arm64" || "$arch" = "aarch64" ]] && jit_ini="$ini_config_dir"/jit_aarch64.ini || jit_ini="$ini_config_dir"/jit.ini [[ "$arch" = "arm64" || "$arch" = "aarch64" ]] && jit_ini="$ini_config_dir"/jit_aarch64.ini || jit_ini="$ini_config_dir"/jit.ini
jit_config_files=("$jit_ini") jit_config_files=("$jit_ini")
[[ "$version" =~ $xdebug3_versions ]] && ini_config_files+=("$ini_config_dir"/xdebug.ini) [[ "$version" =~ $xdebug3_versions ]] && ini_config_files+=("$ini_config_dir"/xdebug.ini)
cat "${ini_config_files[@]}" | sudo tee -a "${ini_file[@]:?}" cat "${ini_config_files[@]}" | sudo tee -a "${ini_file[@]:?}" >/dev/null 2>&1
[[ "$version" =~ $jit_versions ]] && cat "${jit_config_files[@]}" | sudo tee -a "${pecl_file:-${ini_file[@]}}" [[ "$version" =~ $jit_versions ]] && cat "${jit_config_files[@]}" | sudo tee -a "${pecl_file:-${ini_file[@]}}" >/dev/null 2>&1
} }
# Function to get PHP version in semver format. # Function to get PHP version in semver format.

View File

@ -355,7 +355,7 @@ if(-not($env:ImageOS) -and -not($env:ImageVersion)) {
$bin_dir = 'C:\tools\bin' $bin_dir = 'C:\tools\bin'
$php_dir = "$php_dir$version" $php_dir = "$php_dir$version"
$ext_dir = "$php_dir\ext" $ext_dir = "$php_dir\ext"
Get-CleanPSProfile Get-CleanPSProfile >$null 2>&1
New-Item $bin_dir -Type Directory -Force > $null 2>&1 New-Item $bin_dir -Type Directory -Force > $null 2>&1
Add-Path -PathItem $bin_dir Add-Path -PathItem $bin_dir
if($version -lt 5.6) { if($version -lt 5.6) {
@ -368,12 +368,12 @@ if(-not($env:ImageOS) -and -not($env:ImageVersion)) {
} }
New-Item $php_dir -Type Directory -Force > $null 2>&1 New-Item $php_dir -Type Directory -Force > $null 2>&1
Add-Path -PathItem $php_dir Add-Path -PathItem $php_dir
setx PHPROOT $php_dir setx PHPROOT $php_dir >$null 2>&1
Add-Env -EnvName RUNNER_TOOL_CACHE -EnvValue $env:TEMP Add-Env -EnvName RUNNER_TOOL_CACHE -EnvValue $env:TEMP
} else { } else {
$current_profile = "$PSHOME\Profile.ps1" $current_profile = "$PSHOME\Profile.ps1"
if(-not(Test-Path -LiteralPath $current_profile)) { if(-not(Test-Path -LiteralPath $current_profile)) {
New-Item -Path $current_profile -ItemType "file" -Force New-Item -Path $current_profile -ItemType "file" -Force >$null 2>&1
} }
} }
@ -381,9 +381,9 @@ $src = Join-Path -Path $PSScriptRoot -ChildPath \..
. $src\scripts\tools\add_tools.ps1 . $src\scripts\tools\add_tools.ps1
. $src\scripts\extensions\add_extensions.ps1 . $src\scripts\extensions\add_extensions.ps1
Add-Printf Add-Printf >$null 2>&1
Step-Log "Setup PhpManager" Step-Log "Setup PhpManager"
Install-PSPackage PhpManager PhpManager\PhpManager "$github/mlocati/powershell-phpmanager/releases/latest/download/PhpManager.zip" Get-Php Install-PSPackage PhpManager PhpManager\PhpManager "$github/mlocati/powershell-phpmanager/releases/latest/download/PhpManager.zip" Get-Php >$null 2>&1
Add-Log $tick "PhpManager" "Installed" Add-Log $tick "PhpManager" "Installed"
Step-Log "Setup PHP" Step-Log "Setup PHP"
@ -412,7 +412,7 @@ if($version -eq 'pre') {
} }
if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version -replace '^(\d+(\.\d+)*).*', '$1.'))) -or $ts -ne $installed.ThreadSafe) { if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version -replace '^(\d+(\.\d+)*).*', '$1.'))) -or $ts -ne $installed.ThreadSafe) {
if ($version -lt '7.0' -and ($null -eq (Get-Module -ListAvailable -Name VcRedist))) { if ($version -lt '7.0' -and ($null -eq (Get-Module -ListAvailable -Name VcRedist))) {
Install-PSPackage VcRedist VcRedist-main\VcRedist\VcRedist "$github/aaronparker/VcRedist/archive/main.zip" Get-VcList Install-PSPackage VcRedist VcRedist-main\VcRedist\VcRedist "$github/aaronparker/VcRedist/archive/main.zip" Get-VcList >$null 2>&1
} }
try { try {
if ($version -match $nightly_versions) { if ($version -match $nightly_versions) {
@ -425,7 +425,7 @@ if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version
} catch { } } catch { }
} else { } else {
if($env:update -eq 'true') { if($env:update -eq 'true') {
Update-Php $php_dir Update-Php $php_dir >$null 2>&1
$status = "Updated to" $status = "Updated to"
} else { } else {
$status = "Found" $status = "Found"
@ -443,7 +443,7 @@ if($installed.MajorMinorVersion -ne $version) {
Write-Error "Could not setup PHP $version" -ErrorAction Stop Write-Error "Could not setup PHP $version" -ErrorAction Stop
} }
if($version -lt "5.5") { if($version -lt "5.5") {
('libeay32.dll', 'ssleay32.dll') | ForEach-Object -Parallel { Invoke-WebRequest -Uri "$using:php_builder/releases/download/openssl-1.0.2u/$_" -OutFile $using:php_dir\$_ } ('libeay32.dll', 'ssleay32.dll') | ForEach-Object -Parallel { Invoke-WebRequest -Uri "$using:php_builder/releases/download/openssl-1.0.2u/$_" -OutFile $using:php_dir\$_ >$null 2>&1 }
} else { } else {
$enable_extensions += ('opcache') $enable_extensions += ('opcache')
} }

View File

@ -285,10 +285,10 @@ export async function getExtensionPrefix(extension: string): Promise<string> {
export async function suppressOutput(os: string): Promise<string> { export async function suppressOutput(os: string): Promise<string> {
switch (os) { switch (os) {
case 'win32': case 'win32':
return ' '; return ' >$null 2>&1';
case 'linux': case 'linux':
case 'darwin': case 'darwin':
return ' '; return ' >/dev/null 2>&1';
default: default:
return await log('Platform ' + os + ' is not supported', os, 'error'); return await log('Platform ' + os + ' is not supported', os, 'error');
} }