Update docs

This commit is contained in:
Shivam Mathur 2020-06-09 07:04:47 +05:30
parent c09954033f
commit 41397ce45e
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
9 changed files with 82 additions and 163 deletions

2
.github/FUNDING.yml vendored
View File

@ -2,7 +2,5 @@
tidelift: "npm/setup-php"
community_bridge: setup-php
issuehunt: shivammathur
patreon: shivammathur
liberapay: shivammathur
custom: https://www.paypal.me/shivammathur

View File

@ -2,7 +2,7 @@
name: Bug report
about: Nice, you found a bug!
title: ''
labels: t:bug
labels: 'bug'
assignees: 'shivammathur'
---
@ -10,6 +10,11 @@ assignees: 'shivammathur'
**Describe the bug**
<!-- Please describe the bug concisely. -->
**Version**
- [ ] I have checked releases and the bug exists in the latest patch version of `v1` or `v2`.
- [ ] `v2`
- [ ] `v1`
**Runners**
<!-- Please mark the GitHub Action runner your workflow uses. -->
- [ ] GitHub Hosted

View File

@ -2,7 +2,7 @@
name: Feature request
about: Suggest a new feature
title: ''
labels: t:enhancement
labels: 'enhancement'
assignees: 'shivammathur'
---
@ -10,6 +10,9 @@ assignees: 'shivammathur'
**Describe the feature**
<!-- Please describe concisely the feature you want to add. -->
**Version**
- [ ] I have checked releases and the feature is missing in the latest patch version of `v2`.
**Underlying issue**
<!-- Please describe the issue this would solve. -->

View File

@ -1,37 +0,0 @@
---
name: 🐞 Bug Fix
about: You have a fix for a bug?
labels: bug
---
## A Pull Request should be associated with an Issue.
> If you're offering a new feature or fixing anything, please provide the details in Issues,
> so that the development can be pointed in the intended direction.
Related issue: <!-- Please link the related issue -->
> Further notes in [Contribution Guidelines](.github/CONTRIBUTING.md)
> Thank you for your contribution.
### Description
This PR [briefly explain what it does]
> In case this PR introduced TypeScript/JavaScript code changes:
- [ ] I have written test cases for the changes in this pull request.
- [ ] I have run `npm run format` before the commit.
- [ ] I have run `npm run lint` before the commit.
- [ ] I have run `npm run release` before the commit.
- [ ] `npm test` returns with no unit test errors and all code covered.
> In case this PR edits any scripts:
- [ ] I have checked the edited scripts for syntax.
- [ ] I have tested the changes in an integration test (If yes, provide workflow link).
<!--
- Please target the develop branch when submitting the pull request.
-->

View File

@ -1,37 +0,0 @@
---
name: ⚙ Improvement
about: You have some improvement to make setup-php better?
labels: enhancement
---
## A Pull Request should be associated with an Issue.
> If you're improving a feature please provide the details in Issues,
> so that the development can be pointed in the intended direction.
Related issue: <!-- Please link the related issue -->
> Further notes in [Contribution Guidelines](.github/CONTRIBUTING.md)
> Thank you for your contribution.
### Description
This PR [briefly explain what it does]
> In case this PR introduced TypeScript/JavaScript code changes:
- [ ] I have written test cases for the changes in this pull request.
- [ ] I have run `npm run format` before the commit.
- [ ] I have run `npm run lint` before the commit.
- [ ] I have run `npm run release` before the commit.
- [ ] `npm test` returns with no unit test errors and all code covered.
> In case this PR edits any scripts:
- [ ] I have checked the edited scripts for syntax.
- [ ] I have tested the changes in an integration test (If yes, provide workflow link).
<!--
- Please target the develop branch when submitting the pull request.
-->

View File

