mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-09-09 14:24:06 +07:00
Add support for adding PHP extensions
This commit is contained in:
16
README.md
16
README.md
@ -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
|
||||
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user