Add support for adding PHP extensions

This commit is contained in:
Shivam Mathur
2019-09-07 18:01:50 +05:30
parent 1c6748567c
commit c5513d9a78
6842 changed files with 266 additions and 1017047 deletions

View File

@ -4,7 +4,7 @@
<a href="https://github.com/shivammathur/setup-php"><img alt="GitHub Actions status" src="https://github.com/shivammathur/setup-php/workflows/Main%20workflow/badge.svg"></a>
</p>
This action sets up a php environment along with composer on multiple platforms for use in github actions.
This action sets up a php environment along with composer and required PHP extensions on multiple platforms for use in github actions.
# PHP Version Support
- 5.6
@ -18,6 +18,12 @@ This action sets up a php environment along with composer on multiple platforms
- Windows (windows-latest)
- MacOS (macOS-latest)
# PHP Extension Support
- On linux extensions which have the package in apt are installed.
- On Windows and MacOS pecl extensions are installed.
- Extensions which are installed along with PHP if specified are enabled.
- Extensions which cannot be installed gracefully leave an error message in the logs, the action is not interruped.
# Usage
See [action.yml](action.yml)
@ -31,10 +37,13 @@ steps:
uses: shivammathur/setup-php@master
with:
php-version: 7.3
extension-csv: mbstring, xdebug
- name: Check PHP Version
run: php -v
- name: Check Composer Version
run: composer -V
- name: Check PHP Extensions
run: php -m
```
Matrix Testing:
@ -55,8 +64,13 @@ jobs:
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xdebug
- name: Check PHP Version
run: php -v
- name: Check Composer Version
run: php -m
- name: Check PHP Extensions
run: php -m
```