@ -1,37 +0,0 @@
---
name: 🎉 New Feature
about: You have added a new feature to setup-php?
labels: enhancement
---
## A Pull Request should be associated with an Issue.
> If you're adding a new feature please provide the details in Issues,
> so that the development can be pointed in the intended direction.
Related issue: <!-- Please link the related issue -->
> Further notes in [Contribution Guidelines](.github/CONTRIBUTING.md)
> Thank you for your contribution.
### Description
This PR [briefly explain what it does]
> In case this PR introduced TypeScript/JavaScript code changes:
- [ ] I have written test cases for the changes in this pull request.
- [ ] I have run `npm run format` before the commit.
- [ ] I have run `npm run lint` before the commit.
- [ ] I have run `npm run release` before the commit.
- [ ] `npm test` returns with no unit test errors and all code covered.
> In case this PR edits any scripts:
- [ ] I have checked the edited scripts for syntax.
- [ ] I have tested the changes in an integration test (If yes, provide workflow link).
<!--
- Please target the develop branch when submitting the pull request.
-->

6
.github/SECURITY.md vendored
View File

@ -6,8 +6,8 @@ The following versions of this project are supported for security updates.
| Version | Supported |
| ------- | ------------------ |
| 1.8.x | :white_check_mark: |
| 2.2.x | :white_check_mark: |
| 1.9.x | :white_check_mark: |
| 2.3.x | :white_check_mark: |
## Supported PHP Versions
@ -22,7 +22,7 @@ This security policy only applies to the latest patches of the following PHP ver
## Reporting a Vulnerability
If you have found any issues that might have security implications in the versions supported, please send a report privately to [contact@shivammathur.com](mailto:contact@shivammathur.com)
If you have found any issues that might have security implications in the versions supported, please send a report privately to [contact@shivammathur.com](mailto:contact@shivammathur.com).
Do not report security reports publicly.
## Tidelift

View File

