setup-php 1.11.2 → 1.11.6

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.
Files changed (80) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +433 -458
  3. package/lib/config.d.ts +3 -0
  4. package/lib/config.js +71 -71
  5. package/lib/config.js.map +1 -1
  6. package/lib/coverage.d.ts +4 -0
  7. package/lib/coverage.js +97 -87
  8. package/lib/coverage.js.map +1 -1
  9. package/lib/extensions.d.ts +4 -0
  10. package/lib/extensions.js +188 -200
  11. package/lib/extensions.js.map +1 -1
  12. package/lib/install.d.ts +2 -0
  13. package/lib/install.js +96 -81
  14. package/lib/install.js.map +1 -1
  15. package/lib/tools.d.ts +18 -0
  16. package/lib/tools.js +306 -386
  17. package/lib/tools.js.map +1 -1
  18. package/lib/utils.d.ts +15 -0
  19. package/lib/utils.js +205 -291
  20. package/lib/utils.js.map +1 -1
  21. package/package.json +66 -56
  22. package/src/config.ts +82 -82
  23. package/src/configs/brew_extensions +28 -0
  24. package/src/configs/php-versions.json +5 -5
  25. package/src/configs/phpunit.json +24 -24
  26. package/src/coverage.ts +146 -146
  27. package/src/extensions.ts +235 -233
  28. package/src/install.ts +104 -104
  29. package/src/scripts/darwin.sh +341 -339
  30. package/src/scripts/ext/gearman.sh +22 -22
  31. package/src/scripts/ext/phalcon.ps1 +55 -55
  32. package/src/scripts/ext/phalcon.sh +70 -70
  33. package/src/scripts/linux.sh +361 -361
  34. package/src/scripts/win32.ps1 +326 -333
  35. package/src/tools.ts +472 -469
  36. package/src/utils.ts +319 -316
  37. package/.eslintrc.json +0 -16
  38. package/.github/CODE_OF_CONDUCT.md +0 -76
  39. package/.github/CONTRIBUTING.md +0 -69
  40. package/.github/FUNDING.yml +0 -7
  41. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -23
  42. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  43. package/.github/PULL_REQUEST_TEMPLATE.md +0 -38
  44. package/.github/SECURITY.md +0 -29
  45. package/.github/workflows/main-workflow.yml +0 -56
  46. package/.github/workflows/node-workflow.yml +0 -47
  47. package/.idea/workspace.xml +0 -113
  48. package/.prettierrc.json +0 -12
  49. package/__tests__/config.test.ts +0 -52
  50. package/__tests__/coverage.test.ts +0 -110
  51. package/__tests__/extensions.test.ts +0 -120
  52. package/__tests__/install.test.ts +0 -181
  53. package/__tests__/tools.test.ts +0 -476
  54. package/__tests__/utils.test.ts +0 -213
  55. package/action.yml +0 -38
  56. package/dist/index.js +0 -2854
  57. package/examples/bedrock.yml +0 -32
  58. package/examples/cakephp-mysql.yml +0 -114
  59. package/examples/cakephp-postgres.yml +0 -112
  60. package/examples/cakephp.yml +0 -92
  61. package/examples/codeigniter.yml +0 -34
  62. package/examples/laravel-mysql.yml +0 -74
  63. package/examples/laravel-postgres.yml +0 -74
  64. package/examples/laravel.yml +0 -42
  65. package/examples/lumen-mysql.yml +0 -74
  66. package/examples/lumen-postgres.yml +0 -74
  67. package/examples/lumen.yml +0 -38
  68. package/examples/phalcon-mysql.yml +0 -74
  69. package/examples/phalcon-postgres.yml +0 -73
  70. package/examples/sage.yml +0 -57
  71. package/examples/slim-framework.yml +0 -34
  72. package/examples/symfony-mysql.yml +0 -56
  73. package/examples/symfony-postgres.yml +0 -54
  74. package/examples/symfony.yml +0 -39
  75. package/examples/yii2-mysql.yml +0 -73
  76. package/examples/yii2-postgres.yml +0 -71
  77. package/examples/zend-framework.yml +0 -36
  78. package/jest.config.js +0 -12
  79. package/lib/sapi.js +0 -64
  80. package/tsconfig.json +0 -18
