Setup PHP environment
ActionsSetup a PHP environment and add it to the PATH, additionally providing proxy support
v4.1.0
LatestBy nanasess
Tags
(1)This action sets up a PHP environment for use in actions by:
- optionally installing a version of PHP and adding to PATH.
- registering problem matchers for error output
- 5.4(ubuntu-22.04 or ubuntu-20.04 only)
- 5.5(ubuntu-22.04 or ubuntu-20.04 only)
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1
- 8.2
- 8.3
Patch version can also be set. e.g. 7.2.11
- ubuntu-latest, ubuntu-24.04, ubuntu-22.04 or ubuntu-20.04
- windows-latest, windows-2022 or windows-2019
See action.yml
Basic:
steps:
- uses: actions/checkout@v3
- uses: nanasess/setup-php@v4
with:
php-version: '8.2'
- run: php my_script.php
Matrix Testing:
jobs:
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ ubuntu-latest, windows-latest ]
php: [ '5.6', '7.1', '7.2', '7.3', '7.4', '7.3.3' ]
name: PHP ${{ matrix.php }} sample
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: nanasess/setup-php@v4
with:
php-version: ${{ matrix.php }}
- run: php my_script.php
The scripts and documentation in this project are released under the MIT License
Contributions are welcome! See Contributor's Guide
Setup PHP environment is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.