@ -19,9 +19,11 @@ Setup PHP with required extensions, php.ini configuration, code-coverage support
- [PHP Support](#tada-php-support)
- [OS/Platform Support](#cloud-osplatform-support)
- [GitHub-Hosted Runners](#github-hosted-runners)
- [Self-Hosted Runners](#self-hosted-runners)
- [PHP Extension Support](#heavy_plus_sign-php-extension-support)
- [Tools Support](#wrench-tools-support)
- [Coverage support](#signal_strength-coverage-support)
- [Coverage Support](#signal_strength-coverage-support)
- [Xdebug](#xdebug)
- [PCOV](#pcov)
- [Disable Coverage](#disable-coverage)
@ -29,7 +31,7 @@ Setup PHP with required extensions, php.ini configuration, code-coverage support
- [Inputs](#inputs)
- [Basic Setup](#basic-setup)
- [Matrix Setup](#matrix-setup)
- [Experimental Setup](#experimental-setup)
- [Nightly Build Setup](#nightly-build-setup)
- [Self Hosted Setup](#self-hosted-setup)
- [Local Testing Setup](#local-testing-setup)
- [Thread Safe Setup](#thread-safe-setup)
@ -51,30 +53,45 @@ Setup PHP with required extensions, php.ini configuration, code-coverage support
|PHP Version|Stability|Release Support|Runner Support|
|--- |--- |--- |--- |
|`5.3`|`Stable`|`End of life`|`GitHub`|
|`5.4`|`Stable`|`End of life`|`GitHub`|
|`5.5`|`Stable`|`End of life`|`GitHub`|
|`5.6`|`Stable`|`End of life`|`GitHub`, `self-hosted`|
|`7.0`|`Stable`|`End of life`|`GitHub`, `self-hosted`|
|`7.1`|`Stable`|`End of life`|`GitHub`, `self-hosted`|
|`7.2`|`Stable`|`Security fixes only`|`GitHub`, `self-hosted`|
|`7.3`|`Stable`|`Active`|`GitHub`, `self-hosted`|
|`7.4`|`Stable`|`Active`|`GitHub`, `self-hosted`|
|`8.0`|`Experimental`|`In development`|`GitHub`, `self-hosted`|
|`5.3`|`Stable`|`End of life`|`GitHub-hosted`|
|`5.4`|`Stable`|`End of life`|`GitHub-hosted`|
|`5.5`|`Stable`|`End of life`|`GitHub-hosted`|
|`5.6`|`Stable`|`End of life`|`GitHub-hosted`, `self-hosted`|
|`7.0`|`Stable`|`End of life`|`GitHub-hosted`, `self-hosted`|
|`7.1`|`Stable`|`End of life`|`GitHub-hosted`, `self-hosted`|
|`7.2`|`Stable`|`Security fixes only`|`GitHub-hosted`, `self-hosted`|
|`7.3`|`Stable`|`Active`|`GitHub-hosted`, `self-hosted`|
|`7.4`|`Stable`|`Active`|`GitHub-hosted`, `self-hosted`|
|`8.0`|`Nightly`|`In development`|`GitHub-hosted`, `self-hosted`|
**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 [experimental setup](#experimental-setup) for more information.
**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.
## :cloud: OS/Platform Support
|Virtual environment|matrix.operating-system|
|--- |--- |
|Windows Server 2019|`windows-latest` or `windows-2019`|
|Ubuntu 18.04|`ubuntu-latest` or `ubuntu-18.04`|
|Ubuntu 16.04|`ubuntu-16.04`|
|MacOS X Catalina 10.15|`macos-latest` or `macos-10.15`|
|Self Hosted|`self-hosted`|
Both `GitHub-hosted` runners and `self-hosted` runners are supported on the following operating systems.
**Note:** Refer to the [self-hosted setup](#self-hosted-setup) to use the action on self-hosted runners.
### GitHub-Hosted Runners
|Virtual environment|YAML workflow label|Pre-installed PHP|
|--- |--- |--- |
|Ubuntu 16.04|`ubuntu-16.04`|`PHP 5.6` to `PHP 7.4`|
|Ubuntu 18.04|`ubuntu-latest` or `ubuntu-18.04`|`PHP 7.1` to `PHP 7.4`|
|Ubuntu 20.04|`ubuntu-20.04`|`PHP 7.4`|
|Windows Server 2019|`windows-latest` or `windows-2019`|`PHP 7.4`|
|macOS Catalina 10.15|`macos-latest` or `macos-10.15`|`PHP 7.4`|
### Self-Hosted Runners
|Host OS/Virtual environment|YAML workflow label|
|--- |--- |
|Ubuntu 16.04|`self-hosted` or `Linux`|
|Ubuntu 18.04|`self-hosted` or `Linux`|
|Ubuntu 20.04|`self-hosted` or `Linux`|
|Windows 7 and newer|`self-hosted` or `Windows`|
|Windows Server 2012 R2 and newer|`self-hosted` or `Windows`|
|macOS Catalina 10.15|`self-hosted` or `macOS`|
- Refer to the [self-hosted setup](#self-hosted-setup) to use the action on self-hosted runners.
## :heavy_plus_sign: PHP Extension Support
@ -140,24 +157,30 @@ with:
tools: php-cs-fixer, phpunit
```
To setup a particular version of a tool, specify it in this form `tool:version`.
Version should be in semver format and a valid release of the tool.
To setup a particular version of a tool, specify it in the form `tool:version`.
Latest stable version of `composer` is setup by default. You can setup the required version by specifying `v1`, `v2`, `snapshot` or `preview` as version.
```yaml
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: php-cs-fixer:2.15.5, phpunit:8.5.1
tools: composer:v2
```
Version for other tools should be in `semver` format and a valid release of the tool.
```yaml
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: php-cs-fixer:2.16.2, phpunit:8.5.1
```
**Notes**
- `composer` is setup by default.
- Specifying version for `composer` and `pecl` has no effect, latest versions of both tools which are compatible with the PHP version will be setup.
- Both agent and client will be setup when `blackfire` is specified.
- If the version specified for the tool is not in semver format, latest version of the tool will be setup.
- Both agent `blackfire-agent` and client `blackfire` are setup when `blackfire` is specified.
- Tools which cannot be setup gracefully leave an error message in the logs, the action is not interrupted.
## :signal_strength: Coverage support
## :signal_strength: Coverage Support
### Xdebug
@ -174,8 +197,8 @@ with:
### PCOV
Specify `coverage: pcov` to use `PCOV` and disable `Xdebug`.
It is much faster than `Xdebug`.
`PCOV` needs `PHP >= 7.1`.
`PCOV` supports `PHP 7.1` and newer PHP versions.
Tests with `PCOV` run much faster than with `Xdebug`.
If your source code directory is other than `src`, `lib` or, `app`, specify `pcov.directory` using the `ini-values` input.
```yaml
@ -285,12 +308,12 @@ jobs:
tools: php-cs-fixer, phpunit
```
### Experimental Setup
### Nightly Build Setup
> 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.
- This version is currently in development and is an experimental feature on this action.
- `PECL` is installed by default with this version on `ubuntu`.
- This version is currently in development.
- `PECL` is installed by default with this version on `ubuntu` and `macOS`.
- Some extensions might not support this version currently.
- Refer to this [RFC](https://wiki.php.net/rfc/jit "PHP JIT RFC configuration") for configuring `PHP JIT` on this version.
- Refer to this [list of RFCs](https://wiki.php.net/rfc#php_80 "List of RFCs implemented in PHP8") implemented in this version.
@ -314,8 +337,6 @@ steps:
> Setup PHP on a self-hosted runner.
- `PHP 5.6` and newer versions are supported on self-hosted runners.
- `Windows 7` and newer, `Windows Server 2012 R2` and newer, `Ubuntu 18.04`, `Ubuntu 16.04` and `MacOS X Catalina 10.15` are supported.
- To setup a dockerized self-hosted runner, refer to this [guide](https://github.com/shivammathur/setup-php/wiki/Dockerized-self-hosted-runner-on-Ubuntu) to setup in an `Ubuntu` container and refer to this [guide](https://github.com/shivammathur/setup-php/wiki/Dockerized-self-hosted-runner-on-Windows) to setup in a `Windows` container.
- To setup the runner directly on the host OS or in a VM, 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.
@ -366,6 +387,9 @@ Run the workflow locally with `act` using [`shivammathur/node`](https://github.c
# For runs-on: ubuntu-latest
act -P ubuntu-latest=shivammathur/node:latest
# For runs-on: ubuntu-20.04
act -P ubuntu-20.04=shivammathur/node:focal
# For runs-on: ubuntu-18.04
act -P ubuntu-18.04=shivammathur/node:bionic
@ -609,7 +633,7 @@ Contributions are welcome! See [Contributor's Guide](.github/CONTRIBUTING.md "sh
If this action helped you.
- To support this project subscribe on [Patreon](https://www.patreon.com/shivammathur "Shivam Mathur Patreon") or sponsor using [Paypal](https://www.paypal.me/shivammathur "Shivam Mathur PayPal").
- Sponsor the project by subscribing on [Patreon](https://www.patreon.com/shivammathur "Shivam Mathur Patreon") or by contributing using [Paypal](https://www.paypal.me/shivammathur "Shivam Mathur PayPal").
- Please star the project and share it with the community.
- If you blog, write about your experience of using this action.
- If you need any help using this, please contact me using [Codementor](https://www.codementor.io/shivammathur "Shivam Mathur Codementor")

14
dist/index.js vendored
View File

@ -973,7 +973,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
@ -1030,7 +1030,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
@ -1605,7 +1605,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
@ -2130,7 +2130,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
@ -2269,7 +2269,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
@ -2362,7 +2362,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
@ -2680,7 +2680,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};