package/README.md CHANGED
@@ -1,459 +1,434 @@
1
- <p align="center">
2
- <a href="https://github.com/marketplace/actions/setup-php-action" target="_blank">
3
- <img src="https://repository-images.githubusercontent.com/206578964/e0a18480-dc65-11e9-8dd3-b9ffbf5575fe" alt="Setup PHP in GitHub Actions" width="400">
4
- </a>
5
- </p>
6
-
7
- <h1 align="center">Setup PHP in GitHub Actions</h1>
8
-
9
- <p align="center">
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
- <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
- <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"></a>
13
- <a href="#tada-php-support" title="PHP Versions Supported"><img alt="PHP Versions Supported" src="https://img.shields.io/badge/php-%3E%3D%205.6-8892BF.svg"></a>
14
- </p>
15
-
16
- 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 setup 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.
17
-
18
- ## Contents
19
-
20
- - [PHP Support](#tada-php-support)
21
- - [GitHub-Hosted Runner Support](#cloud-github-hosted-runner-support)
22
- - [PHP Extension Support](#heavy_plus_sign-php-extension-support)
23
- - [Tools Support](#wrench-tools-support)
24
- - [Coverage Support](#signal_strength-coverage-support)
25
- - [Xdebug](#xdebug)
26
- - [PCOV](#pcov)
27
- - [Disable coverage](#disable-coverage)
28
- - [Usage](#memo-usage)
29
- - [Basic Setup](#basic-setup)
30
- - [Matrix Setup](#matrix-setup)
31
- - [Nightly Build Setup](#nightly-build-setup)
32
- - [Thread Safe Setup](#thread-safe-setup)
33
- - [Cache Dependencies](#cache-dependencies)
34
- - [Composer GitHub OAuth](#composer-github-oauth)
35
- - [Problem Matchers](#problem-matchers)
36
- - [Examples](#examples)
37
- - [License](#scroll-license)
38
- - [Contributions](#1-contributions)
39
- - [Support This project](#sparkling_heart-support-this-project)
40
- - [Dependencies](#bookmark-dependencies)
41
- - [Further Reading](#bookmark_tabs-further-reading)
42
-
43
- ## :tada: PHP Support
44
-
45
- |PHP Version|Stability|Release Support|
46
- |--- |--- |--- |
47
- |5.6|`Stable`|`End of life`|
48
- |7.0|`Stable`|`End of life`|
49
- |7.1|`Stable`|`End of life`|
50
- |7.2|`Stable`|`Security fixes only`|
51
- |7.3|`Stable`|`Active`|
52
- |7.4|`Stable`|`Active`|
53
- |8.0|`Nightly`|`In development`|
54
-
55
- **Note:** Specifying `8.0` in `php-version` input installs a nightly build of `PHP 8.0.0-dev` with `PHP JIT`, `Union Types v2` and other [new features](https://wiki.php.net/rfc#php_80 "New features implemented in PHP 8"). See [nightly build setup](#nightly-build-setup) for more information.
56
-
57
- ## :cloud: GitHub-Hosted Runner Support
58
-
59
- |Virtual environment|YAML workflow label|Pre-installed PHP|
60
- |--- |--- |--- |
61
- |Ubuntu 18.04|`ubuntu-18.04`|`PHP 7.1` to `PHP 8.0`|
62
- |Ubuntu 20.04|`ubuntu-latest` or `ubuntu-20.04`|`PHP 7.4` to `PHP 8.0`|
63
- |Windows Server 2019|`windows-latest` or `windows-2019`|`PHP 8.0`|
64
- |macOS 10.15 Catalina|`macos-latest` or `macos-10.15`|`PHP 8.0`|
65
- |macOS 11.0 Big Sur|`macos-11.0`|`PHP 8.0`|
66
-
67
- ## :heavy_plus_sign: PHP Extension Support
68
- - On `ubuntu` by default extensions which are available as a package can be installed. If the extension is not available as a package but it is on `PECL`, it can be installed by specifying `pecl` in the tools input.
69
- - On `windows` extensions which have `windows` binary on `PECL` can be installed.
70
- - On `macOS` extensions which are on `PECL` can be installed.
71
- - Extensions which are installed along with PHP if specified are enabled.
72
- - Extensions on `PECL` which do not have a latest stable version, their pre-release versions can be installed by suffixing the extension with its state i.e `alpha`, `beta`, `devel` or `snapshot` separated by a `-` like `msgpack-beta`.
73
- - Extensions which cannot be installed gracefully leave an error message in the logs, the action is not interrupted.
74
-
75
- ## :wrench: Tools Support
76
-
77
- These tools can be setup globally using the `tools` input.
78
-
79
- `codeception`, `composer`, `composer-prefetcher`, `cs2pr`, `deployer`, `pecl`, `phinx`, `phive`, `phpcbf`, `phpcpd`, `php-config`, `php-cs-fixer`, `phpcs`, `phpize`, `phpmd`, `phpstan`, `phpunit`, `prestissimo`, `psalm`, `symfony`
80
-
81
- ```yaml
82
- uses: shivammathur/setup-php@v1
83
- with:
84
- php-version: '7.4'
85
- tools: php-cs-fixer, phpunit
86
- ```
87
-
88
- To set up a particular version of a tool, specify it in the form `tool:version`.
89
-
90
- The latest stable version of `composer` is set up by default. You can set up the required `composer` version by specifying `v1`, `v2`, `snapshot` or `preview` as versions or the exact version in semver format.
91
-
92
- ```yaml
93
- uses: shivammathur/setup-php@v1
94
- with:
95
- php-version: '7.4'
96
- tools: composer:v2
97
- ```
98
-
99
- If you have specified composer plugins `prestissimo` or `composer-prefetcher` in tools, the latest stable version of `composer v1` will be setup. Unless some of your packages require `composer v1`, it is recommended to drop `prestissimo` and use `composer v2`.
100
-
101
- Version for other tools should be in `semver` format and a valid release of the tool.
102
-
103
- ```yaml
104
- uses: shivammathur/setup-php@v1
105
- with:
106
- php-version: '7.4'
107
- tools: php-cs-fixer:2.16.2, phpunit:8.5.1
108
- ```
109
-
110
- Tools which cannot be installed gracefully leave an error message in the logs, the action is not interrupted.
111
-
112
- ## :signal_strength: Coverage Support
113
-
114
- ### Xdebug
115
-
116
- Specify `coverage: xdebug` to use `Xdebug`.
117
- Runs on all [PHP versions supported](#tada-php-support "List of PHP versions supported on this GitHub Action").
118
-
119
- ```yaml
120
- uses: shivammathur/setup-php@v1
121
- with:
122
- php-version: '7.4'
123
- coverage: xdebug
124
- ```
125
-
126
- ### PCOV
127
-
128
- Specify `coverage: pcov` to use `PCOV` and disable `Xdebug`.
129
- It is much faster than `Xdebug`.
130
- `PCOV` needs `PHP >= 7.1`.
131
- If your source code directory is other than `src`, `lib` or, `app`, specify `pcov.directory` using the `ini-values` input.
132
-
133
-
134
- ```yaml
135
- uses: shivammathur/setup-php@v1
136
- with:
137
- php-version: '7.4'
138
- ini-values: pcov.directory=api #optional, see above for usage.
139
- coverage: pcov
140
- ```
141
-
142
- ### Disable Coverage
143
-
144
- Specify `coverage: none` to disable both `Xdebug` and `PCOV`.
145
- Consider disabling the coverage using this PHP action for these reasons.
146
-
147
- - You are not generating coverage reports while testing.
148
- - It will remove `Xdebug`, which will have a positive impact on PHP performance.
149
- - You are using `phpdbg` for running your tests.
150
-
151
- ```yaml
152
- uses: shivammathur/setup-php@v1
153
- with:
154
- php-version: '7.4'
155
- coverage: none
156
- ```
157
-
158
- ## :memo: Usage
159
-
160
- Inputs supported by this GitHub Action.
161
-
162
- - php-version `required`
163
- - extensions `optional`
164
- - ini-values `optional`
165
- - coverage `optional`
166
- - tools `optional`
167
-
168
- See [action.yml](action.yml "Metadata for this GitHub Action") and usage below for more info.
169
-
170
- ### Basic Setup
171
-
172
- > Setup a particular PHP version.
173
-
174
- ```yaml
175
- steps:
176
- - name: Checkout
177
- uses: actions/checkout@v2
178
-
179
- - name: Setup PHP
180
- uses: shivammathur/setup-php@v1
181
- with:
182
- php-version: '7.4'
183
- extensions: mbstring, intl #optional, setup extensions
184
- ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration
185
- coverage: xdebug #optional, setup coverage driver
186
- tools: php-cs-fixer, phpunit #optional, setup tools globally
187
- ```
188
-
189
- ### Matrix Setup
190
-
191
- > Setup multiple PHP versions on multiple operating systems.
192
-
193
- ```yaml
194
- jobs:
195
- run:
196
- runs-on: ${{ matrix.operating-system }}
197
- strategy:
198
- matrix:
199
- operating-system: [ubuntu-latest, windows-latest, macos-latest]
200
- php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
201
- name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
202
- steps:
203
- - name: Checkout
204
- uses: actions/checkout@v2
205
-
206
- - name: Setup PHP
207
- uses: shivammathur/setup-php@v1
208
- with:
209
- php-version: ${{ matrix.php-versions }}
210
- extensions: mbstring, intl #optional, setup extensions
211
- ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration
212
- coverage: xdebug #optional, setup coverage driver
213
- tools: php-cs-fixer, phpunit #optional, setup tools globally
214
- ```
215
-
216
- ### Nightly Build Setup
217
-
218
- > Setup a nightly build of `PHP 8.0.0-dev` from the [master branch](https://github.com/php/php-src/tree/master "Master branch on PHP source repository") of PHP.
219
-
220
- - Some extensions might not support this version currently.
221
- - Refer to this [RFC](https://wiki.php.net/rfc/jit "PHP JIT RFC configuration") for configuring `PHP JIT` on this version.
222
- - Refer to this [list of RFCs](https://wiki.php.net/rfc#php_80 "List of RFCs implemented in PHP8") implemented in this version.
223
-
224
- ```yaml
225
- steps:
226
- - name: Checkout
227
- uses: actions/checkout@v2
228
-
229
- - name: Setup PHP
230
- uses: shivammathur/setup-php@v1
231
- with:
232
- php-version: '8.0'
233
- extensions: mbstring #optional, setup extensions
234
- ini-values: opcache.jit_buffer_size=256M, opcache.jit=1235, pcre.jit=1 #optional, setup php.ini configuration
235
- coverage: pcov #optional, setup PCOV, Xdebug does not support this version yet.
236
- tools: php-cs-fixer, phpunit #optional, setup tools globally
237
- ```
238
-
239
- ### Thread Safe Setup
240
-
241
- - `NTS` versions are setup by default.
242
- - On `ubuntu` and `macOS` only NTS versions are supported.
243
- - On `windows` both `TS` and `NTS` versions are supported.
244
-
245
- ```yaml
246
- jobs:
247
- run:
248
- runs-on: windows-latest
249
- name: Setup PHP TS on Windows
250
- steps:
251
- - name: Checkout
252
- uses: actions/checkout@v2
253
-
254
- - name: Setup PHP
255
- uses: shivammathur/setup-php@v1
256
- with:
257
- php-version: '7.4'
258
- env:
259
- phpts: ts # specify ts or nts
260
- ```
261
-
262
- ### Cache Dependencies
263
-
264
- You can persist composer's internal cache directory using the [`action/cache`](https://github.com/actions/cache "GitHub Action to cache files") GitHub Action. Dependencies cached are loaded directly instead of downloading them while installation. The files cached are available across check-runs and will reduce the workflow execution time.
265
-
266
- **Note:** Please do not cache `vendor` directory using `action/cache` as that will have side-effects.
267
-
268
- ```yaml
269
- - name: Get Composer Cache Directory
270
- id: composer-cache
271
- run: echo "::set-output name=dir::$(composer config cache-files-dir)"
272
-
273
- - name: Cache dependencies
274
- uses: actions/cache@v2
275
- with:
276
- path: ${{ steps.composer-cache.outputs.dir }}
277
- key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
278
- restore-keys: ${{ runner.os }}-composer-
279
-
280
- - name: Install Dependencies
281
- run: composer install --prefer-dist
282
- ```
283
-
284
- - If you do not commit `composer.lock`, you can use the hash of `composer.json` as the key for your cache.
285
- ```yaml
286
- key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
287
- ```
288
-
289
- - If you support a range of `composer` dependencies and use `prefer-lowest` and `prefer-stable` options, you can store them in your matrix add them to the keys.
290
- ```yaml
291
- key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.prefer }}-
292
- restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}-
293
- ```
294
-
295
- ### Composer GitHub OAuth
296
-
297
- If you have a number of workflows which setup multiple tools or have many composer dependencies, you might hit the GitHub's rate limit for composer. To avoid that you can add a `OAuth` token to the composer's config by setting `COMPOSER_TOKEN` environment variable. You can use [`GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token "GITHUB_TOKEN documentation") secret for this purpose.
298
-
299
- ```yaml
300
- - name: Setup PHP
301
- uses: shivammathur/setup-php@v2
302
- with:
303
- php-version: '7.4'
304
- env:
305
- COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
306
- ```
307
-
308
- ### Problem Matchers
309
-
310
- Problem matchers are `json` configurations which identify errors and warnings in your logs and surface that information prominently in the GitHub Actions UI by highlighting them and creating code annotations.
311
-
312
- #### PHP
313
-
314
- Setup problem matchers for your `PHP` output by adding this step after the `setup-php` step.
315
-
316
- ```yaml
317
- - name: Setup problem matchers for PHP
318
- run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
319
- ```
320
-
321
- #### PHPUnit
322
-
323
- Setup problem matchers for your `PHPUnit` output by adding this step after the `setup-php` step.
324
-
325
- ```yaml
326
- - name: Setup problem matchers for PHPUnit
327
- run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
328
- ```
329
-
330
- #### PHPStan
331
-
332
- PHPStan supports error reporting in GitHub Actions, so no problem matchers are required.
333
-
334
- ```yaml
335
- - name: Setup PHP
336
- uses: shivammathur/setup-php@v2
337
- with:
338
- php-version: '7.4'
339
- tools: phpstan
340
-
341
- - name: Run PHPStan
342
- run: phpstan analyse src
343
- ```
344
-
345
- #### Psalm
346
-
347
- Psalm supports error reporting in GitHub Actions with an output format `github`.
348
-
349
- ```yaml
350
- - name: Setup PHP
351
- uses: shivammathur/setup-php@v2
352
- with:
353
- php-version: '7.4'
354
- tools: psalm
355
-
356
- - name: Run Psalm
357
- run: psalm --output-format=github
358
- ```
359
-
360
- #### Tools with checkstyle support
361
-
362
- For tools that support `checkstyle` reporting like `phpstan`, `psalm`, `php-cs-fixer` and `phpcs` you can use `cs2pr` to annotate your code.
363
- For examples refer to [cs2pr documentation](https://github.com/staabm/annotate-pull-request-from-checkstyle).
364
-
365
- > Here is an example with `phpcs`.
366
-
367
- ```yaml
368
- - name: Setup PHP
369
- uses: shivammathur/setup-php@v2
370
- with:
371
- php-version: '7.4'
372
- tools: cs2pr, phpcs
373
-
374
- - name: Run phpcs
375
- run: phpcs -q --report=checkstyle src | cs2pr
376
- ```
377
-
378
- ### Examples
379
-
380
- Examples for setting up this GitHub Action with different PHP Frameworks/Packages.
381
-
382
- |Framework/Package|Runs on|Workflow|
383
- |--- |--- |--- |
384
- |CakePHP with `MySQL` and `Redis`|`ubuntu`|[cakephp-mysql.yml](./examples/cakephp-mysql.yml "GitHub Action for CakePHP with MySQL and Redis")|
385
- |CakePHP with `PostgreSQL` and `Redis`|`ubuntu`|[cakephp-postgres.yml](./examples/cakephp-postgres.yml "GitHub Action for CakePHP with Postgres and Redis")|
386
- |CakePHP without services|`macOS`, `ubuntu` and `windows`|[cakephp.yml](./examples/cakephp.yml "GitHub Action for CakePHP without services")|
387
- |CodeIgniter|`macOS`, `ubuntu` and `windows`|[codeigniter.yml](./examples/codeigniter.yml "GitHub Action for CodeIgniter")|
388
- |Laravel with `MySQL` and `Redis`|`ubuntu`|[laravel-mysql.yml](./examples/laravel-mysql.yml "GitHub Action for Laravel with MySQL and Redis")|
389
- |Laravel with `PostgreSQL` and `Redis`|`ubuntu`|[laravel-postgres.yml](./examples/laravel-postgres.yml "GitHub Action for Laravel with PostgreSQL and Redis")|
390
- |Laravel without services|`macOS`, `ubuntu` and `windows`|[laravel.yml](./examples/laravel.yml "GitHub Action for Laravel without services")|
391
- |Lumen with `MySQL` and `Redis`|`ubuntu`|[lumen-mysql.yml](./examples/lumen-mysql.yml "GitHub Action for Lumen with MySQL and Redis")|
392
- |Lumen with `PostgreSQL` and `Redis`|`ubuntu`|[lumen-postgres.yml](./examples/lumen-postgres.yml "GitHub Action for Lumen with PostgreSQL and Redis")|
393
- |Lumen without services|`macOS`, `ubuntu` and `windows`|[lumen.yml](./examples/lumen.yml "GitHub Action for Lumen without services")|
394
- |Phalcon with `MySQL`|`ubuntu`|[phalcon-mysql.yml](./examples/phalcon-mysql.yml "GitHub Action for Phalcon with MySQL")|
395
- |Phalcon with `PostgreSQL`|`ubuntu`|[phalcon-postgres.yml](./examples/phalcon-postgres.yml "GitHub Action for Phalcon with PostgreSQL")|
396
- |Roots/bedrock|`ubuntu`|[bedrock.yml](./examples/bedrock.yml "GitHub Action for Wordpress Development using @roots/bedrock")|
397
- |Roots/sage|`ubuntu`|[sage.yml](./examples/sage.yml "GitHub Action for Wordpress Development using @roots/sage")|
398
- |Slim Framework|`macOS`, `ubuntu` and `windows`|[slim-framework.yml](./examples/slim-framework.yml "GitHub Action for Slim Framework")|
399
- |Symfony with `MySQL`|`ubuntu`|[symfony-mysql.yml](./examples/symfony-mysql.yml "GitHub Action for Symfony with MySQL")|
400
- |Symfony with `PostgreSQL`|`ubuntu`|[symfony-postgres.yml](./examples/symfony-postgres.yml "GitHub Action for Symfony with PostgreSQL")|
401
- |Symfony without services|`macOS`, `ubuntu` and `windows`|[symfony.yml](./examples/symfony.yml "GitHub Action for Symfony without services")|
402
- |Yii2 Starter Kit with `MySQL`|`ubuntu`|[yii2-mysql.yml](./examples/yii2-mysql.yml "GitHub Action for Yii2 Starter Kit with MySQL")|
403
- |Yii2 Starter Kit with `PostgreSQL`|`ubuntu`|[yii2-postgres.yml](./examples/yii2-postgres.yml "GitHub Action for Yii2 Starter Kit with PostgreSQL")|
404
- |Zend Framework|`macOS`, `ubuntu` and `windows`|[zend-framework.yml](./examples/zend-framework.yml "GitHub Action for Zend Framework")|
405
-
406
- ## :scroll: License
407
-
408
- - The scripts and documentation in this project are released under the [MIT License](LICENSE "License for shivammathur/setup-php").
409
- - This project has multiple [dependencies](#bookmark-dependencies "Dependencies for this PHP Action"). Their licenses can be found in their respective repositories.
410
- - The logo for `setup-php` is a derivative work of [php.net logo](https://www.php.net/download-logos.php) and is licensed under the [CC BY-SA 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/ "Creative Commons License").
411
-
412
- ## :+1: Contributions
413
-
414
- Contributions are welcome! See [Contributor's Guide](.github/CONTRIBUTING.md "shivammathur/setup-php contribution guide"). If you face any issues while using this or want to suggest a feature/improvement, create an issue [here](https://github.com/shivammathur/setup-php/issues "Issues reported").
415
-
416
- ## :sparkling_heart: Support This Project
417
-
418
- - If setup-php saved your developer time, please consider sponsoring setup-php:
419
- - [Open Collective](https://opencollective.com/setup-php "setup-php Open Collective")
420
- - [Paypal](https://www.paypal.me/shivammathur "Shivam Mathur PayPal")
421
- - [Patreon](https://www.patreon.com/shivammathur "Shivam Mathur Patreon")
422
- - Please [reach out](mailto:contact@setup-php.com) if you have any questions regarding sponsoring setup-php.
423
- - Please star the project and share it. If you blog, please share your experience of using this action.
424
-
425
- *Huge thanks to the following companies for supporting `setup-php`*
426
-
427
- <p>
428
- <a href="https://www.jetbrains.com/?from=setup-php">
429
- <img src="https://setup-php.com/sponsors/jetbrains.svg" alt="JetBrains" width="106" height="60">
430
- </a>
431
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
432
- <a href="https://blackfire.io/?utm_source=setup-php">
433
- <img src="https://setup-php.com/sponsors//blackfire.svg" alt="Blackfire" width="212" height="60">
434
- </a>
435
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
436
- <a href="https://www.macstadium.com/?source=setup-php">
437
- <img src="https://setup-php.com/sponsors//macstadium.png" alt="Mac Stadium" width="148" height="60">
438
- </a>
439
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
440
- <a href="https://tidelift.com/subscription/pkg/npm-setup-php">
441
- <img src="https://setup-php.com/sponsors//tidelift.png" alt="Tidelift" width="70" height="60">
442
- </a>
443
- </p>
444
-
445
- ## :bookmark: Dependencies
446
-
447
- - [Node.js dependencies](https://github.com/shivammathur/setup-php/network/dependencies "Node.js dependencies")
448
- - [aaronparker/VcRedist](https://github.com/aaronparker/VcRedist "VcRedist PowerShell package")
449
- - [mlocati/powershell-phpmanager](https://github.com/mlocati/powershell-phpmanager "Package to handle PHP on windows")
450
- - [ppa:ondrej/php](https://launchpad.net/~ondrej/+archive/ubuntu/php "Packaging active PHP packages")
451
- - [shivammathur/homebrew-php](https://github.com/shivammathur/homebrew-php "Tap for PHP builds for MacOS")
452
- - [shivammathur/homebrew-extensions](https://github.com/shivammathur/homebrew-extensions "Tap for PHP extensions for MacOS")
453
- - [shivammathur/php-builder](https://github.com/shivammathur/php-builder "Nightly PHP package")
454
-
455
- ## :bookmark_tabs: Further Reading
456
-
457
- - [About GitHub Actions](https://github.com/features/actions "GitHub Actions")
458
- - [GitHub Actions Syntax](https://help.github.com/en/articles/workflow-syntax-for-github-actions "GitHub Actions Syntax")
1
+ <p align="center">
2
+ <a href="https://github.com/marketplace/actions/setup-php-action" target="_blank">
3
+ <img src="https://repository-images.githubusercontent.com/206578964/e0a18480-dc65-11e9-8dd3-b9ffbf5575fe" alt="Setup PHP in GitHub Actions" width="400">
4
+ </a>
5
+ </p>
6
+
7
+ <h1 align="center">Setup PHP in GitHub Actions</h1>
8
+
9
+ <p align="center">
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
+ <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
+ <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"></a>
13
+ <a href="#tada-php-support" title="PHP Versions Supported"><img alt="PHP Versions Supported" src="https://img.shields.io/badge/php-%3E%3D%205.6-8892BF.svg"></a>
14
+ </p>
15
+
16
+ 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 setup 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.
17
+
18
+ ## Contents
19
+
20
+ - [PHP Support](#tada-php-support)
21
+ - [GitHub-Hosted Runner Support](#cloud-github-hosted-runner-support)
22
+ - [PHP Extension Support](#heavy_plus_sign-php-extension-support)
23
+ - [Tools Support](#wrench-tools-support)
24
+ - [Coverage Support](#signal_strength-coverage-support)
25
+ - [Xdebug](#xdebug)
26
+ - [PCOV](#pcov)
27
+ - [Disable coverage](#disable-coverage)
28
+ - [Usage](#memo-usage)
29
+ - [Basic Setup](#basic-setup)
30
+ - [Matrix Setup](#matrix-setup)
31
+ - [Thread Safe Setup](#thread-safe-setup)
32
+ - [Cache Dependencies](#cache-dependencies)
33
+ - [Composer GitHub OAuth](#composer-github-oauth)
34
+ - [Problem Matchers](#problem-matchers)
35
+ - [Examples](#examples)
36
+ - [License](#scroll-license)
37
+ - [Contributions](#1-contributions)
38
+ - [Support This project](#sparkling_heart-support-this-project)
39
+ - [Dependencies](#bookmark-dependencies)
40
+ - [Further Reading](#bookmark_tabs-further-reading)
41
+
42
+ ## :tada: PHP Support
43
+
44
+ | PHP Version | Stability | Release Support |
45
+ |-------------|-----------|-----------------------|
46
+ | 5.6 | `Stable` | `End of life` |
47
+ | 7.0 | `Stable` | `End of life` |
48
+ | 7.1 | `Stable` | `End of life` |
49
+ | 7.2 | `Stable` | `End of life` |
50
+ | 7.3 | `Stable` | `End of life` |
51
+ | 7.4 | `Stable` | `Security fixes only` |
52
+ | 8.0 | `Stable` | `Active` |
53
+
54
+ ## :cloud: GitHub-Hosted Runner Support
55
+
56
+ | Virtual environment | YAML workflow label | Pre-installed PHP |
57
+ |----------------------|------------------------------------|------------------------|
58
+ | Ubuntu 20.04 | `ubuntu-latest` or `ubuntu-20.04` | `PHP 7.4` to `PHP 8.1` |
59
+ | Ubuntu 18.04 | `ubuntu-18.04` | `PHP 7.1` to `PHP 8.1` |
60
+ | Windows Server 2022 | `windows-latest` or `windows-2022` | `PHP 8.1` |
61
+ | Windows Server 2019 | `windows-2019` | `PHP 8.1` |
62
+ | macOS 11.x Big Sur | `macos-11` | `PHP 8.1` |
63
+ | macOS 10.15 Catalina | `macos-latest` or `macos-10.15` | `PHP 8.1` |
64
+
65
+ ## :heavy_plus_sign: PHP Extension Support
66
+ - On `ubuntu` by default extensions which are available as a package can be installed. If the extension is not available as a package but it is on `PECL`, it can be installed by specifying `pecl` in the tools input.
67
+ - On `windows` extensions which have `windows` binary on `PECL` can be installed.
68
+ - On `macOS` extensions which are on `PECL` can be installed.
69
+ - Extensions which are installed along with PHP if specified are enabled.
70
+ - Extensions on `PECL` which do not have a latest stable version, their pre-release versions can be installed by suffixing the extension with its state i.e `alpha`, `beta`, `devel` or `snapshot` separated by a `-` like `msgpack-beta`.
71
+ - Extensions which cannot be installed gracefully leave an error message in the logs, the action is not interrupted.
72
+
73
+ ## :wrench: Tools Support
74
+
75
+ These tools can be setup globally using the `tools` input.
76
+
77
+ `codeception`, `composer`, `composer-prefetcher`, `cs2pr`, `deployer`, `pecl`, `phinx`, `phive`, `phpcbf`, `phpcpd`, `php-config`, `php-cs-fixer`, `phpcs`, `phpize`, `phpmd`, `phpstan`, `phpunit`, `prestissimo`, `psalm`, `symfony`
78
+
79
+ ```yaml
80
+ uses: shivammathur/setup-php@v1
81
+ with:
82
+ php-version: '7.4'
83
+ tools: php-cs-fixer, phpunit
84
+ ```
85
+
86
+ To set up a particular version of a tool, specify it in the form `tool:version`.
87
+
88
+ The latest stable version of `composer` is set up by default. You can set up the required `composer` version by specifying `v1`, `v2`, `snapshot` or `preview` as versions or the exact version in semver format.
89
+
90
+ ```yaml
91
+ uses: shivammathur/setup-php@v1
92
+ with:
93
+ php-version: '7.4'
94
+ tools: composer:v2
95
+ ```
96
+
97
+ If you have specified composer plugins `prestissimo` or `composer-prefetcher` in tools, the latest stable version of `composer v1` will be setup. Unless some of your packages require `composer v1`, it is recommended to drop `prestissimo` and use `composer v2`.
98
+
99
+ Version for other tools should be in `semver` format and a valid release of the tool.
100
+
101
+ ```yaml
102
+ uses: shivammathur/setup-php@v1
103
+ with:
104
+ php-version: '7.4'
105
+ tools: php-cs-fixer:2.16.2, phpunit:8.5.1
106
+ ```
107
+
108
+ Tools which cannot be installed gracefully leave an error message in the logs, the action is not interrupted.
109
+
110
+ ## :signal_strength: Coverage Support
111
+
112
+ ### Xdebug
113
+
114
+ Specify `coverage: xdebug` to use `Xdebug`.
115
+ Runs on all [PHP versions supported](#tada-php-support "List of PHP versions supported on this GitHub Action").
116
+
117
+ ```yaml
118
+ uses: shivammathur/setup-php@v1
119
+ with:
120
+ php-version: '7.4'
121
+ coverage: xdebug
122
+ ```
123
+
124
+ ### PCOV
125
+
126
+ Specify `coverage: pcov` to use `PCOV` and disable `Xdebug`.
127
+ It is much faster than `Xdebug`.
128
+ `PCOV` needs `PHP >= 7.1`.
129
+ If your source code directory is other than `src`, `lib` or, `app`, specify `pcov.directory` using the `ini-values` input.
130
+
131
+
132
+ ```yaml
133
+ uses: shivammathur/setup-php@v1
134
+ with:
135
+ php-version: '7.4'
136
+ ini-values: pcov.directory=api #optional, see above for usage.
137
+ coverage: pcov
138
+ ```
139
+
140
+ ### Disable Coverage
141
+
142
+ Specify `coverage: none` to disable both `Xdebug` and `PCOV`.
143
+ Consider disabling the coverage using this PHP action for these reasons.
144
+
145
+ - You are not generating coverage reports while testing.
146
+ - It will remove `Xdebug`, which will have a positive impact on PHP performance.
147
+ - You are using `phpdbg` for running your tests.
148
+
149
+ ```yaml
150
+ uses: shivammathur/setup-php@v1
151
+ with:
152
+ php-version: '7.4'
153
+ coverage: none
154
+ ```
155
+
156
+ ## :memo: Usage
157
+
158
+ Inputs supported by this GitHub Action.
159
+
160
+ - php-version `required`
161
+ - extensions `optional`
162
+ - ini-values `optional`
163
+ - coverage `optional`
164
+ - tools `optional`
165
+
166
+ See [action.yml](action.yml "Metadata for this GitHub Action") and usage below for more info.
167
+
168
+ ### Basic Setup
169
+
170
+ > Setup a particular PHP version.
171
+
172
+ ```yaml
173
+ steps:
174
+ - name: Checkout
175
+ uses: actions/checkout@v2
176
+
177
+ - name: Setup PHP
178
+ uses: shivammathur/setup-php@v1
179
+ with:
180
+ php-version: '7.4'
181
+ extensions: mbstring, intl #optional, setup extensions
182
+ ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration
183
+ coverage: xdebug #optional, setup coverage driver
184
+ tools: php-cs-fixer, phpunit #optional, setup tools globally
185
+ ```
186
+
187
+ ### Matrix Setup
188
+
189
+ > Setup multiple PHP versions on multiple operating systems.
190
+
191
+ ```yaml
192
+ jobs:
193
+ run:
194
+ runs-on: ${{ matrix.operating-system }}
195
+ strategy:
196
+ matrix:
197
+ operating-system: [ubuntu-latest, windows-latest, macos-latest]
198
+ php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
199
+ name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
200
+ steps:
201
+ - name: Checkout
202
+ uses: actions/checkout@v2
203
+
204
+ - name: Setup PHP
205
+ uses: shivammathur/setup-php@v1
206
+ with:
207
+ php-version: ${{ matrix.php-versions }}
208
+ extensions: mbstring, intl #optional, setup extensions
209
+ ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration
210
+ coverage: xdebug #optional, setup coverage driver
211
+ tools: php-cs-fixer, phpunit #optional, setup tools globally
212
+ ```
213
+
214
+ ### Thread Safe Setup
215
+
216
+ - `NTS` versions are setup by default.
217
+ - On `ubuntu` and `macOS` only NTS versions are supported.
218
+ - On `windows` both `TS` and `NTS` versions are supported.
219
+
220
+ ```yaml
221
+ jobs:
222
+ run:
223
+ runs-on: windows-latest
224
+ name: Setup PHP TS on Windows
225
+ steps:
226
+ - name: Checkout
227
+ uses: actions/checkout@v2
228
+
229
+ - name: Setup PHP
230
+ uses: shivammathur/setup-php@v1
231
+ with:
232
+ php-version: '7.4'
233
+ env:
234
+ phpts: ts # specify ts or nts
235
+ ```
236
+
237
+ ### Cache Dependencies
238
+
239
+ You can persist composer's internal cache directory using the [`action/cache`](https://github.com/actions/cache "GitHub Action to cache files") GitHub Action. Dependencies cached are loaded directly instead of downloading them while installation. The files cached are available across check-runs and will reduce the workflow execution time.
240
+
241
+ **Note:** Please do not cache `vendor` directory using `action/cache` as that will have side-effects.
242
+
243
+ ```yaml
244
+ - name: Get Composer Cache Directory
245
+ id: composer-cache
246
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
247
+
248
+ - name: Cache dependencies
249
+ uses: actions/cache@v2
250
+ with:
251
+ path: ${{ steps.composer-cache.outputs.dir }}
252
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
253
+ restore-keys: ${{ runner.os }}-composer-
254
+
255
+ - name: Install Dependencies
256
+ run: composer install --prefer-dist
257
+ ```
258
+
259
+ - If you do not commit `composer.lock`, you can use the hash of `composer.json` as the key for your cache.
260
+ ```yaml
261
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
262
+ ```
263
+
264
+ - If you support a range of `composer` dependencies and use `prefer-lowest` and `prefer-stable` options, you can store them in your matrix add them to the keys.
265
+ ```yaml
266
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.prefer }}-
267
+ restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}-
268
+ ```
269
+
270
+ ### Composer GitHub OAuth
271
+
272
+ If you have a number of workflows which setup multiple tools or have many composer dependencies, you might hit the GitHub's rate limit for composer. To avoid that you can add a `OAuth` token to the composer's config by setting `COMPOSER_TOKEN` environment variable. You can use [`GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token "GITHUB_TOKEN documentation") secret for this purpose.
273
+
274
+ ```yaml
275
+ - name: Setup PHP
276
+ uses: shivammathur/setup-php@v2
277
+ with:
278
+ php-version: '7.4'
279
+ env:
280
+ COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
281
+ ```
282
+
283
+ ### Problem Matchers
284
+
285
+ Problem matchers are `json` configurations which identify errors and warnings in your logs and surface that information prominently in the GitHub Actions UI by highlighting them and creating code annotations.
286
+
287
+ #### PHP
288
+
289
+ Setup problem matchers for your `PHP` output by adding this step after the `setup-php` step.
290
+
291
+ ```yaml
292
+ - name: Setup problem matchers for PHP
293
+ run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
294
+ ```
295
+
296
+ #### PHPUnit
297
+
298
+ Setup problem matchers for your `PHPUnit` output by adding this step after the `setup-php` step.
299
+
300
+ ```yaml
301
+ - name: Setup problem matchers for PHPUnit
302
+ run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
303
+ ```
304
+
305
+ #### PHPStan
306
+
307
+ PHPStan supports error reporting in GitHub Actions, so no problem matchers are required.
308
+
309
+ ```yaml
310
+ - name: Setup PHP
311
+ uses: shivammathur/setup-php@v2
312
+ with:
313
+ php-version: '7.4'
314
+ tools: phpstan
315
+
316
+ - name: Run PHPStan
317
+ run: phpstan analyse src
318
+ ```
319
+
320
+ #### Psalm
321
+
322
+ Psalm supports error reporting in GitHub Actions with an output format `github`.
323
+
324
+ ```yaml
325
+ - name: Setup PHP
326
+ uses: shivammathur/setup-php@v2
327
+ with:
328
+ php-version: '7.4'
329
+ tools: psalm
330
+
331
+ - name: Run Psalm
332
+ run: psalm --output-format=github
333
+ ```
334
+
335
+ #### Tools with checkstyle support
336
+
337
+ For tools that support `checkstyle` reporting like `phpstan`, `psalm`, `php-cs-fixer` and `phpcs` you can use `cs2pr` to annotate your code.
338
+ For examples refer to [cs2pr documentation](https://github.com/staabm/annotate-pull-request-from-checkstyle).
339
+
340
+ > Here is an example with `phpcs`.
341
+
342
+ ```yaml
343
+ - name: Setup PHP
344
+ uses: shivammathur/setup-php@v2
345
+ with:
346
+ php-version: '7.4'
347
+ tools: cs2pr, phpcs
348
+
349
+ - name: Run phpcs
350
+ run: phpcs -q --report=checkstyle src | cs2pr
351
+ ```
352
+
353
+ ### Examples
354
+
355
+ Examples for setting up this GitHub Action with different PHP Frameworks/Packages.
356
+
357
+ | Framework/Package | Runs on | Workflow |
358
+ |---------------------------------------|---------------------------------|---------------------------------------------------------------------------------------------------------------|
359
+ | CakePHP with `MySQL` and `Redis` | `ubuntu` | [cakephp-mysql.yml](./examples/cakephp-mysql.yml "GitHub Action for CakePHP with MySQL and Redis") |
360
+ | CakePHP with `PostgreSQL` and `Redis` | `ubuntu` | [cakephp-postgres.yml](./examples/cakephp-postgres.yml "GitHub Action for CakePHP with Postgres and Redis") |
361
+ | CakePHP without services | `macOS`, `ubuntu` and `windows` | [cakephp.yml](./examples/cakephp.yml "GitHub Action for CakePHP without services") |
362
+ | CodeIgniter | `macOS`, `ubuntu` and `windows` | [codeigniter.yml](./examples/codeigniter.yml "GitHub Action for CodeIgniter") |
363
+ | Laravel with `MySQL` and `Redis` | `ubuntu` | [laravel-mysql.yml](./examples/laravel-mysql.yml "GitHub Action for Laravel with MySQL and Redis") |
364
+ | Laravel with `PostgreSQL` and `Redis` | `ubuntu` | [laravel-postgres.yml](./examples/laravel-postgres.yml "GitHub Action for Laravel with PostgreSQL and Redis") |
365
+ | Laravel without services | `macOS`, `ubuntu` and `windows` | [laravel.yml](./examples/laravel.yml "GitHub Action for Laravel without services") |
366
+ | Lumen with `MySQL` and `Redis` | `ubuntu` | [lumen-mysql.yml](./examples/lumen-mysql.yml "GitHub Action for Lumen with MySQL and Redis") |
367
+ | Lumen with `PostgreSQL` and `Redis` | `ubuntu` | [lumen-postgres.yml](./examples/lumen-postgres.yml "GitHub Action for Lumen with PostgreSQL and Redis") |
368
+ | Lumen without services | `macOS`, `ubuntu` and `windows` | [lumen.yml](./examples/lumen.yml "GitHub Action for Lumen without services") |
369
+ | Phalcon with `MySQL` | `ubuntu` | [phalcon-mysql.yml](./examples/phalcon-mysql.yml "GitHub Action for Phalcon with MySQL") |
370
+ | Phalcon with `PostgreSQL` | `ubuntu` | [phalcon-postgres.yml](./examples/phalcon-postgres.yml "GitHub Action for Phalcon with PostgreSQL") |
371
+ | Roots/bedrock | `ubuntu` | [bedrock.yml](./examples/bedrock.yml "GitHub Action for Wordpress Development using @roots/bedrock") |
372
+ | Roots/sage | `ubuntu` | [sage.yml](./examples/sage.yml "GitHub Action for Wordpress Development using @roots/sage") |
373
+ | Slim Framework | `macOS`, `ubuntu` and `windows` | [slim-framework.yml](./examples/slim-framework.yml "GitHub Action for Slim Framework") |
374
+ | Symfony with `MySQL` | `ubuntu` | [symfony-mysql.yml](./examples/symfony-mysql.yml "GitHub Action for Symfony with MySQL") |
375
+ | Symfony with `PostgreSQL` | `ubuntu` | [symfony-postgres.yml](./examples/symfony-postgres.yml "GitHub Action for Symfony with PostgreSQL") |
376
+ | Symfony without services | `macOS`, `ubuntu` and `windows` | [symfony.yml](./examples/symfony.yml "GitHub Action for Symfony without services") |
377
+ | Yii2 Starter Kit with `MySQL` | `ubuntu` | [yii2-mysql.yml](./examples/yii2-mysql.yml "GitHub Action for Yii2 Starter Kit with MySQL") |
378
+ | Yii2 Starter Kit with `PostgreSQL` | `ubuntu` | [yii2-postgres.yml](./examples/yii2-postgres.yml "GitHub Action for Yii2 Starter Kit with PostgreSQL") |
379
+ | Zend Framework | `macOS`, `ubuntu` and `windows` | [zend-framework.yml](./examples/zend-framework.yml "GitHub Action for Zend Framework") |
380
+
381
+ ## :scroll: License
382
+
383
+ - The scripts and documentation in this project are released under the [MIT License](LICENSE "License for shivammathur/setup-php").
384
+ - This project has multiple [dependencies](#bookmark-dependencies "Dependencies for this PHP Action"). Their licenses can be found in their respective repositories.
385
+ - The logo for `setup-php` is a derivative work of [php.net logo](https://www.php.net/download-logos.php) and is licensed under the [CC BY-SA 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/ "Creative Commons License").
386
+
387
+ ## :+1: Contributions
388
+
389
+ Contributions are welcome! See [Contributor's Guide](.github/CONTRIBUTING.md "shivammathur/setup-php contribution guide"). If you face any issues while using this or want to suggest a feature/improvement, create an issue [here](https://github.com/shivammathur/setup-php/issues "Issues reported").
390
+
391
+
392
+ ## :sparkling_heart: Support This Project
393
+
394
+ - Please star the project and share it. If you blog, please share your experience of using `setup-php`.
395
+ - Please [reach out](mailto:contact@setup-php.com) if you have any questions about sponsoring setup-php.
396
+
397
+ Many users and organisations support setup-php via [GitHub Sponsors](https://github.com/sponsors/shivammathur).
398
+
399
+ <a href="https://github.com/sponsors/shivammathur"><img src="https://setup-php.com/sponsors.svg?" alt="Sponsor shivammathur"></a>
400
+
401
+ These companies generously provide setup-php their products and services to aid in the development of this project.
402
+
403
+ <p>
404
+ <a href="https://www.jetbrains.com/?from=setup-php">
405
+ <img src="https://setup-php.com/sponsors/jetbrains.svg" alt="JetBrains" width="106" height="60">
406
+ </a>
407
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
408
+ <a href="https://www.macstadium.com/opensource/members#gh-light-mode-only">
409
+ <img src="https://setup-php.com/sponsors/macstadium.png" alt="Mac Stadium" width="148" height="60">
410
+ </a>
411
+ <a href="https://www.macstadium.com/opensource/members#gh-dark-mode-only">
412
+ <img src="https://setup-php.com/sponsors/macstadium-white.png" alt="Mac Stadium" width="148" height="60">
413
+ </a>
414
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
415
+ <a href="https://tidelift.com/subscription/pkg/npm-setup-php">
416
+ <img src="https://setup-php.com/sponsors/tidelift.png" alt="Tidelift" width="70" height="60">
417
+ </a>
418
+ </p>
419
+
420
+ ## :bookmark: Dependencies
421
+
422
+ - [Node.js dependencies](https://github.com/shivammathur/setup-php/network/dependencies "Node.js dependencies")
423
+ - [aaronparker/VcRedist](https://github.com/aaronparker/VcRedist "VcRedist PowerShell package")
424
+ - [mlocati/powershell-phpmanager](https://github.com/mlocati/powershell-phpmanager "Package to handle PHP on windows")
425
+ - [ppa:ondrej/php](https://launchpad.net/~ondrej/+archive/ubuntu/php "Packaging active PHP packages")
426
+ - [shivammathur/homebrew-php](https://github.com/shivammathur/homebrew-php "Tap for PHP builds for MacOS")
427
+ - [shivammathur/homebrew-extensions](https://github.com/shivammathur/homebrew-extensions "Tap for PHP extensions for MacOS")
428
+ - [shivammathur/php-builder](https://github.com/shivammathur/php-builder "Nightly PHP package")
429
+
430
+ ## :bookmark_tabs: Further Reading
431
+
432
+ - [About GitHub Actions](https://github.com/features/actions "GitHub Actions")
433
+ - [GitHub Actions Syntax](https://help.github.com/en/articles/workflow-syntax-for-github-actions "GitHub Actions Syntax")
459
434
  - [Other Awesome Actions](https://github.com/sdras/awesome-actions "List of Awesome GitHub Actions")