setup-php v1.1.2 Release Notes

Release Date: 2019-09-08 // over 4 years ago
  • Setup PHP in GitHub Actions

    GitHub Actions statusLICENSE

    ๐Ÿ‘€ GitHub Action to install PHP with required extensions and composer. This action can be added as a step in your action workflow and it will setup the PHP environment you need to test your application. Refer to Usage section to see how to use this.

    ๐Ÿ‘ PHP Versions Support

    • 5.6
    • 7.0
    • 7.1
    • 7.2
    • 7.3

    ๐Ÿ‘ OS Support

    Virtual environment matrix.operating-system
    ๐Ÿ Windows Server 2019
    ๐Ÿ Windows Server 2016 R2
    โœ… Ubuntu 18.04
    Ubuntu 16.04 ubuntu-16.04
    ๐ŸŽ macOS X Mojave 10.14

    ๐Ÿ‘ PHP Extension Support

    • ๐Ÿ“ฆ On ubuntu 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 for inputs this action supports.

    Basic

    steps: - name: Checkoutuses: actions/checkout@master- name: Installing PHPuses: shivammathur/setup-php@masterwith: php-version: 7.3extension-csv: mbstring, xdebug- name: Check PHP Versionrun: php -v- name: Check Composer Versionrun: composer -V- name: Check PHP Extensionsrun: php -m
    

    โœ… Matrix Testing

    jobs: run: runs-on: ${{ matrix.operating-system }}strategy: max-parallel: 15matrix: operating-system: [ubuntu-latest, windows-latest, macOS-latest]php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3']name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}steps: - name: Checkoutuses: actions/checkout@master - name: Install PHPuses: shivammathur/setup-php@masterwith: php-version: ${{ matrix.php-versions }}extension-csv: mbstring, xdebug - name: Check PHP Versionrun: php -v - name: Check Composer Versionrun: composer -V - name: Check PHP Extensionsrun: php -m 
    

    License

    ๐Ÿ“š The scripts and documentation in this project are released under the MIT License

    Contributions

    ๐Ÿ‘€ Contributions are welcome! See Contributor's Guide

    This action uses the following works

    Further Reading