setup-php 2.15.0 → 2.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +157 -143
- package/lib/config.d.ts +3 -3
- package/lib/config.js +71 -71
- package/lib/config.js.map +1 -1
- package/lib/coverage.d.ts +5 -4
- package/lib/coverage.js +97 -87
- package/lib/coverage.js.map +1 -1
- package/lib/extensions.d.ts +4 -4
- package/lib/extensions.js +214 -210
- package/lib/extensions.js.map +1 -1
- package/lib/fetch.d.ts +1 -0
- package/lib/fetch.js +63 -0
- package/lib/fetch.js.map +1 -0
- package/lib/install.d.ts +2 -2
- package/lib/install.js +75 -80
- package/lib/install.js.map +1 -1
- package/lib/tools.d.ts +23 -24
- package/lib/tools.js +373 -386
- package/lib/tools.js.map +1 -1
- package/lib/utils.d.ts +21 -23
- package/lib/utils.js +261 -293
- package/lib/utils.js.map +1 -1
- package/package.json +21 -20
- package/src/config.ts +8 -8
- package/src/configs/brew_extensions +2 -0
- package/src/configs/composer.env +2 -0
- package/src/configs/ini/jit.ini +3 -0
- package/src/configs/ini/php.ini +2 -0
- package/src/configs/ini/xdebug.ini +1 -0
- package/src/configs/os_releases.csv +2 -0
- package/src/configs/php-versions.json +2 -2
- package/src/configs/php_packages +12 -0
- package/src/configs/{php.json → pm/php.json} +0 -0
- package/src/configs/{phpunit.json → pm/phpunit.json} +24 -24
- package/src/configs/tools.json +48 -26
- package/src/configs/tools_schema.json +11 -0
- package/src/coverage.ts +47 -55
- package/src/extensions.ts +23 -19
- package/src/fetch.ts +54 -0
- package/src/install.ts +27 -40
- package/src/scripts/darwin.sh +72 -39
- package/src/scripts/extensions/add_extensions.ps1 +194 -0
- package/src/scripts/extensions/add_extensions.sh +184 -0
- package/src/scripts/{ext → extensions}/blackfire.ps1 +0 -0
- package/src/scripts/{ext → extensions}/blackfire.sh +0 -0
- package/src/scripts/{ext → extensions}/couchbase.sh +0 -0
- package/src/scripts/{ext → extensions}/cubrid.sh +3 -3
- package/src/scripts/{ext → extensions}/extension_map.php +36 -13
- package/src/scripts/{ext → extensions}/firebird.ps1 +0 -0
- package/src/scripts/{ext → extensions}/firebird.sh +0 -0
- package/src/scripts/{ext → extensions}/gearman.sh +0 -0
- package/src/scripts/{ext → extensions}/geos.sh +0 -0
- package/src/scripts/{ext → extensions}/http.ps1 +0 -0
- package/src/scripts/{ext → extensions}/http.sh +4 -15
- package/src/scripts/{ext → extensions}/intl.sh +0 -0
- package/src/scripts/{ext → extensions}/ioncube.ps1 +2 -2
- package/src/scripts/{ext → extensions}/ioncube.sh +2 -2
- package/src/scripts/{ext → extensions}/oci.ps1 +39 -14
- package/src/scripts/{ext → extensions}/oci.sh +3 -3
- package/src/scripts/{ext → extensions}/patches/firebird.sh +0 -0
- package/src/scripts/{ext → extensions}/patches/geos.sh +0 -0
- package/src/scripts/{ext → extensions}/patches/http.sh +0 -0
- package/src/scripts/{ext → extensions}/patches/pdo_oci.sh +0 -0
- package/src/scripts/{ext → extensions}/patches/phpize.sh +0 -0
- package/src/scripts/{ext → extensions}/patches/protobuf.sh +0 -0
- package/src/scripts/{ext → extensions}/phalcon.ps1 +0 -0
- package/src/scripts/{ext → extensions}/phalcon.sh +4 -5
- package/src/scripts/{ext → extensions}/source.sh +23 -22
- package/src/scripts/extensions/sqlsrv.sh +15 -0
- package/src/scripts/linux.sh +71 -40
- package/src/scripts/tools/add_tools.ps1 +220 -10
- package/src/scripts/tools/add_tools.sh +166 -15
- package/src/scripts/tools/blackfire.sh +2 -1
- package/src/scripts/tools/grpc_php_plugin.ps1 +4 -4
- package/src/scripts/tools/grpc_php_plugin.sh +3 -3
- package/src/scripts/tools/ppa.sh +12 -9
- package/src/scripts/tools/protoc.ps1 +2 -2
- package/src/scripts/tools/protoc.sh +2 -2
- package/src/scripts/tools/symfony.ps1 +18 -0
- package/src/scripts/tools/symfony.sh +18 -0
- package/src/scripts/unix.sh +186 -0
- package/src/scripts/win32.ps1 +145 -356
- package/src/tools.ts +62 -82
- package/src/utils.ts +57 -145
- package/lib/sapi.js +0 -64
- package/src/scripts/common.sh +0 -366
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<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>
|
|
11
11
|
<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>
|
|
12
12
|
<a href="https://github.com/shivammathur/setup-php/blob/master/LICENSE" title="license"><img alt="LICENSE" src="https://img.shields.io/badge/license-MIT-428f7e.svg?logo=open%20source%20initiative&logoColor=white&labelColor=555555"></a>
|
|
13
|
-
<a href="#tada-php-support" title="PHP Versions Supported"><img alt="PHP Versions Supported" src="https://img.shields.io/badge/php-5.3%20to%208.2-777bb3.svg?logo=php&logoColor=white&labelColor=555555"></a>
|
|
13
|
+
<a href="#tada-php-support" title="PHP Versions Supported"><img alt="PHP Versions Supported" src="https://img.shields.io/badge/php-5.3%20to%208.2-777bb3.svg?logo=php&logoColor=white&labelColor=555555"></a>
|
|
14
14
|
</p>
|
|
15
15
|
<p align="center">
|
|
16
16
|
<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>
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
<a href="https://status.setup-php.com" title="setup-php status"><img alt="setup-php status" src="https://img.shields.io/badge/status-subscribe-28A745?logo=statuspage&logoColor=28A745&labelColor=555555"></a>
|
|
19
19
|
</p>
|
|
20
20
|
|
|
21
|
-
Setup PHP with required extensions, php.ini configuration, code-coverage support and various tools like composer in [GitHub Actions](https://github.com/features/actions "GitHub Actions"). This action gives you a cross
|
|
21
|
+
Setup PHP with required extensions, php.ini configuration, code-coverage support and various tools like composer in [GitHub Actions](https://github.com/features/actions "GitHub Actions"). This action gives you a cross-platform interface to set up the PHP environment you need to test your application. Refer to [Usage](#memo-usage "How to use this") section and [examples](#examples "Examples of use") to see how to use this.
|
|
22
22
|
|
|
23
23
|
## Contents
|
|
24
24
|
|
|
25
25
|
- [OS/Platform Support](#cloud-osplatform-support)
|
|
26
26
|
- [GitHub-Hosted Runners](#github-hosted-runners)
|
|
27
27
|
- [Self-Hosted Runners](#self-hosted-runners)
|
|
28
|
-
- [PHP Support](#tada-php-support)
|
|
28
|
+
- [PHP Support](#tada-php-support)
|
|
29
29
|
- [PHP Extension Support](#heavy_plus_sign-php-extension-support)
|
|
30
30
|
- [Tools Support](#wrench-tools-support)
|
|
31
31
|
- [Coverage Support](#signal_strength-coverage-support)
|
|
@@ -37,11 +37,11 @@ Setup PHP with required extensions, php.ini configuration, code-coverage support
|
|
|
37
37
|
- [Outputs](#outputs)
|
|
38
38
|
- [Flags](#flags)
|
|
39
39
|
- [Basic Setup](#basic-setup)
|
|
40
|
-
- [Matrix Setup](#matrix-setup)
|
|
40
|
+
- [Matrix Setup](#matrix-setup)
|
|
41
41
|
- [Nightly Build Setup](#nightly-build-setup)
|
|
42
42
|
- [Thread Safe Setup](#thread-safe-setup)
|
|
43
43
|
- [Force Update Setup](#force-update-setup)
|
|
44
|
-
- [Verbose Setup](#verbose-setup)
|
|
44
|
+
- [Verbose Setup](#verbose-setup)
|
|
45
45
|
- [Multi-Arch Setup](#multi-arch-setup)
|
|
46
46
|
- [Self Hosted Setup](#self-hosted-setup)
|
|
47
47
|
- [Local Testing Setup](#local-testing-setup)
|
|
@@ -61,36 +61,37 @@ Setup PHP with required extensions, php.ini configuration, code-coverage support
|
|
|
61
61
|
|
|
62
62
|
## :cloud: OS/Platform Support
|
|
63
63
|
|
|
64
|
-
Both `GitHub-hosted` and `self-hosted` runners are
|
|
64
|
+
Both `GitHub-hosted` and `self-hosted` runners are supported by `setup-php` on the following OS/Platforms.
|
|
65
65
|
|
|
66
66
|
### GitHub-Hosted Runners
|
|
67
67
|
|
|
68
|
-
|Virtual environment|YAML workflow label|Pre-installed PHP|
|
|
69
|
-
|
|
70
|
-
|Ubuntu
|
|
71
|
-
|Ubuntu
|
|
72
|
-
|Windows Server
|
|
73
|
-
|Windows Server
|
|
74
|
-
|macOS
|
|
75
|
-
|macOS
|
|
68
|
+
| Virtual environment | YAML workflow label | Pre-installed PHP |
|
|
69
|
+
|-----------------------|------------------------------------|------------------------|
|
|
70
|
+
| Ubuntu 20.04 | `ubuntu-latest` or `ubuntu-20.04` | `PHP 7.4` to `PHP 8.1` |
|
|
71
|
+
| Ubuntu 18.04 | `ubuntu-18.04` | `PHP 7.1` to `PHP 8.1` |
|
|
72
|
+
| Windows Server 2022 | `windows-latest` or `windows-2022` | `PHP 8.1` |
|
|
73
|
+
| Windows Server 2019 | `windows-2019` | `PHP 8.1` |
|
|
74
|
+
| macOS Big Sur 11.x | `macos-11` | `PHP 8.1` |
|
|
75
|
+
| macOS Catalina 10.15 | `macos-latest` or `macos-10.15` | `PHP 8.1` |
|
|
76
76
|
|
|
77
77
|
### Self-Hosted Runners
|
|
78
78
|
|
|
79
|
-
|Host OS/Virtual environment|YAML workflow label|
|
|
80
|
-
|
|
81
|
-
|Ubuntu
|
|
82
|
-
|Ubuntu 20.04
|
|
83
|
-
|Ubuntu
|
|
84
|
-
|Debian
|
|
85
|
-
|Debian 10
|
|
86
|
-
|Debian
|
|
87
|
-
|Windows 7 and newer
|
|
88
|
-
|Windows Server 2012 R2 and newer
|
|
89
|
-
|macOS
|
|
90
|
-
|macOS Big Sur 11.x x86_64/arm64
|
|
79
|
+
| Host OS/Virtual environment | YAML workflow label |
|
|
80
|
+
|----------------------------------|----------------------------|
|
|
81
|
+
| Ubuntu 21.04 | `self-hosted` or `Linux` |
|
|
82
|
+
| Ubuntu 20.04 | `self-hosted` or `Linux` |
|
|
83
|
+
| Ubuntu 18.04 | `self-hosted` or `Linux` |
|
|
84
|
+
| Debian 11 | `self-hosted` or `Linux` |
|
|
85
|
+
| Debian 10 | `self-hosted` or `Linux` |
|
|
86
|
+
| Debian 9 | `self-hosted` or `Linux` |
|
|
87
|
+
| Windows 7 and newer | `self-hosted` or `Windows` |
|
|
88
|
+
| Windows Server 2012 R2 and newer | `self-hosted` or `Windows` |
|
|
89
|
+
| macOS Monterey 12.x x86_64/arm64 | `self-hosted` or `macOS` |
|
|
90
|
+
| macOS Big Sur 11.x x86_64/arm64 | `self-hosted` or `macOS` |
|
|
91
|
+
| macOS Catalina 10.15 | `self-hosted` or `macOS` |
|
|
91
92
|
|
|
92
93
|
- Refer to the [self-hosted setup](#self-hosted-setup) to use the action on self-hosted runners.
|
|
93
|
-
- Operating systems based on the above Ubuntu and Debian versions are also supported on
|
|
94
|
+
- Operating systems based on the above Ubuntu and Debian versions are also supported on best effort basis.
|
|
94
95
|
- If the requested PHP version is pre-installed, `setup-php` switches to it, otherwise it installs the PHP version.
|
|
95
96
|
|
|
96
97
|
## :tada: PHP Support
|
|
@@ -100,23 +101,23 @@ On all supported OS/Platforms the following PHP versions are supported as per th
|
|
|
100
101
|
- PHP 5.3 to PHP 8.2 on GitHub-hosted runners.
|
|
101
102
|
- PHP 5.6 to PHP 8.2 on self-hosted runners.
|
|
102
103
|
|
|
103
|
-
|PHP Version|Stability|Release Support|Runner Support|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
**Notes:**
|
|
119
|
-
- Specifying `8.
|
|
104
|
+
| PHP Version | Stability | Release Support | Runner Support |
|
|
105
|
+
|-------------|-----------|-----------------------|--------------------------------|
|
|
106
|
+
| `5.3` | `Stable` | `End of life` | `GitHub-hosted` |
|
|
107
|
+
| `5.4` | `Stable` | `End of life` | `GitHub-hosted` |
|
|
108
|
+
| `5.5` | `Stable` | `End of life` | `GitHub-hosted` |
|
|
109
|
+
| `5.6` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` |
|
|
110
|
+
| `7.0` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` |
|
|
111
|
+
| `7.1` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` |
|
|
112
|
+
| `7.2` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` |
|
|
113
|
+
| `7.3` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` |
|
|
114
|
+
| `7.4` | `Stable` | `Security fixes only` | `GitHub-hosted`, `self-hosted` |
|
|
115
|
+
| `8.0` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` |
|
|
116
|
+
| `8.1` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` |
|
|
117
|
+
| `8.2` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` |
|
|
118
|
+
|
|
119
|
+
**Notes:**
|
|
120
|
+
- Specifying `8.2` in `php-version` input installs a nightly build of `PHP 8.2.0-dev`. See [nightly build setup](#nightly-build-setup) for more information.
|
|
120
121
|
- To use JIT on `PHP 8.0` and above, refer to the [JIT configuration](#jit-configuration) section.
|
|
121
122
|
|
|
122
123
|
## :heavy_plus_sign: PHP Extension Support
|
|
@@ -129,7 +130,7 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
|
|
|
129
130
|
- name: Setup PHP with PECL extension
|
|
130
131
|
uses: shivammathur/setup-php@v2
|
|
131
132
|
with:
|
|
132
|
-
php-version: '8.
|
|
133
|
+
php-version: '8.1'
|
|
133
134
|
extensions: imagick, swoole
|
|
134
135
|
```
|
|
135
136
|
|
|
@@ -151,13 +152,13 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
|
|
|
151
152
|
extensions: swoole-1.9.3
|
|
152
153
|
```
|
|
153
154
|
|
|
154
|
-
-
|
|
155
|
+
- Extensions with pre-release versions available on `PECL` can be set up by suffixing the extension's name with its state i.e `alpha`, `beta`, `devel` or `snapshot`.
|
|
155
156
|
|
|
156
157
|
```yaml
|
|
157
158
|
- name: Setup PHP with pre-release PECL extension
|
|
158
159
|
uses: shivammathur/setup-php@v2
|
|
159
160
|
with:
|
|
160
|
-
php-version: '8.
|
|
161
|
+
php-version: '8.1'
|
|
161
162
|
extensions: xdebug-beta
|
|
162
163
|
```
|
|
163
164
|
|
|
@@ -167,19 +168,19 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
|
|
|
167
168
|
- name: Setup PHP and disable opcache
|
|
168
169
|
uses: shivammathur/setup-php@v2
|
|
169
170
|
with:
|
|
170
|
-
php-version: '8.
|
|
171
|
+
php-version: '8.1'
|
|
171
172
|
extensions: :opcache
|
|
172
173
|
```
|
|
173
174
|
|
|
174
175
|
- All shared extensions can be disabled by specifying `none`. When `none` is specified along with other extensions, it is hoisted to the start of the input. So, all the shared extensions will be disabled first, then rest of the extensions in the input will be processed.
|
|
175
|
-
|
|
176
|
-
**Note:** This disables all core and third-party shared extensions and thus, can break some tools which need them. So
|
|
176
|
+
|
|
177
|
+
**Note:** This disables all core and third-party shared extensions and thus, can break some tools which need them. Required extensions are enabled again when the tools are set up on a best-effort basis. So it is recommended to add the extensions required for your tools after `none` in the `extensions` input to avoid any issues.
|
|
177
178
|
|
|
178
179
|
```yaml
|
|
179
180
|
- name: Setup PHP without any shared extensions except mbstring
|
|
180
181
|
uses: shivammathur/setup-php@v2
|
|
181
182
|
with:
|
|
182
|
-
php-version: '8.
|
|
183
|
+
php-version: '8.1'
|
|
183
184
|
extensions: none, mbstring
|
|
184
185
|
```
|
|
185
186
|
|
|
@@ -189,8 +190,8 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
|
|
|
189
190
|
- name: Setup PHP with intl
|
|
190
191
|
uses: shivammathur/setup-php@v2
|
|
191
192
|
with:
|
|
192
|
-
php-version: '8.
|
|
193
|
-
extensions: intl-
|
|
193
|
+
php-version: '8.1'
|
|
194
|
+
extensions: intl-70.1
|
|
194
195
|
```
|
|
195
196
|
|
|
196
197
|
- Extensions loaded by default after `setup-php` runs can be found on the [wiki](https://github.com/shivammathur/setup-php/wiki).
|
|
@@ -200,13 +201,13 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
|
|
|
200
201
|
- `geos` on `Ubuntu` and `macOS`.
|
|
201
202
|
- `blackfire`, `couchbase`, `ioncube`, `oci8`, `pdo_firebird`, `pdo_oci`, `pecl_http`, `phalcon3` and `phalcon4` on all supported OS.
|
|
202
203
|
|
|
203
|
-
- By default, extensions which cannot be added or disabled gracefully leave an error message in the logs, the
|
|
204
|
+
- By default, extensions which cannot be added or disabled gracefully leave an error message in the logs, the execution is not interrupted. To change this behaviour you can set `fail-fast` flag to `true`.
|
|
204
205
|
|
|
205
206
|
```yaml
|
|
206
207
|
- name: Setup PHP with fail-fast
|
|
207
208
|
uses: shivammathur/setup-php@v2
|
|
208
209
|
with:
|
|
209
|
-
php-version: '8.
|
|
210
|
+
php-version: '8.1'
|
|
210
211
|
extensions: oci8
|
|
211
212
|
env:
|
|
212
213
|
fail-fast: true
|
|
@@ -216,13 +217,13 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
|
|
|
216
217
|
|
|
217
218
|
These tools can be set up globally using the `tools` input. It accepts a string in csv-format.
|
|
218
219
|
|
|
219
|
-
[`behat`], [`blackfire`], [`blackfire-player`], [`codeception`], [`composer`], [`composer-normalize`], [`composer-prefetcher`], [`composer-require-checker`], [`composer-unused`], [`cs2pr`], [`deployer`], [`flex`], [`grpc_php_plugin`], [`infection`], [`parallel-lint`], [`pecl`], [`phan`], [`phing`], [`phinx`], [`phive`], [`php-config`], [`php-cs-fixer`], [`phpcbf`], [`phpcpd`], [`phpcs`], [`phpdoc`] or [`phpDocumentor`], [`phpize`], [`phplint`], [`phpmd`], [`phpspec`], [`phpstan`], [`phpunit`], [`phpunit-bridge`], [`phpunit-polyfills`], [`prestissimo`], [`protoc`], [`psalm`], [`symfony`] or [`symfony-cli`], [`vapor`] or [`vapor-cli`], [`wp`] or [`wp-cli`]
|
|
220
|
+
[`behat`], [`blackfire`], [`blackfire-player`], [`churn`], [`codeception`], [`composer`], [`composer-normalize`], [`composer-prefetcher`], [`composer-require-checker`], [`composer-unused`], [`cs2pr`], [`deployer`], [`flex`], [`grpc_php_plugin`], [`infection`], [`parallel-lint`], [`pecl`], [`phan`], [`phing`], [`phinx`], [`phive`], [`php-config`], [`php-cs-fixer`], [`phpcbf`], [`phpcpd`], [`phpcs`], [`phpdoc`] or [`phpDocumentor`], [`phpize`], [`phplint`], [`phpmd`], [`phpspec`], [`phpstan`], [`phpunit`], [`phpunit-bridge`], [`phpunit-polyfills`], [`prestissimo`], [`protoc`], [`psalm`], [`symfony`] or [`symfony-cli`], [`vapor`] or [`vapor-cli`], [`wp`] or [`wp-cli`]
|
|
220
221
|
|
|
221
222
|
```yaml
|
|
222
223
|
- name: Setup PHP with tools
|
|
223
224
|
uses: shivammathur/setup-php@v2
|
|
224
225
|
with:
|
|
225
|
-
php-version: '8.
|
|
226
|
+
php-version: '8.1'
|
|
226
227
|
tools: php-cs-fixer, phpunit
|
|
227
228
|
```
|
|
228
229
|
|
|
@@ -232,7 +233,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
|
|
|
232
233
|
- name: Setup PHP with tools
|
|
233
234
|
uses: shivammathur/setup-php@v2
|
|
234
235
|
with:
|
|
235
|
-
php-version: '8.
|
|
236
|
+
php-version: '8.1'
|
|
236
237
|
tools: vimeo/psalm
|
|
237
238
|
```
|
|
238
239
|
|
|
@@ -251,8 +252,8 @@ These tools can be set up globally using the `tools` input. It accepts a string
|
|
|
251
252
|
- name: Setup PHP with tools
|
|
252
253
|
uses: shivammathur/setup-php@v2
|
|
253
254
|
with:
|
|
254
|
-
php-version: '8.
|
|
255
|
-
tools: php-cs-fixer:3, phpunit:
|
|
255
|
+
php-version: '8.1'
|
|
256
|
+
tools: php-cs-fixer:3.5, phpunit:9.5
|
|
256
257
|
env:
|
|
257
258
|
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
258
259
|
```
|
|
@@ -263,7 +264,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
|
|
|
263
264
|
- name: Setup PHP with composer v2
|
|
264
265
|
uses: shivammathur/setup-php@v2
|
|
265
266
|
with:
|
|
266
|
-
php-version: '8.
|
|
267
|
+
php-version: '8.1'
|
|
267
268
|
tools: composer:v2
|
|
268
269
|
```
|
|
269
270
|
|
|
@@ -273,32 +274,32 @@ These tools can be set up globally using the `tools` input. It accepts a string
|
|
|
273
274
|
- name: Setup PHP without composer
|
|
274
275
|
uses: shivammathur/setup-php@v2
|
|
275
276
|
with:
|
|
276
|
-
php-version: '8.
|
|
277
|
+
php-version: '8.1'
|
|
277
278
|
tools: none
|
|
278
279
|
```
|
|
279
280
|
|
|
280
|
-
-
|
|
281
|
+
- Tools `pear`, `pecl`, `phpize` and `php-config` are set up by default for all supported PHP versions on Linux and macOS.
|
|
281
282
|
|
|
282
283
|
- The latest version of `blackfire` cli is set up when `blackfire` is specified in tools input. Please refer to the [official documentation](https://blackfire.io/docs/integrations/ci/github-actions "Blackfire.io documentation for GitHub Actions") for using `blackfire` with GitHub Actions.
|
|
283
284
|
|
|
284
285
|
- Tools `prestissimo` and `composer-prefetcher` will be skipped unless `composer:v1` is also specified in tools input. It is recommended to drop `prestissimo` and use `composer v2`.
|
|
285
286
|
|
|
286
|
-
- By default, tools which cannot be set up gracefully leave an error message in the logs, the
|
|
287
|
+
- By default, expect `composer` tools which cannot be set up gracefully leave an error message in the logs, the execution is not interrupted. To change this behaviour you can set `fail-fast` flag to `true`.
|
|
287
288
|
|
|
288
289
|
```yaml
|
|
289
290
|
- name: Setup PHP with fail-fast
|
|
290
291
|
uses: shivammathur/setup-php@v2
|
|
291
292
|
with:
|
|
292
|
-
php-version: '8.
|
|
293
|
+
php-version: '8.1'
|
|
293
294
|
tools: deployer
|
|
294
295
|
env:
|
|
295
296
|
fail-fast: true
|
|
296
297
|
```
|
|
297
298
|
|
|
298
299
|
**Notes**
|
|
299
|
-
- Input `tools` is useful to set up tools which
|
|
300
|
-
- If you do not want to use all your dev-dependencies in
|
|
301
|
-
-
|
|
300
|
+
- Input `tools` is useful to set up tools which are only used in CI workflows, thus keeping your `composer.json` tidy.
|
|
301
|
+
- If you do not want to use all your dev-dependencies in workflow, you can run composer with `--no-dev` and install required tools using `tools` input to speed up your workflow.
|
|
302
|
+
- By default, `COMPOSER_NO_INTERACTION` is set to `1` and `COMPOSER_PROCESS_TIMEOUT` is set to `0`. In effect, this means that Composer commands in your scripts do not need to specify `--no-interaction`.
|
|
302
303
|
|
|
303
304
|
## :signal_strength: Coverage Support
|
|
304
305
|
|
|
@@ -311,11 +312,11 @@ Runs on all [PHP versions supported](#tada-php-support "List of PHP versions sup
|
|
|
311
312
|
- name: Setup PHP with Xdebug
|
|
312
313
|
uses: shivammathur/setup-php@v2
|
|
313
314
|
with:
|
|
314
|
-
php-version: '8.
|
|
315
|
+
php-version: '8.1'
|
|
315
316
|
coverage: xdebug
|
|
316
317
|
```
|
|
317
318
|
|
|
318
|
-
-
|
|
319
|
+
- When you specify `coverage: xdebug`, the latest version of Xdebug compatible with the PHP version is set up by default.
|
|
319
320
|
- If you need Xdebug 2.x on PHP 7.2, 7.3 or 7.4, you can specify `coverage: xdebug2`.
|
|
320
321
|
|
|
321
322
|
```yaml
|
|
@@ -326,6 +327,8 @@ Runs on all [PHP versions supported](#tada-php-support "List of PHP versions sup
|
|
|
326
327
|
coverage: xdebug2
|
|
327
328
|
```
|
|
328
329
|
|
|
330
|
+
**Note**: Xdebug is enabled by default on Ubuntu GitHub Actions images, so if you are not using it in your workflow it is recommended to disable it as that will have a positive impact on your PHP performance. Please refer to the [disable coverage](#disable-coverage) section for details.
|
|
331
|
+
|
|
329
332
|
### PCOV
|
|
330
333
|
|
|
331
334
|
Specify `coverage: pcov` to use `PCOV` and disable `Xdebug`.
|
|
@@ -337,7 +340,7 @@ Runs on PHP 7.1 and newer PHP versions.
|
|
|
337
340
|
- name: Setup PHP with PCOV
|
|
338
341
|
uses: shivammathur/setup-php@v2
|
|
339
342
|
with:
|
|
340
|
-
php-version: '8.
|
|
343
|
+
php-version: '8.1'
|
|
341
344
|
ini-values: pcov.directory=api #optional, see above for usage.
|
|
342
345
|
coverage: pcov
|
|
343
346
|
```
|
|
@@ -359,7 +362,6 @@ Specify `coverage: none` to disable both `Xdebug` and `PCOV`.
|
|
|
359
362
|
Disable coverage for these reasons:
|
|
360
363
|
|
|
361
364
|
- You are not generating coverage reports while testing.
|
|
362
|
-
- It will disable `Xdebug`, which will have a positive impact on PHP performance.
|
|
363
365
|
- You are using `phpdbg` for running your tests.
|
|
364
366
|
- You are profiling your code using `blackfire`.
|
|
365
367
|
- You are using PHP in JIT mode. Please refer to [JIT configuration](#jit-configuration) section for more details.
|
|
@@ -368,7 +370,7 @@ Disable coverage for these reasons:
|
|
|
368
370
|
- name: Setup PHP with no coverage driver
|
|
369
371
|
uses: shivammathur/setup-php@v2
|
|
370
372
|
with:
|
|
371
|
-
php-version: '8.
|
|
373
|
+
php-version: '8.1'
|
|
372
374
|
coverage: none
|
|
373
375
|
```
|
|
374
376
|
|
|
@@ -395,6 +397,12 @@ Disable coverage for these reasons:
|
|
|
395
397
|
- Shared extensions prefixed with `:` are disabled.
|
|
396
398
|
- See [PHP extension support](#heavy_plus_sign-php-extension-support) for more info.
|
|
397
399
|
|
|
400
|
+
#### `ini-file` (optional)
|
|
401
|
+
|
|
402
|
+
- Specify the base `php.ini` file.
|
|
403
|
+
- Accepts `production`, `development` or `none`.
|
|
404
|
+
- By default, production `php.ini` file is used.
|
|
405
|
+
|
|
398
406
|
#### `ini-values` (optional)
|
|
399
407
|
|
|
400
408
|
- Specify the values you want to add to `php.ini`.
|
|
@@ -417,7 +425,7 @@ Disable coverage for these reasons:
|
|
|
417
425
|
|
|
418
426
|
#### `php-version`
|
|
419
427
|
|
|
420
|
-
|
|
428
|
+
On GitHub Actions you can assign the `setup-php` step an `id`, you can use the same to get the outputs in a later step.
|
|
421
429
|
|
|
422
430
|
- Provides the PHP version in semver format.
|
|
423
431
|
|
|
@@ -426,7 +434,7 @@ To use outputs, give the `setup-php` step an `id`, you can use the same to get t
|
|
|
426
434
|
id: setup-php
|
|
427
435
|
uses: shivammathur/setup-php@v2
|
|
428
436
|
with:
|
|
429
|
-
php-version: '8.
|
|
437
|
+
php-version: '8.1'
|
|
430
438
|
|
|
431
439
|
- name: Print PHP version
|
|
432
440
|
run: echo ${{ steps.setup-php.outputs.php-version }}
|
|
@@ -461,14 +469,14 @@ See below for more info.
|
|
|
461
469
|
|
|
462
470
|
### Basic Setup
|
|
463
471
|
|
|
464
|
-
>
|
|
472
|
+
> Set up a particular PHP version.
|
|
465
473
|
|
|
466
474
|
```yaml
|
|
467
475
|
steps:
|
|
468
476
|
- name: Setup PHP
|
|
469
477
|
uses: shivammathur/setup-php@v2
|
|
470
478
|
with:
|
|
471
|
-
php-version: '8.
|
|
479
|
+
php-version: '8.1'
|
|
472
480
|
extensions: mbstring, intl
|
|
473
481
|
ini-values: post_max_size=256M, max_execution_time=180
|
|
474
482
|
coverage: xdebug
|
|
@@ -477,7 +485,7 @@ steps:
|
|
|
477
485
|
|
|
478
486
|
### Matrix Setup
|
|
479
487
|
|
|
480
|
-
>
|
|
488
|
+
> Set up multiple PHP versions on multiple operating systems.
|
|
481
489
|
|
|
482
490
|
```yaml
|
|
483
491
|
jobs:
|
|
@@ -486,7 +494,7 @@ jobs:
|
|
|
486
494
|
strategy:
|
|
487
495
|
matrix:
|
|
488
496
|
operating-system: ['ubuntu-latest', 'windows-latest', 'macos-latest']
|
|
489
|
-
php-versions: ['7.
|
|
497
|
+
php-versions: ['7.4', '8.0', '8.1']
|
|
490
498
|
phpunit-versions: ['latest']
|
|
491
499
|
include:
|
|
492
500
|
- operating-system: 'ubuntu-latest'
|
|
@@ -505,9 +513,9 @@ jobs:
|
|
|
505
513
|
|
|
506
514
|
### Nightly Build Setup
|
|
507
515
|
|
|
508
|
-
>
|
|
516
|
+
> Set up a nightly build of `PHP 8.2`.
|
|
509
517
|
|
|
510
|
-
- This version is currently in development.
|
|
518
|
+
- This PHP version is currently in active development and might contain bugs and breaking changes.
|
|
511
519
|
- Some user space extensions might not support this version currently.
|
|
512
520
|
|
|
513
521
|
```yaml
|
|
@@ -515,7 +523,7 @@ steps:
|
|
|
515
523
|
- name: Setup nightly PHP
|
|
516
524
|
uses: shivammathur/setup-php@v2
|
|
517
525
|
with:
|
|
518
|
-
php-version: '8.
|
|
526
|
+
php-version: '8.2'
|
|
519
527
|
extensions: mbstring
|
|
520
528
|
ini-values: post_max_size=256M, max_execution_time=180
|
|
521
529
|
coverage: xdebug
|
|
@@ -524,7 +532,7 @@ steps:
|
|
|
524
532
|
|
|
525
533
|
### Thread Safe Setup
|
|
526
534
|
|
|
527
|
-
>
|
|
535
|
+
> Set up `TS` or `NTS` PHP on `Windows`.
|
|
528
536
|
|
|
529
537
|
- `NTS` versions are set up by default.
|
|
530
538
|
- On `Ubuntu` and `macOS` only `NTS` versions are supported.
|
|
@@ -539,7 +547,7 @@ jobs:
|
|
|
539
547
|
- name: Setup PHP
|
|
540
548
|
uses: shivammathur/setup-php@v2
|
|
541
549
|
with:
|
|
542
|
-
php-version: '8.
|
|
550
|
+
php-version: '8.1'
|
|
543
551
|
env:
|
|
544
552
|
phpts: ts # specify ts or nts
|
|
545
553
|
```
|
|
@@ -548,14 +556,14 @@ jobs:
|
|
|
548
556
|
|
|
549
557
|
> Update to the latest patch of PHP versions.
|
|
550
558
|
|
|
551
|
-
- Pre-installed PHP versions
|
|
559
|
+
- Pre-installed PHP versions are not updated to their latest patch release by default.
|
|
552
560
|
- You can specify the `update` environment variable to `true` for updating to the latest release.
|
|
553
561
|
|
|
554
562
|
```yaml
|
|
555
563
|
- name: Setup PHP with latest versions
|
|
556
564
|
uses: shivammathur/setup-php@v2
|
|
557
565
|
with:
|
|
558
|
-
php-version: '8.
|
|
566
|
+
php-version: '8.1'
|
|
559
567
|
env:
|
|
560
568
|
update: true # specify true or false
|
|
561
569
|
```
|
|
@@ -570,15 +578,15 @@ To debug any issues, you can use the `verbose` tag instead of `v2`.
|
|
|
570
578
|
- name: Setup PHP with logs
|
|
571
579
|
uses: shivammathur/setup-php@verbose
|
|
572
580
|
with:
|
|
573
|
-
php-version: '8.
|
|
581
|
+
php-version: '8.1'
|
|
574
582
|
```
|
|
575
583
|
|
|
576
584
|
### Multi-Arch Setup
|
|
577
585
|
|
|
578
|
-
>
|
|
586
|
+
> Set up PHP on multiple architecture on Ubuntu GitHub Runners.
|
|
579
587
|
|
|
580
|
-
- `PHP 5.6` to `PHP 8.
|
|
581
|
-
- For this, you can use `shivammathur/node` images as containers. These have compatible `Nodejs` installed for
|
|
588
|
+
- `PHP 5.6` to `PHP 8.1` are supported by `setup-php` on multiple architecture on `Ubuntu`.
|
|
589
|
+
- For this, you can use `shivammathur/node` images as containers. These have compatible `Nodejs` installed for `setup-php`.
|
|
582
590
|
- Currently, for `ARM` based setup, you will need [self-hosted runners](#self-hosted-setup).
|
|
583
591
|
|
|
584
592
|
```yaml
|
|
@@ -593,12 +601,12 @@ jobs:
|
|
|
593
601
|
- name: Install PHP
|
|
594
602
|
uses: shivammathur/setup-php@v2
|
|
595
603
|
with:
|
|
596
|
-
php-version: '8.
|
|
604
|
+
php-version: '8.1'
|
|
597
605
|
```
|
|
598
606
|
|
|
599
607
|
### Self Hosted Setup
|
|
600
608
|
|
|
601
|
-
>
|
|
609
|
+
> Set up PHP on a self-hosted runner.
|
|
602
610
|
|
|
603
611
|
- To set up a containerised self-hosted runner, refer to the following guides as per your base operating system.
|
|
604
612
|
- [Linux](https://github.com/shivammathur/setup-php/wiki/Dockerized-self-hosted-runner-on-Linux)
|
|
@@ -607,7 +615,7 @@ jobs:
|
|
|
607
615
|
- To set up the runner directly on the host OS or in a virtual machine, follow this [requirements guide](https://github.com/shivammathur/setup-php/wiki/Requirements-for-self-hosted-runners "Requirements guide for self-hosted runner to run setup-php") before setting up the self-hosted runner.
|
|
608
616
|
- If your workflow uses [service containers](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idservices "GitHub Actions Services"), then set up the runner on a Linux host or in a Linux virtual machine. GitHub Actions does not support nested virtualization on Linux, so services will not work in a dockerized container.
|
|
609
617
|
|
|
610
|
-
|
|
618
|
+
It is recommended to specify the environment variable `runner` with the value `self-hosted` for self-hosted environments.
|
|
611
619
|
|
|
612
620
|
```yaml
|
|
613
621
|
jobs:
|
|
@@ -623,7 +631,7 @@ jobs:
|
|
|
623
631
|
with:
|
|
624
632
|
php-version: ${{ matrix.php-versions }}
|
|
625
633
|
env:
|
|
626
|
-
runner: self-hosted
|
|
634
|
+
runner: self-hosted
|
|
627
635
|
```
|
|
628
636
|
|
|
629
637
|
**Notes**
|
|
@@ -643,7 +651,7 @@ jobs:
|
|
|
643
651
|
- name: Setup PHP
|
|
644
652
|
uses: shivammathur/setup-php@v2
|
|
645
653
|
with:
|
|
646
|
-
php-version: '8.
|
|
654
|
+
php-version: '8.1'
|
|
647
655
|
```
|
|
648
656
|
|
|
649
657
|
Run the workflow locally with `act` using [`shivammathur/node`](https://github.com/shivammathur/node-docker "Docker image to run setup-php") docker images.
|
|
@@ -676,7 +684,7 @@ For example to enable JIT in `tracing` mode with buffer size of `64 MB`.
|
|
|
676
684
|
- name: Setup PHP with JIT in tracing mode
|
|
677
685
|
uses: shivammathur/setup-php@v2
|
|
678
686
|
with:
|
|
679
|
-
php-version: '8.
|
|
687
|
+
php-version: '8.1'
|
|
680
688
|
coverage: none
|
|
681
689
|
ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=64M
|
|
682
690
|
```
|
|
@@ -715,7 +723,7 @@ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
|
715
723
|
|
|
716
724
|
- If you support a range of `composer` dependencies and use `prefer-lowest` and `prefer-stable` options, you can store them in your matrix and add them to the keys.
|
|
717
725
|
```yaml
|
|
718
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
726
|
+
key: ${{ runner.os }}-composer-${{ matrix.prefer }}-${{ hashFiles('**/composer.lock') }}
|
|
719
727
|
restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}-
|
|
720
728
|
```
|
|
721
729
|
|
|
@@ -727,7 +735,7 @@ If you have a number of workflows which set up multiple tools or have many compo
|
|
|
727
735
|
- name: Setup PHP
|
|
728
736
|
uses: shivammathur/setup-php@v2
|
|
729
737
|
with:
|
|
730
|
-
php-version: '8.
|
|
738
|
+
php-version: '8.1'
|
|
731
739
|
env:
|
|
732
740
|
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
733
741
|
```
|
|
@@ -742,7 +750,7 @@ Put the code in the run property of a step and specify the shell as `php {0}`.
|
|
|
742
750
|
- name: Setup PHP
|
|
743
751
|
uses: shivammathur/setup-php@v2
|
|
744
752
|
with:
|
|
745
|
-
php-version: '8.
|
|
753
|
+
php-version: '8.1'
|
|
746
754
|
|
|
747
755
|
- name: Run PHP code
|
|
748
756
|
shell: php {0}
|
|
@@ -782,7 +790,7 @@ PHPStan supports error reporting in GitHub Actions, so it does not require probl
|
|
|
782
790
|
- name: Setup PHP
|
|
783
791
|
uses: shivammathur/setup-php@v2
|
|
784
792
|
with:
|
|
785
|
-
php-version: '8.
|
|
793
|
+
php-version: '8.1'
|
|
786
794
|
tools: phpstan
|
|
787
795
|
|
|
788
796
|
- name: Run PHPStan
|
|
@@ -797,7 +805,7 @@ Psalm supports error reporting in GitHub Actions with an output format `github`.
|
|
|
797
805
|
- name: Setup PHP
|
|
798
806
|
uses: shivammathur/setup-php@v2
|
|
799
807
|
with:
|
|
800
|
-
php-version: '8.
|
|
808
|
+
php-version: '8.1'
|
|
801
809
|
tools: psalm
|
|
802
810
|
|
|
803
811
|
- name: Run Psalm
|
|
@@ -815,7 +823,7 @@ For examples refer to [cs2pr documentation](https://github.com/staabm/annotate-p
|
|
|
815
823
|
- name: Setup PHP
|
|
816
824
|
uses: shivammathur/setup-php@v2
|
|
817
825
|
with:
|
|
818
|
-
php-version: '8.
|
|
826
|
+
php-version: '8.1'
|
|
819
827
|
tools: cs2pr, phpcs
|
|
820
828
|
|
|
821
829
|
- name: Run phpcs
|
|
@@ -826,37 +834,38 @@ For examples refer to [cs2pr documentation](https://github.com/staabm/annotate-p
|
|
|
826
834
|
|
|
827
835
|
Examples of using `setup-php` with various PHP Frameworks and Packages.
|
|
828
836
|
|
|
829
|
-
|Framework/Package|Runs on|Workflow|
|
|
830
|
-
|
|
831
|
-
|Blackfire
|
|
832
|
-
|Blackfire Player
|
|
833
|
-
|CakePHP with `MySQL` and `Redis
|
|
834
|
-
|CakePHP with `PostgreSQL` and `Redis
|
|
835
|
-
|CakePHP without services
|
|
836
|
-
|CodeIgniter
|
|
837
|
-
|
|
|
838
|
-
|Laravel with `
|
|
839
|
-
|Laravel
|
|
840
|
-
|
|
|
841
|
-
|Lumen with `
|
|
842
|
-
|Lumen
|
|
843
|
-
|
|
|
844
|
-
|Phalcon with `
|
|
845
|
-
|
|
|
846
|
-
|Roots/
|
|
847
|
-
|
|
|
848
|
-
|
|
|
849
|
-
|Symfony with `
|
|
850
|
-
|Symfony
|
|
851
|
-
|
|
|
852
|
-
|Yii2 Starter Kit with `
|
|
853
|
-
|
|
|
837
|
+
| Framework/Package | Runs on | Workflow |
|
|
838
|
+
|----------------------------------------|---------------------------------|---------------------------------------------------------------------------------------------------------------|
|
|
839
|
+
| Blackfire | `macOS`, `ubuntu` and `windows` | [blackfire.yml](./examples/blackfire.yml "GitHub Action using Blackfire") |
|
|
840
|
+
| Blackfire Player | `macOS`, `ubuntu` and `windows` | [blackfire-player.yml](./examples/blackfire-player.yml "GitHub Action using Blackfire Player") |
|
|
841
|
+
| CakePHP with `MySQL` and `Redis` | `ubuntu` | [cakephp-mysql.yml](./examples/cakephp-mysql.yml "GitHub Action for CakePHP with MySQL and Redis") |
|
|
842
|
+
| CakePHP with `PostgreSQL` and `Redis` | `ubuntu` | [cakephp-postgres.yml](./examples/cakephp-postgres.yml "GitHub Action for CakePHP with Postgres and Redis") |
|
|
843
|
+
| CakePHP without services | `macOS`, `ubuntu` and `windows` | [cakephp.yml](./examples/cakephp.yml "GitHub Action for CakePHP without services") |
|
|
844
|
+
| CodeIgniter | `macOS`, `ubuntu` and `windows` | [codeigniter.yml](./examples/codeigniter.yml "GitHub Action for CodeIgniter") |
|
|
845
|
+
| Laminas MVC | `macOS`, `ubuntu` and `windows` | [laminas-mvc.yml](./examples/laminas-mvc.yml "GitHub Action for Laminas Framework MVC Projects") |
|
|
846
|
+
| Laravel with `MySQL` and `Redis` | `ubuntu` | [laravel-mysql.yml](./examples/laravel-mysql.yml "GitHub Action for Laravel with MySQL and Redis") |
|
|
847
|
+
| Laravel with `PostgreSQL` and `Redis` | `ubuntu` | [laravel-postgres.yml](./examples/laravel-postgres.yml "GitHub Action for Laravel with PostgreSQL and Redis") |
|
|
848
|
+
| Laravel without services | `macOS`, `ubuntu` and `windows` | [laravel.yml](./examples/laravel.yml "GitHub Action for Laravel without services") |
|
|
849
|
+
| Lumen with `MySQL` and `Redis` | `ubuntu` | [lumen-mysql.yml](./examples/lumen-mysql.yml "GitHub Action for Lumen with MySQL and Redis") |
|
|
850
|
+
| Lumen with `PostgreSQL` and `Redis` | `ubuntu` | [lumen-postgres.yml](./examples/lumen-postgres.yml "GitHub Action for Lumen with PostgreSQL and Redis") |
|
|
851
|
+
| Lumen without services | `macOS`, `ubuntu` and `windows` | [lumen.yml](./examples/lumen.yml "GitHub Action for Lumen without services") |
|
|
852
|
+
| Phalcon with `MySQL` | `ubuntu` | [phalcon-mysql.yml](./examples/phalcon-mysql.yml "GitHub Action for Phalcon with MySQL") |
|
|
853
|
+
| Phalcon with `PostgreSQL` | `ubuntu` | [phalcon-postgres.yml](./examples/phalcon-postgres.yml "GitHub Action for Phalcon with PostgreSQL") |
|
|
854
|
+
| Roots/bedrock | `ubuntu` | [bedrock.yml](./examples/bedrock.yml "GitHub Action for Wordpress Development using @roots/bedrock") |
|
|
855
|
+
| Roots/sage | `ubuntu` | [sage.yml](./examples/sage.yml "GitHub Action for Wordpress Development using @roots/sage") |
|
|
856
|
+
| Slim Framework | `macOS`, `ubuntu` and `windows` | [slim-framework.yml](./examples/slim-framework.yml "GitHub Action for Slim Framework") |
|
|
857
|
+
| Symfony with `MySQL` | `ubuntu` | [symfony-mysql.yml](./examples/symfony-mysql.yml "GitHub Action for Symfony with MySQL") |
|
|
858
|
+
| Symfony with `PostgreSQL` | `ubuntu` | [symfony-postgres.yml](./examples/symfony-postgres.yml "GitHub Action for Symfony with PostgreSQL") |
|
|
859
|
+
| Symfony without services | `macOS`, `ubuntu` and `windows` | [symfony.yml](./examples/symfony.yml "GitHub Action for Symfony without services") |
|
|
860
|
+
| Yii2 Starter Kit with `MySQL` | `ubuntu` | [yii2-mysql.yml](./examples/yii2-mysql.yml "GitHub Action for Yii2 Starter Kit with MySQL") |
|
|
861
|
+
| Yii2 Starter Kit with `PostgreSQL` | `ubuntu` | [yii2-postgres.yml](./examples/yii2-postgres.yml "GitHub Action for Yii2 Starter Kit with PostgreSQL") |
|
|
854
862
|
|
|
855
863
|
## :bookmark: Versioning
|
|
856
864
|
|
|
857
|
-
- Use the `v2` tag as `setup-php` version. It is a rolling tag and is synced with the latest minor and patch releases. With `v2` you automatically get the bug fixes, security patches, new features and support for latest PHP releases.
|
|
865
|
+
- Use the `v2` tag as `setup-php` version. It is a rolling tag and is synced with the latest minor and patch releases. With `v2` you automatically get the bug fixes, security patches, new features and support for latest PHP releases.
|
|
858
866
|
- Semantic release versions can also be used. It is recommended to [use dependabot](https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-github-dependabot "Setup Dependabot with GitHub Actions") with semantic versioning to keep the actions in your workflows up to date.
|
|
859
|
-
- Commit SHA can also be used, but are not recommended. They have to be updated with every release manually, without which you will not get any bug fixes, security patches or new features.
|
|
867
|
+
- Commit SHA can also be used, but are not recommended. They have to be updated with every release manually, without which you will not get any bug fixes, security patches or new features.
|
|
868
|
+
- For debugging any issues `verbose` tag can be used temporarily. It outputs all the logs and is also synced with the latest releases.
|
|
860
869
|
- It is highly discouraged to use the `master` branch as version, it might break your workflow after major releases as they have breaking changes.
|
|
861
870
|
- If you are using the `v1` tag or a `1.x.y` version, you should [switch to v2](https://github.com/shivammathur/setup-php/wiki/Switch-to-v2 "Guide for switching from setup-php v1 to v2") as `v1` only gets critical bug fixes. Maintenance support for `v1` will be dropped with the last `PHP 8.0` release.
|
|
862
871
|
|
|
@@ -883,25 +892,29 @@ Examples of using `setup-php` with various PHP Frameworks and Packages.
|
|
|
883
892
|
|
|
884
893
|
## :sparkling_heart: Support This Project
|
|
885
894
|
|
|
886
|
-
- Please star the project and share it. If you blog, please share your experience of using
|
|
887
|
-
- Please sponsor setup-php using [GitHub sponsors](https://github.com/sponsors/shivammathur).
|
|
895
|
+
- Please star the project and share it. If you blog, please share your experience of using `setup-php`.
|
|
888
896
|
- Please [reach out](mailto:contact@setup-php.com) if you have any questions about sponsoring setup-php.
|
|
889
897
|
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
### Corporate Sponsors
|
|
898
|
+
Many users and organisations support setup-php via [GitHub Sponsors](https://github.com/sponsors/shivammathur).
|
|
893
899
|
|
|
894
|
-
<
|
|
895
|
-
<a href="https://setup-php.com/sponsors-corp/?">
|
|
896
|
-
<img src="https://setup-php.com/sponsors-corp/?" alt="Corporate sponsors of setup-php and related projects" width="100%">
|
|
897
|
-
</a>
|
|
898
|
-
</p>
|
|
900
|
+
<a href="https://github.com/sponsors/shivammathur"><img src="https://setup-php.com/sponsors.svg?" alt="Sponsor shivammathur"></a>
|
|
899
901
|
|
|
900
|
-
|
|
902
|
+
These companies generously provide setup-php their products and services to aid in the development of this project.
|
|
901
903
|
|
|
902
|
-
<p
|
|
903
|
-
<a href="https://setup-php
|
|
904
|
-
<img src="https://setup-php.com/sponsors
|
|
904
|
+
<p>
|
|
905
|
+
<a href="https://www.jetbrains.com/?from=setup-php">
|
|
906
|
+
<img src="https://setup-php.com/sponsors/jetbrains.svg" alt="JetBrains" width="106" height="60">
|
|
907
|
+
</a>
|
|
908
|
+
|
|
909
|
+
<a href="https://www.macstadium.com/opensource/members#gh-light-mode-only">
|
|
910
|
+
<img src="https://setup-php.com/sponsors/macstadium.png" alt="Mac Stadium" width="148" height="60">
|
|
911
|
+
</a>
|
|
912
|
+
<a href="https://www.macstadium.com/opensource/members#gh-dark-mode-only">
|
|
913
|
+
<img src="https://setup-php.com/sponsors/macstadium-white.png" alt="Mac Stadium" width="148" height="60">
|
|
914
|
+
</a>
|
|
915
|
+
|
|
916
|
+
<a href="https://tidelift.com/subscription/pkg/npm-setup-php">
|
|
917
|
+
<img src="https://setup-php.com/sponsors/tidelift.png" alt="Tidelift" width="70" height="60">
|
|
905
918
|
</a>
|
|
906
919
|
</p>
|
|
907
920
|
|
|
@@ -933,6 +946,7 @@ Examples of using `setup-php` with various PHP Frameworks and Packages.
|
|
|
933
946
|
[`behat`]: https://docs.behat.org/en/latest/
|
|
934
947
|
[`blackfire`]: https://blackfire.io/docs/php/index
|
|
935
948
|
[`blackfire-player`]: https://blackfire.io/docs/builds-cookbooks/player
|
|
949
|
+
[`churn`]: https://github.com/bmitch/churn-php
|
|
936
950
|
[`codeception`]: https://codeception.com/
|
|
937
951
|
[`composer`]: https://getcomposer.org/
|
|
938
952
|
[`composer-normalize`]: https://github.com/ergebnis/composer-normalize
|