mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-02-22 23:20:30 +07:00
Use Markdown highlighting in README for notes
This commit is contained in:
parent
a99dd2408e
commit
ad03a92562
46
README.md
46
README.md
@ -127,9 +127,10 @@ On all supported OS/Platforms the following PHP versions can be set up as per th
|
|||||||
| `8.4` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` |
|
| `8.4` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` |
|
||||||
| `8.5` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` |
|
| `8.5` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` |
|
||||||
|
|
||||||
**Notes:**
|
|
||||||
- Specifying `8.5` in `php-version` input installs a nightly build of `PHP 8.5.0-dev`. See [nightly build setup](#nightly-build-setup) for more information.
|
> [!Note]
|
||||||
- To use JIT on `PHP 8.0` and above, refer to the [JIT configuration](#jit-configuration) section.
|
> - Specifying `8.5` in `php-version` input installs a nightly build of `PHP 8.5.0-dev`. See [nightly build setup](#nightly-build-setup) for more information.
|
||||||
|
> - To use JIT on `PHP 8.0` and above, refer to the [JIT configuration](#jit-configuration) section.
|
||||||
|
|
||||||
## :heavy_plus_sign: PHP Extension Support
|
## :heavy_plus_sign: PHP Extension Support
|
||||||
|
|
||||||
@ -187,7 +188,7 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
|
|||||||
|
|
||||||
- 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.
|
- 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.
|
||||||
|
|
||||||
**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.
|
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.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup PHP without any shared extensions except mbstring
|
- name: Setup PHP without any shared extensions except mbstring
|
||||||
@ -310,12 +311,12 @@ These tools can be set up globally using the `tools` input. It accepts a string
|
|||||||
fail-fast: true
|
fail-fast: true
|
||||||
```
|
```
|
||||||
|
|
||||||
**Notes**
|
> [!NOTE]
|
||||||
- Input `tools` is useful to set up tools which are only used in CI workflows, thus keeping your `composer.json` tidy.
|
> - Input `tools` is useful to set up tools which are only used in CI workflows, thus keeping your `composer.json` tidy.
|
||||||
- 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.
|
> - 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.
|
||||||
- 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`.
|
> - 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`.
|
||||||
- Also, `COMPOSER_NO_AUDIT` is set to `1`. So if you want to audit your dependencies for security vulnerabilities, it is recommended to add a `composer audit` step before you install them.
|
> - Also, `COMPOSER_NO_AUDIT` is set to `1`. So if you want to audit your dependencies for security vulnerabilities, it is recommended to add a `composer audit` step before you install them.
|
||||||
- If you want to set a different `COMPOSER_PROCESS_TIMEOUT`, you can set it in your workflow file using the `env` keyword.
|
> - If you want to set a different `COMPOSER_PROCESS_TIMEOUT`, you can set it in your workflow file using the `env` keyword.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup PHP with composer and custom process timeout
|
- name: Setup PHP with composer and custom process timeout
|
||||||
@ -352,7 +353,8 @@ Runs on all [PHP versions supported](#tada-php-support "List of PHP versions sup
|
|||||||
coverage: xdebug2
|
coverage: xdebug2
|
||||||
```
|
```
|
||||||
|
|
||||||
**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.
|
> [!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.
|
||||||
|
|
||||||
### PCOV
|
### PCOV
|
||||||
|
|
||||||
@ -580,10 +582,10 @@ steps:
|
|||||||
- Production release builds of PHP without debugging symbols are set up by default.
|
- Production release builds of PHP without debugging symbols are set up by default.
|
||||||
- You can use the `debug` environment variable to set up a build with debugging symbols for PHP 5.6 and above.
|
- You can use the `debug` environment variable to set up a build with debugging symbols for PHP 5.6 and above.
|
||||||
|
|
||||||
**Notes**
|
> [!NOTE]
|
||||||
- On Linux, the debug symbols are added as [debug info files](https://sourceware.org/gdb/current/onlinedocs/gdb.html/Separate-Debug-Files.html) in the `/usr/lib/debug/.build-id` directory. These files match the `build-id` in the ELF section of the PHP binaries and debugging tools like `gdb` are able to resolve the symbols from these files.
|
> - On Linux, the debug symbols are added as [debug info files](https://sourceware.org/gdb/current/onlinedocs/gdb.html/Separate-Debug-Files.html) in the `/usr/lib/debug/.build-id` directory. These files match the `build-id` in the ELF section of the PHP binaries and debugging tools like `gdb` are able to resolve the symbols from these files.
|
||||||
- On Windows, the debug symbols are added as `pdb` files in the PHP installation directory.
|
> - On Windows, the debug symbols are added as `pdb` files in the PHP installation directory.
|
||||||
- On macOS, the debug symbols are compiled into the binaries.
|
> - On macOS, the debug symbols are compiled into the binaries.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
@ -698,10 +700,10 @@ jobs:
|
|||||||
runner: self-hosted
|
runner: self-hosted
|
||||||
```
|
```
|
||||||
|
|
||||||
**Notes**
|
> [!NOTE]
|
||||||
- Do not set up multiple self-hosted runners on a single server instance as parallel workflow will conflict with each other.
|
> - Do not set up multiple self-hosted runners on a single server instance as parallel workflow will conflict with each other.
|
||||||
- Do not set up self-hosted runners on the side on your development environment or your production server.
|
> - Do not set up self-hosted runners on the side on your development environment or your production server.
|
||||||
- Avoid using the same labels for your `self-hosted` runners which are used by `GitHub-hosted` runners.
|
> - Avoid using the same labels for your `self-hosted` runners which are used by `GitHub-hosted` runners.
|
||||||
|
|
||||||
### Local Testing Setup
|
### Local Testing Setup
|
||||||
|
|
||||||
@ -781,9 +783,9 @@ If your project uses composer, you can persist the composer's internal cache dir
|
|||||||
run: composer install --prefer-dist
|
run: composer install --prefer-dist
|
||||||
```
|
```
|
||||||
|
|
||||||
**Notes**
|
> [!NOTE]
|
||||||
- Please do not cache `vendor` directory using `action/cache` as that will have side effects.
|
> - Please do not cache `vendor` directory using `action/cache` as that will have side effects.
|
||||||
- If you do not commit `composer.lock`, you can use the hash of `composer.json` as the key for your cache.
|
> - If you do not commit `composer.lock`, you can use the hash of `composer.json` as the key for your cache.
|
||||||
```yaml
|
```yaml
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user