GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.

Overview

Setup PHP in GitHub Actions

Setup PHP in GitHub Actions

GitHub Actions status Codecov Code Coverage LICENSE PHP Versions Supported

setup-php reddit setup-php twitter setup-php status

Setup PHP with required extensions, php.ini configuration, code-coverage support and various tools like composer in GitHub Actions. This action gives you a cross platform interface to set up the PHP environment you need to test your application. Refer to Usage section and examples to see how to use this.

Contents

☁️ OS/Platform Support

Both GitHub-hosted and self-hosted runners are suppported by setup-php on the following OS/Platforms.

GitHub-Hosted Runners

Virtual environment YAML workflow label Pre-installed PHP
Ubuntu 18.04 ubuntu-18.04 PHP 7.1 to PHP 8.0
Ubuntu 20.04 ubuntu-latest or ubuntu-20.04 PHP 7.4 to PHP 8.0
Windows Server 2019 windows-latest or windows-2019 PHP 8.0
Windows Server 2022 windows-2022 PHP 8.0
macOS Catalina 10.15 macos-latest or macos-10.15 PHP 8.0
macOS Big Sur 11.x macos-11 PHP 8.0

Self-Hosted Runners

Host OS/Virtual environment YAML workflow label
Ubuntu 18.04 self-hosted or Linux
Ubuntu 20.04 self-hosted or Linux
Ubuntu 21.04 self-hosted or Linux
Debian 9 self-hosted or Linux
Debian 10 self-hosted or Linux
Debian 11 self-hosted or Linux
Windows 7 and newer self-hosted or Windows
Windows Server 2012 R2 and newer self-hosted or Windows
macOS Catalina 10.15 self-hosted or macOS
macOS Big Sur 11.x x86_64/arm64 self-hosted or macOS
  • Refer to the self-hosted setup to use the action on self-hosted runners.
  • Operating systems based on the above Ubuntu and Debian versions are also supported on a best effort basis.
  • If the requested PHP version is pre-installed, setup-php switches to it, otherwise it installs the PHP version.

🎉 PHP Support

On all supported OS/Platforms the following PHP versions are supported as per the runner.

  • PHP 5.3 to PHP 8.2 on GitHub-hosted runners.
  • PHP 5.6 to PHP 8.2 on self-hosted runners.
PHP Version Stability Release Support Runner Support
5.3 Stable End of life GitHub-hosted
5.4 Stable End of life GitHub-hosted
5.5 Stable End of life GitHub-hosted
5.6 Stable End of life GitHub-hosted, self-hosted
7.0 Stable End of life GitHub-hosted, self-hosted
7.1 Stable End of life GitHub-hosted, self-hosted
7.2 Stable End of life GitHub-hosted, self-hosted
7.3 Stable Security fixes only GitHub-hosted, self-hosted
7.4 Stable Active GitHub-hosted, self-hosted
8.0 Stable Active GitHub-hosted, self-hosted
8.1 Nightly In development GitHub-hosted, self-hosted
8.2 Nightly In development GitHub-hosted, self-hosted

Notes:

  • Specifying 8.1 and 8.2 in php-version input installs a nightly build of PHP 8.1.0-dev and PHP 8.2.0-dev respectively. See nightly build setup for more information.
  • To use JIT on PHP 8.0 and above, refer to the JIT configuration section.

PHP Extension Support

PHP extensions can be set up using the extensions input. It accepts a string in csv-format.

  • On Ubuntu, extensions which are available as a package, available on PECL or a git repository can be set up.
- name: Setup PHP with PECL extension
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    extensions: imagick, swoole
  • On Windows, extensions available on PECL which have the DLL binary can be set up.

  • On macOS, extensions available on PECL or a git repository can be set up.

  • On Ubuntu and macOS to compile and install an extension from a git repository follow this guide.

  • Extensions installed along with PHP if specified are enabled.

  • Specific versions of extensions available on PECL can be set up by suffixing the extension's name with the version. This is useful for installing old versions of extensions which support end of life PHP versions.

- name: Setup PHP with specific version of PECL extension
  uses: shivammathur/[email protected]
  with:
    php-version: '5.4'
    extensions: swoole-1.9.3
  • Pre-release versions extensions available on PECL can be set up by suffixing the extension's name with its state i.e alpha, beta, devel or snapshot.
- name: Setup PHP with pre-release PECL extension
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    extensions: xdebug-beta
  • Shared extensions can be disabled by prefixing them with a :. All extensions depending on the specified extension will also be disabled.
- name: Setup PHP and disable opcache
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    extensions: :opcache
  • 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. So, make sure you add the required extensions after none in the extensions input.

- name: Setup PHP without any shared extensions except mbstring
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    extensions: none, mbstring
  • Extension intl can be set up with specific ICU version for PHP 5.6 and above in Ubuntu workflows by suffixing intl with the ICU version. ICU 50.2 and newer versions are supported. Refer to ICU builds for the specific versions supported.
- name: Setup PHP with intl
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    extensions: intl-69.1
  • Extensions loaded by default after setup-php runs can be found on the wiki.

  • These extensions have custom support:

    • cubrid, pdo_cubrid and gearman on Ubuntu.
    • geos on Ubuntu and macOS.
    • blackfire, couchbase, ioncube, oci8, pdo_firebird, pdo_oci, pecl_http, phalcon3 and phalcon4 on all supported OS.
  • By default, extensions which cannot be added or disabled gracefully leave an error message in the logs, the action is not interrupted. To change this behaviour you can set fail-fast flag to true.

- name: Setup PHP with fail-fast
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    extensions: oci8
  env:
    fail-fast: true

🔧 Tools Support

These tools can be set up globally using the tools input. It accepts a string in csv-format.

behat, blackfire, blackfire-player, codeception, composer, composer-normalize, composer-prefetcher, composer-require-checker, composer-unused, cs2pr, deployer, flex, grpc_php_plugin, infection, parallel-lint, pecl, phan, phing, phinx, phive, php-config, php-cs-fixer, phpcbf, phpcpd, phpcs, phpdoc or phpDocumentor, phpize, phplint, phpmd, phpspec, phpstan, phpunit, phpunit-bridge, phpunit-polyfills, prestissimo, protoc, psalm, symfony or symfony-cli, vapor or vapor-cli, wp or wp-cli

- name: Setup PHP with tools
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    tools: php-cs-fixer, phpunit
  • In addition to above tools any composer tool or package can also be set up globally by specifying it as vendor/package matching the listing on Packagist. This format accepts the same version constraints as composer.
- name: Setup PHP with tools
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    tools: vimeo/psalm
  • To set up a particular version of a tool, specify it in the form tool:version.

    Version can be in the following format:

    • Semver. For example tool:1.2.3 or tool:1.2.3-beta1.
    • Major version. For example tool:1 or tool:1.x.
    • Major and minor version. For example tool:1.2 or tool:1.2.x.

    When you specify just the major version or the version in major.minor format, the latest patch version matching the input will be setup.

    Except for major versions of composer, For other tools when you specify only the major version or the version in major.minor format for any tool you can get rate limited by GitHub's API. To avoid this, it is recommended to provide a GitHub OAuth token. You can do that by setting COMPOSER_TOKEN environment variable.

- name: Setup PHP with tools
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    tools: php-cs-fixer:3, phpunit:8.5
  env:
    COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  • The latest stable version of composer is set up by default. You can set up the required composer version by specifying the major version v1 or v2, or the version in major.minor or semver format, Additionally for composer snapshot and preview can also be specified to set up the respective releases.
- name: Setup PHP with composer v2
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    tools: composer:v2
  • If you do not use composer in your workflow, you can specify tools: none to skip it.
- name: Setup PHP without composer
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    tools: none
  • Scripts phpize and php-config are set up with the same version as of the input PHP version.

  • The latest version of blackfire cli is set up when blackfire is specified in tools input. Please refer to the official documentation for using blackfire with GitHub Actions.

  • Tools prestissimo and composer-prefetcher will be skipped unless composer:v1 is also specified in tools input. It is recommended to drop prestissimo and use composer v2.

  • By default, tools which cannot be set up gracefully leave an error message in the logs, the action is not interrupted. To change this behaviour you can set fail-fast flag to true.

- name: Setup PHP with fail-fast
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    tools: deployer
  env:
    fail-fast: true

Notes

  • Input tools is useful to set up tools which you only use in GitHub Actions, thus keeping your composer.json tidy.
  • If you do not want to use all your dev-dependencies in GitHub Actions workflow, you can run composer with --no-dev and install required tools using tools input to speed up your workflow.
  • If you have a tool in your composer.json, do not set up it with tools input as the two instances of the tool might conflict.

📶 Coverage Support

Xdebug

Specify coverage: xdebug to use Xdebug and disable PCOV.
Runs on all PHP versions supported.

- name: Setup PHP with Xdebug
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    coverage: xdebug
  • The latest version of Xdebug compatible with the PHP version is set up by default.
  • If you need Xdebug 2.x on PHP 7.2, 7.3 or 7.4, you can specify coverage: xdebug2.
- name: Setup PHP with Xdebug 2.x
  uses: shivammathur/[email protected]
  with:
    php-version: '7.4'
    coverage: xdebug2

PCOV

Specify coverage: pcov to use PCOV and disable Xdebug.
Runs on PHP 7.1 and newer PHP versions.

  • If your source code directory is other than src, lib or, app, specify pcov.directory using the ini-values input.
- name: Setup PHP with PCOV
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    ini-values: pcov.directory=api #optional, see above for usage.
    coverage: pcov
  • PHPUnit 8.x and above supports PCOV out of the box.
  • If you are using PHPUnit 5.x, 6.x or 7.x, you need to set up pcov/clobber before executing your tests.
- name: Setup PCOV
  run: |
    composer require pcov/clobber
    vendor/bin/pcov clobber

Disable Coverage

Specify coverage: none to disable both Xdebug and PCOV.

Disable coverage for these reasons:

  • You are not generating coverage reports while testing.
  • It will disable Xdebug, which will have a positive impact on PHP performance.
  • You are using phpdbg for running your tests.
  • You are profiling your code using blackfire.
  • You are using PHP in JIT mode. Please refer to JIT configuration section for more details.
- name: Setup PHP with no coverage driver
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    coverage: none

📝 Usage

Inputs

Specify using with keyword

php-version (required)

  • Specify the PHP version you want to set up.
  • Accepts a string. For example '8.0'.
  • Accepts latest to set up the latest stable PHP version.
  • Accepts nightly to set up a nightly build from the master branch of PHP.
  • Accepts the format d.x, where d is the major version. For example 5.x, 7.x and 8.x.
  • See PHP support for supported PHP versions.

extensions (optional)

  • Specify the extensions you want to add or disable.
  • Accepts a string in csv-format. For example mbstring, :opcache.
  • Accepts none to disable all shared extensions.
  • Shared extensions prefixed with : are disabled.
  • See PHP extension support for more info.

ini-values (optional)

  • Specify the values you want to add to php.ini.
  • Accepts a string in csv-format. For example post_max_size=256M, max_execution_time=180.
  • Accepts ini values with commas if wrapped in quotes. For example xdebug.mode="develop,coverage".

coverage (optional)

  • Specify the code-coverage driver you want to set up.
  • Accepts xdebug, pcov or none.
  • See coverage support for more info.

tools (optional)

  • Specify the tools you want to set up.
  • Accepts a string in csv-format. For example: phpunit, phpcs
  • See tools Support for tools supported.

Outputs

php-version

To use outputs, give the setup-php step an id, you can use the same to get the outputs in a later step.

  • Provides the PHP version in semver format.
- name: Setup PHP
  id: setup-php
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'

- name: Print PHP version
  run: echo ${{ steps.setup-php.outputs.php-version }}

Flags

Specify using env keyword

fail-fast (optional)

  • Specify to mark the workflow as failed if an extension or tool fails to set up.
  • This changes the default mode from graceful warnings to fail-fast.
  • By default, it is set to false.
  • Accepts true and false.

phpts (optional)

  • Specify to set up thread-safe version of PHP on Windows.
  • Accepts ts and nts.
  • By default, it is set to nts.
  • See thread safe setup for more info.

update (optional)

  • Specify to update PHP on the runner to the latest patch version.
  • Accepts true and false.
  • By default, it is set to false.
  • See force update setup for more info.

See below for more info.

Basic Setup

Setup a particular PHP version.

steps:
- name: Setup PHP
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    extensions: mbstring, intl
    ini-values: post_max_size=256M, max_execution_time=180
    coverage: xdebug
    tools: php-cs-fixer, phpunit

Matrix Setup

Setup multiple PHP versions on multiple operating systems.

jobs:
  run:
    runs-on: ${{ matrix.operating-system }}
    strategy:
      matrix:
        operating-system: ['ubuntu-latest', 'windows-latest', 'macos-latest']
        php-versions: ['7.3', '7.4', '8.0']
        phpunit-versions: ['latest']
        include:
        - operating-system: 'ubuntu-latest'
          php-versions: '7.2'
          phpunit-versions: '8.5.21'
    steps:
    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: ${{ matrix.php-versions }}
        extensions: mbstring, intl
        ini-values: post_max_size=256M, max_execution_time=180
        coverage: xdebug
        tools: php-cs-fixer, phpunit:${{ matrix.phpunit-versions }}

Nightly Build Setup

Setup a nightly build of PHP 8.1 or PHP 8.2.

  • This version is currently in development.
  • Some user space extensions might not support this version currently.
steps:
- name: Setup nightly PHP
  uses: shivammathur/[email protected]
  with:
    php-version: '8.1'
    extensions: mbstring
    ini-values: post_max_size=256M, max_execution_time=180
    coverage: xdebug
    tools: php-cs-fixer, phpunit

Thread Safe Setup

Setup TS or NTS PHP on Windows.

  • NTS versions are set up by default.
  • On Ubuntu and macOS only NTS versions are supported.
  • On Windows both TS and NTS versions are supported.
jobs:
  run:
    runs-on: windows-latest
    name: Setup PHP TS on Windows
    steps:
    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: '8.0'
      env:
        phpts: ts # specify ts or nts

Force Update Setup

Update to the latest patch of PHP versions.

  • Pre-installed PHP versions on the GitHub Actions images are not updated to their latest patch release by default.
  • You can specify the update environment variable to true for updating to the latest release.
- name: Setup PHP with latest versions
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
  env:
    update: true # specify true or false

Verbose Setup

Debug your workflow

To debug any issues, you can use the verbose tag instead of v2.

- name: Setup PHP with logs
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'

Multi-Arch Setup

Setup PHP on multiple architecture on Ubuntu GitHub Runners.

  • PHP 5.6 to PHP 8.0 are supported by setup-php on multiple architecture on Ubuntu.
  • For this, you can use shivammathur/node images as containers. These have compatible Nodejs installed for JavaScript based GitHub Actions.
  • Currently, for ARM based setup, you will need self-hosted runners.
jobs:
  run:
    runs-on: ubuntu-latest
    container: shivammathur/node:latest-${{ matrix.arch }}
    strategy:
      matrix:
        arch: ["amd64", "i386"]
    steps:
      - name: Install PHP
        uses: shivammathur/[email protected]
        with:
          php-version: '8.0'

Self Hosted Setup

Setup PHP on a self-hosted runner.

  • To set up a containerised self-hosted runner, refer to the following guides as per your base operating system.

  • To set up the runner directly on the host OS or in a virtual machine, follow this requirements guide before setting up the self-hosted runner.

  • If your workflow uses service containers, then set up the runner on a Linux host or in a Linux virtual machine. GitHub Actions does not support nested virtualization on Linux, so services will not work in a dockerized container.

Specify the environment variable runner with the value self-hosted. Without this your workflow will fail.

jobs:
  run:
    runs-on: self-hosted
    strategy:
      matrix:
        php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
    name: PHP ${{ matrix.php-versions }}
    steps:
    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: ${{ matrix.php-versions }}
      env:
        runner: self-hosted # Specify the runner.

Notes

  • 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.
  • Avoid using the same labels for your self-hosted runners which are used by GitHub-hosted runners.

Local Testing Setup

Test your Ubuntu workflow locally using nektos/act.

jobs:
  run:
    runs-on: ubuntu-latest
    steps:
    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: '8.0'

Run the workflow locally with act using shivammathur/node docker images.

Choose the image tag which matches the runs-on property in your workflow. For example, if you are using ubuntu-20.04 in your workflow, run act -P ubuntu-20.04=shivammathur/node:20.04.

# For runs-on: ubuntu-latest
act -P ubuntu-latest=shivammathur/node:latest

# For runs-on: ubuntu-20.04
act -P ubuntu-20.04=shivammathur/node:2004

# For runs-on: ubuntu-18.04
act -P ubuntu-18.04=shivammathur/node:1804

JIT Configuration

Enable Just-in-time(JIT) on PHP 8.0 and above.

  • To enable JIT, enable opcache in cli mode by setting opcache.enable_cli=1.
  • JIT conflicts with Xdebug, PCOV, and other extensions which override zend_execute_ex function, so set coverage: none and disable any such extension if added.
  • By default, opcache.jit=1235 and opcache.jit_buffer_size=256M are set which can be changed using ini-values input.
  • For detailed information about JIT related directives refer to the official PHP documentation.

For example to enable JIT in tracing mode with buffer size of 64 MB.

- name: Setup PHP with JIT in tracing mode
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    coverage: none
    ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=64M

Cache Extensions

You can cache PHP extensions using shivammathur/cache-extensions and action/cache GitHub Actions. Extensions which take very long to set up when cached are available in the next workflow run and are enabled directly. This reduces the workflow execution time.
Refer to shivammathur/cache-extensions for details.

Cache Composer Dependencies

If your project uses composer, you can persist the composer's internal cache directory. Dependencies cached are loaded directly instead of downloading them while installation. The files cached are available across check-runs and will reduce the workflow execution time.

- name: Get composer cache directory
  id: composer-cache
  run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
  uses: actions/[email protected]
  with:
    path: ${{ steps.composer-cache.outputs.dir }}
    key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
    restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
  run: composer install --prefer-dist

Notes

  • 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.
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
  • If you support a range of composer dependencies and use prefer-lowest and prefer-stable options, you can store them in your matrix and add them to the keys.
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.prefer }}-
restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}-

Composer GitHub OAuth

If you have a number of workflows which set up multiple tools or have many composer dependencies, you might hit the GitHub's rate limit for composer. Also, if you specify only the major version or the version in major.minor format, you can hit the rate limit. To avoid this you can specify an OAuth token by setting COMPOSER_TOKEN environment variable. You can use GITHUB_TOKEN secret for this purpose.

- name: Setup PHP
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
  env:
    COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Inline PHP Scripts

If you have to run multiple lines of PHP code in your workflow, you can do that easily without saving it to a file.

Put the code in the run property of a step and specify the shell as php {0}.

- name: Setup PHP
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'

- name: Run PHP code
  shell: php {0}
  run: |
    
    $welcome = "Hello, world";
    echo $welcome;

Problem Matchers

Problem matchers are json configurations which identify errors and warnings in your logs and surface them prominently in the GitHub Actions UI by highlighting them and creating code annotations.

PHP

Setup problem matchers for your PHP output by adding this step after the setup-php step.

- name: Setup problem matchers for PHP
  run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

PHPUnit

Setup problem matchers for your PHPUnit output by adding this step after the setup-php step.

- name: Setup problem matchers for PHPUnit
  run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

PHPStan

PHPStan supports error reporting in GitHub Actions, so it does not require problem matchers.

- name: Setup PHP
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    tools: phpstan

- name: Run PHPStan
  run: phpstan analyse src

Psalm

Psalm supports error reporting in GitHub Actions with an output format github.

- name: Setup PHP
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    tools: psalm

- name: Run Psalm
  run: psalm --output-format=github

Tools with checkstyle support

For tools that support checkstyle reporting like phpstan, psalm, php-cs-fixer and phpcs you can use cs2pr to annotate your code.
For examples refer to cs2pr documentation.

Here is an example with phpcs.

- name: Setup PHP
  uses: shivammathur/[email protected]
  with:
    php-version: '8.0'
    tools: cs2pr, phpcs

- name: Run phpcs
  run: phpcs -q --report=checkstyle src | cs2pr

Examples

Examples of using setup-php with various PHP Frameworks and Packages.

Framework/Package Runs on Workflow
Blackfire macOS, ubuntu and windows blackfire.yml
Blackfire Player macOS, ubuntu and windows blackfire-player.yml
CakePHP with MySQL and Redis ubuntu cakephp-mysql.yml
CakePHP with PostgreSQL and Redis ubuntu cakephp-postgres.yml
CakePHP without services macOS, ubuntu and windows cakephp.yml
CodeIgniter macOS, ubuntu and windows codeigniter.yml
Laravel with MySQL and Redis ubuntu laravel-mysql.yml
Laravel with PostgreSQL and Redis ubuntu laravel-postgres.yml
Laravel without services macOS, ubuntu and windows laravel.yml
Lumen with MySQL and Redis ubuntu lumen-mysql.yml
Lumen with PostgreSQL and Redis ubuntu lumen-postgres.yml
Lumen without services macOS, ubuntu and windows lumen.yml
Phalcon with MySQL ubuntu phalcon-mysql.yml
Phalcon with PostgreSQL ubuntu phalcon-postgres.yml
Roots/bedrock ubuntu bedrock.yml
Roots/sage ubuntu sage.yml
Slim Framework macOS, ubuntu and windows slim-framework.yml
Symfony with MySQL ubuntu symfony-mysql.yml
Symfony with PostgreSQL ubuntu symfony-postgres.yml
Symfony without services macOS, ubuntu and windows symfony.yml
Yii2 Starter Kit with MySQL ubuntu yii2-mysql.yml
Yii2 Starter Kit with PostgreSQL ubuntu yii2-postgres.yml
Zend Framework macOS, ubuntu and windows zend-framework.yml

🔖 Versioning

  • Use the v2 tag as setup-php version. It is a rolling tag and is synced with the latest minor and patch releases. With v2 you automatically get the bug fixes, security patches, new features and support for latest PHP releases. For debugging any issues verbose tag can be used temporarily. It outputs all the logs and is also synced with the latest releases.
  • Semantic release versions can also be used. It is recommended to use dependabot with semantic versioning to keep the actions in your workflows up to date.
  • Commit SHA can also be used, but are not recommended. They have to be updated with every release manually, without which you will not get any bug fixes, security patches or new features.
  • It is highly discouraged to use the master branch as version, it might break your workflow after major releases as they have breaking changes.
  • If you are using the v1 tag or a 1.x.y version, you should switch to v2 as v1 only gets critical bug fixes. Maintenance support for v1 will be dropped with the last PHP 8.0 release.

📜 License

  • The scripts and documentation in this project are under the MIT License.
  • This project has multiple dependencies. Their licenses can be found in their respective repositories.
  • The logo for setup-php is a derivative work of php.net logo and is licensed under the CC BY-SA 4.0 License.

👍 Contributions

Contributions are welcome!

  • See Contributor's Guide before you start.
  • If you face any issues or want to suggest a feature/improvement, start a discussion here.

Contributors of setup-php and other related projects

Contributors of setup-php and related projects

💖 Support This Project

  • Please star the project and share it. If you blog, please share your experience of using this action.
  • Please sponsor setup-php using GitHub sponsors.
  • Please reach out if you have any questions about sponsoring setup-php.

Sponsor shivammathur

Corporate Sponsors

Corporate sponsors of setup-php and related projects

Individual Sponsors

Individual sponsors of setup-php and related projects

📦 Dependencies

📑 Further Reading

Issues
  • Could not install memcached-3.1.5 on PHP 7.4.15

    Could not install memcached-3.1.5 on PHP 7.4.15

    Describe the bug memcached fails installing since today.

    Version 2.10.0

    Runners

    • [x] GitHub Hosted
    • [ ] Self Hosted

    Operating systems Linux

    PHP versions 7.4

    To Reproduce

                -   name: Setup PHP
                    uses: shivammathur/[email protected]
                    with:
                        php-version: 7.4
                        tools: cs2pr
                        extensions: mbstring,bcmath,intl,gd,zip,memcached-3.1.5,redis-5.3.3,rdkafka-5.0.0
                    env:
                        fail-fast: true
    

    Expected behavior This suddenly broke today.

    Screenshots/Logs

    
    ==> Setup PHP
    ✓ PHP Switched to PHP 7.4.15
    
    ==> Setup Tools
    ✓ composer Added composer 2.0.11
    ✓ cs2pr Added cs2pr 1.4.0
    
    ==> Setup Extensions
    ✓ mbstring Enabled
    ✓ bcmath Enabled
    ✓ intl Enabled
    ✓ gd Enabled
    ✓ zip Enabled
    ✗ memcached Could not install memcached-3.1.5 on PHP 7.4.15
    
    bug 
    opened by ruudk 25
  • [NFR] Use Phalcon binary package/dll

    [NFR] Use Phalcon binary package/dll

    To speed up the action when using the Phalcon extension it would be great if there's an option to use the binary package on linux or precompiled dll's on Windows.

    Windows dll's can be found here. https://github.com/phalcon/cphalcon/releases/tag/v4.0.0

    Linux https://docs.phalcon.io/4.0/en/installation#linux

    enhancement 
    opened by ruudboon 18
  • The process 'pwsh' failed with exit code 1

    The process 'pwsh' failed with exit code 1

    Describe the bug

    Installation on Windows fails since today with the following error message: The checksum of the downloaded CA certificates is wrong!

    To reproduce

    on: push
    
    jobs:
        main:
            runs-on: windows-latest
            steps:
                - name: Setup PHP
                  uses: shivammathur/[email protected]
                  with:
                      php-version: 7.3
                      extension-csv: dom, filter, gd, hash, intl, json, pcre, pdo, zlib
                      coverage: none
    

    Log

    Run shivammathur/[email protected]
    pwsh C:\hostedtoolcache\windows\win32.ps1 -version 7.3 -dir d:\a\_actions\shivammathur\setup-php\master\dist
    
    ==> Setup PhpManager 
    √ PhpManager Installed 
    
    ==> Setup PHP and Composer 
    The checksum of the downloaded CA certificates is wrong!
    At C:\Users\runneradmin\Documents\PowerShell\Modules\PhpManager\1.19.2.231\private\Get-CACertFromCurl.ps1:35 char:13
    +             throw "The checksum of the downloaded CA certificates is  ...
    +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (The checksum of the\u2026tificates is wrong!:String) [], RuntimeException
    + FullyQualifiedErrorId : The checksum of the downloaded CA certificates is wrong!
    
    ##[error]The process 'pwsh' failed with exit code 1
    ##[error]Node run failed with exit code 1
    

    Additional information

    https://github.com/leofeyer/gha-test/commit/b9c59a05a74bf5bc1632b69eb87891094054d187/checks?check_suite_id=331319247

    bug 
    opened by leofeyer 12
  • Could not install imagick on PHP 7.4.21

    Could not install imagick on PHP 7.4.21

    Describe the bug

    Version

    • [ ] I have checked releases, and the bug exists in the latest patch version of v1 or v2.
    • [x] v2
    • [ ] v1

    Runners

    • [x] GitHub Hosted
    • [ ] Self Hosted

    Operating systems MacOS

    PHP versions 7.4

    To Reproduce

      build-and-test-macos:
        # To prevent build a particular commit use
        #     git commit -m "......... [ci skip]"
        if: "!contains(github.event.head_commit.message, 'ci skip')"
    
        needs: generate
        runs-on: ${{ matrix.operating-system }}
        env:
          extensions: mbstring, intl, json, yaml, apcu, imagick, gd, gettext, igbinary, redis
          HOMEBREW_NO_INSTALL_CLEANUP: 1
          ext_cache_key: v5.0.0-alpha.2-macOS
        strategy:
          fail-fast: false
          matrix:
            operating-system: [macos-latest]
            php-versions: ['7.4', '8.0']
    
        name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
        steps:
    
          - name: Checkout Code
            uses: actions/[email protected]
            with:
              fetch-depth: 1
    
          - name: Setup cache environment
            id: extcache
            uses: shivammathur/[email protected]
            with:
              php-version: ${{ matrix.php-versions }}
              extensions: ${{ env.extensions }}
              key: ${{ env.ext_cache_key }}
    
          - name: Cache extensions
            uses: actions/[email protected]
            with:
              path: ${{ steps.extcache.outputs.dir }}
              key: ${{ steps.extcache.outputs.key }}
              restore-keys: ${{ steps.extcache.outputs.key }}
    
    #      - name: Install Requirements for Imagick
    #        run: |
    #          export HOMEBREW_MAKE_JOBS="-j$(getconf _NPROCESSORS_ONLN)"
    #          brew install pkg-config [email protected]
    
          - name: Setup PHP
            uses: shivammathur/[email protected]
            with:
              php-version: ${{ matrix.php-versions }}
              ini-values: apc.enable_cli=on, session.save_path=/tmp
              extensions: ${{ env.extensions }}
    

    Expected behavior Installed imagick on PHP 7.4

    Screenshots/Logs https://github.com/phalcon/cphalcon/pull/15561/checks?check_run_id=2950380446#step:5:25

    Additional context

    Are you willing to submit a PR?

    bug 
    opened by Jeckerson 11
  • PHP 8 on Windows - inet_pton not found

    PHP 8 on Windows - inet_pton not found

    Describe the bug When running PHP 8.0 version on Windows, the inet_pton function is not found.

    • https://www.php.net/manual/en/function.inet-pton.php
    • https://github.com/phpstan/phpstan/blob/894c59fcf79df09aba631ac52230efbcd15048e0/.github/workflows/build.yml#L15-L50

    Version

    • [x] I have checked releases and the bug exists in the latest patch version of v1 or v2.
    • [x] v2
    • [ ] v1

    Runners

    • [x] GitHub Hosted
    • [ ] Self Hosted

    Operating systems

    Windows

    PHP versions

    8.0

    To Reproduce

    Run composer update with composer:snapshot on PHP 8.0 windows-latest

    Expected behavior

    Screenshots/Logs

    https://github.com/phpstan/phpstan-src/runs/992276871?check_suite_focus=true

    bug upstream-issue 
    opened by ondrejmirtes 11
  • Doesn't work on self host runner

    Doesn't work on self host runner

    I have two js/node projects and I migrated them successfully on self host runner.

    The php project refuses to work https://pastebin.com/raw/LvUPq9ym

    I allowed sudo for runner user without password, so the script can install the dependecies it needs. But in logs, after successfull php install, below it shows php not found (weird).

    All these github actions are new to me, I thought the migration to self hosted will take a few minutes (no config change) but it took all day and still not working.

    Is it possible to use this setup on self hosted or it works only on github cloud?

    My config https://pastebin.com/RKSG4e0w Dockerfile https://pastebin.com/EpZzDfvg

    enhancement 
    opened by oleg-brizy 11
  • PHP NTS support on Windows

    PHP NTS support on Windows

    Hello,

    Are there any plans to provide PHP Non-Thread Safe (NTS) support? Right now we can't create a full featured build matrix due to PHP Thread Safe (TS) limitation.

    Thank you

    enhancement 
    opened by sergeyklay 11
  • Support tools: none

    Support tools: none

    Describe the feature

    Please consider supporting tools: none when not even Composer is installed.

    Currently there is a message with "unknown tool". https://github.com/shivammathur/setup-php/blob/master/src/tools.ts#L536

    Thank you.

    enhancement 
    opened by szepeviktor 11
  • PHP Startup: Unable to load dynamic library 'gd.so'

    PHP Startup: Unable to load dynamic library 'gd.so'

    Describe the bug PHP GD and other plugins are not available

    Version

    • [x] I have checked releases, and the bug exists in the latest patch version of v1 or v2.
    • [x] v2
    • [x] v1

    Runners

    • [ ] GitHub Hosted
    • [x] Self Hosted

    Operating systems

    PHP versions 7.3, 7.4, 8.0

    To Reproduce actions.yml

    on: [push]
    
    jobs:
      main:
        runs-on: ubuntu-latest
        steps:
        - uses: actions/[email protected]
        - uses: shivammathur/[email protected]
          with:
            coverage: pcov
            php-version: '7.4'
            extension: dom, fileinfo, mbstring, gd
        - run: |
            composer install 
    
    
    

    Expected behavior To work

    Screenshots/Logs

    | PHP Warning:  PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib/php/20190902/gd.so (libX11.so.6: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/gd.so.so (/usr/lib/php/20190902/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    | PHP Warning:  PHP Startup: Unable to load dynamic library 'snmp.so' (tried: /usr/lib/php/20190902/snmp.so (libnetsnmp.so.35: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/snmp.so.so (/usr/lib/php/20190902/snmp.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    
    
    workflow-edit 
    opened by peter-mw 10
  • Add cs2pr support

    Add cs2pr support

    I recently published a tiny little script which allows to add github pull request annotations based on checkstyle formatted error reports.

    see e.g.

    image

    this is usefull in combination with phpstan, psalm, php-cs-fixer or any other tool which supports the checkstyle format.

    my tool is only usefull in github actions context and I guess will mostly be used in the php world.

    what do you think about bunling the script with this great setup-php github action? that way people could use the script very easily.

    what do you think?

    https://github.com/staabm/annotate-pull-request-from-checkstyle

    enhancement 
    opened by staabm 10
  • Add example workflows to test PHP extensions

    Add example workflows to test PHP extensions

    Add example workflows to test PHP extensions.

    The API to add extensions from the source can be used. Also, support for running make test can be added to the API using an environment variable flag which defaults to false.

    enhancement help wanted 
    opened by shivammathur 0
  • Add support for php-sdk and web-rmtools on Windows in tools input

    Add support for php-sdk and web-rmtools on Windows in tools input

    Currently while building PHP snaps for Windows in php-builder-windows each workflow installs php-sdk and web-rmtools. This can be handled by setup-php.

    enhancement 
    opened by shivammathur 4
  • Refactor: `extensions.ts` to use a config files

    Refactor: `extensions.ts` to use a config files

    Currently, extensions are hardcoded in extensions.ts which is not good. Similar to tools, extensions should use a config file where we can have an entry for each extension that is currently hardcoded. So the task is

    • [ ] Create a JSON schema for extensions config that incorporates all hard-coded logic.
    • [ ] Create the config and refactor extensions.ts to use that.
    • [ ] Make sure there is no BC break after refactor. All unit tests should pass.
    enhancement help wanted 
    opened by shivammathur 0
  • Refactor: Use parameterised testing using `jest.it.each`

    Refactor: Use parameterised testing using `jest.it.each`

    jest.it.each reduces the boilerplate test code and improves the readability and maintainability. Currently config, tools and coverage tests use jest.it.each. The same can be done for utils, extensions and install tests.

    Ref:

    • https://www.npmjs.com/package/jest-each
    • https://elfi-y.medium.com/reduce-boilerplate-test-code-with-jest-it-each-30a0eec9776d
    enhancement help wanted good first issue 
    opened by shivammathur 7
Releases(2.16.0)
  • 2.16.0(Nov 25, 2021)

    This release is possible because of our sponsors. So, if your company uses setup-php, please ask them to sponsor my work.

    Sponsor shivammathur


    • PHP 8.1 is now stable (8.1.0) and marked as the latest version. 🥳
    - name: Setup PHP 8.1
      uses: shivammathur/[email protected]
      with:
        php-version: latest
    
    • PHP 7.3 to PHP 8.1 packages have been updated to 7.3.33, 7.4.26, 8.0.13, and 8.1.0 respectively. Set the update environment variable to true for always updating to the latest patch version.
    - name: Setup PHP
      uses: shivammathur/[email protected]
      env:
        update: true
      with:
        php-version: '8.0'
    
    • PHP 5.6 to 7.2 have been rebuilt with patch for CVE-2021-21707 backported from PHP 7.3.33.

    • Add support for ICU-70.1 based intl extension for PHP 5.6 and above. https://github.com/shivammathur/icu-intl/pull/2

    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: 7.4
        extensions: intl-70.1
    
    • Add support for mailparse and xlswriter extensions on macOS using shivammathur/extensions tap.
    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: 7.4
        extensions: mailparse, xlswriter
    
    • Fix upgrading nightly versions on self-hosted runners. Now PHP 8.2 will update to the latest build when the update environment variable is set to true.
    • Fix support for brew extensions with different package and extension name.
    • Fix support for Imagick extension on Windows. https://github.com/shivammathur/setup-php/pull/528
    • Fix error while Blackfire configuration file is opened in tool's set up on Linux.
    • Fix extension support to install extension packages from ppa:ondrej/php in php-builder builds.
    • Fix dependency support in self-hosted macOS.
    • Fix to only copy problem-matchers configs to RUNNER_TOOL_CACHE.
    • Fix support for Phalcon extension.
    • Fix CA certificate issues on windows. #511, #517
    • Fix to suppress error when extensions are cached on Windows.
    • Log error when wrong Xdebug version is requested as coverage driver for a PHP version. https://github.com/shivammathur/setup-php/issues/519
    • Add patch to support self-hosted environments on Debian 12 or distributions based on it.
    • Add action to limit outbound requests to known endpoints in node workflow.
    • Add links for all tools in the README. https://github.com/shivammathur/setup-php/pull/518
    • Add workflow to publish to NPM and GitHub packages. #513
    • Use jest.each for extensions and install modules' tests. #514, #516,
    • Update Node.js dependencies.

    Thanks! @jrfnl, @jderusse, and @aneeshrelan for the contributions 🚀

    Follow for updates

    setup-php reddit setup-php twitter setup-php status

    Source code(tar.gz)
    Source code(zip)
  • 2.15.0(Sep 28, 2021)

    Setup PHP depends on sponsorships. Maintaining it takes time and money especially with daily builds for upcoming PHP versions. So, if you found it helpful, please support the project.

    Sponsor shivammathur


    • PHP 5.6 to 7.2 have been rebuilt with patch for CVE-2021-21706 backported from 7.3.31.

    • PHP 7.3 to PHP 8.0 packages have been updated to 7.3.31, 7.4.24 and 8.0.11 respectively. Set the update environment variable to true for always updating to the latest patch version.

    - name: Setup PHP
      uses: shivammathur/[email protected]
      env:
        update: true
      with:
        php-version: '8.0'
    
    • Add support for the following tools:

      • phpunit-polyfills #503
      • phpDocumentor or phpdoc #498
      • parallel-lint #500
    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: '8.0'
        tools: phpDocumentor, parallel-lint, phpunit-polyfills
    
    • Add support for expect and ssh2 extensions on macOS. https://github.com/shivammathur/homebrew-extensions/issues/1097
    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: '8.0'
        extensions: expect, ssh2
    
    • Fix parsing PHP 8.1 version with both RC and dev suffixes in the semver notation.

    • Fix to get correct php-src git ref for nightly builds.

    • Fix version for extensions in logs when installed using PECL.

    • Fix cache support for extensions with custom support. #496

    • Fix logs for extensions with custom support when cached.

    • Fix PPA setup to add/update list files in /var/lib/apt/lists. #492

    • Fix typo to use correct key for phpunit in tools.functionRecord. #501

    • Replace husky with simple-git-hooks.

    • Cleanup trailing whitespace in README.

    • Fix git command in format NPM script.

    • Update Node.js dependencies.


    Thanks @jrfnl for the contributions 🚀

    Follow for updates

    setup-php reddit setup-php twitter setup-php status

    Source code(tar.gz)
    Source code(zip)
  • 1.11.5(Sep 28, 2021)

    • Add support for expect and ssh2 extensions using shivammathur/extensions on macOS.
    • Fix version for extensions in logs when installed using PECL.
    • Replace husky with simple-git-hooks.
    • Update Node.js dependencies.
    Source code(tar.gz)
    Source code(zip)
  • 2.14.0(Sep 11, 2021)

    • Add support for PHP 8.2. #490, Docs
    • Specifying 8.2 in the php-version input will set up a nightly build of PHP 8.2.0-dev from the master branch of php/php-src.
    - name: Setup PHP 8.2
      uses: shivammathur/[email protected]
      with:
        php-version: '8.2'
    
    • Add support for the nightly alias for setting up a build from the master branch. #491, Docs
    • This will also set up PHP 8.2.0-dev from the master branch of php/php-src.
    - name: Setup PHP 8.2
      uses: shivammathur/[email protected]
      with:
        php-version: nightly
    
    • Add support to disable all shared extensions. #487 Docs
    • Specifying none in extensions input will now disable all shared extensions.
    • If none is specified along with other extensions then setup-php will first remove all shared extensions, and then process the other extensions in the input.
    • As part of this feature from now on, shared extensions will just be disabled, and not removed completely.

    ❤️ Thanks! @sebastianbergmann and @localheinz for sponsoring this feature.

    - name: Setup PHP without any shared extensions except mbstring
      uses: shivammathur/[email protected]
      with:
        php-version: 8.0
        extensions: none, mbstring
    
    • Fix disabling extensions to identify dependent extensions using the Reflection data and disable them as well. For example, disabling PDO will also disable pdo_mysql.

    • Fix warnings in Windows when the required directory is already present.

    • Fix to identify opcache if Zend OPcache is specified in extensions input.

    • Fix Windows script to install PHP 8.2 and future nightly builds correctly.

    • Fix to parse PHP 8.1 semver version.

    • Use shivammathur/extensions tap to install vips extension on macOS.


    Internal

    • Add test cases for ini-values containing special characters to config.test.ts to avoid regression.

    • Add bugs, directories, files and types properties in package.json.

    • Add an SVG with past and present individual sponsors to the README.

    • Use commit hash from the path in URL instead of the query string for nightly builds on macOS.

    • Fix build error in install.ts after TypeScript upgrade.

    • Minor refactor in install.test.ts.

    • Refactor config and coverage test files to use jest.each.

    • Update tsconfig to generate type declarations.

    • Update documentation in the README.

    • Update versions in SECURITY.md.

    • Update Node.js dependencies.

    Source code(tar.gz)
    Source code(zip)
  • 1.11.4(Sep 11, 2021)

    v1 maintenance release

    • Add Windows-2022 to the README.
    • Use PhpManager on Windows for all PHP versions supported on v1.
    • Fix unsupported PHP versions warning on v1.
    • Fix warnings in Windows when the required directory is already present.
    • Use shivammathur/extensions tap to install vips extension on macOS.
    • Add an SVG with past and present individual sponsors to the README.
    • Update tsconfig to generate type declarations.
    • Add bugs, directories, files and types properties in package.json.
    • Update SECURITY.md.
    • Update Node.js dependencies.
    Source code(tar.gz)
    Source code(zip)
  • 2.13.0(Aug 23, 2021)

    • Added support for Debian on self-hosted environments and containers.
    • Debian 9 and above are supported in addition to existing Ubuntu support.
    • Operating systems based on these versions of Debian are also supported on a best-effort basis.
    container: debian:bullseye
    steps:
      - name: Install PHP on Debian
        uses: shivammathur/[email protected]
        with:
          php-version: '8.0'
        env:
          runner: self-hosted
    
    • Added windows-2022 to the supported OS environments.
    runs-on: windows-2022
    steps:
      - name: Install PHP
        uses: shivammathur/[email protected]
        with:
          php-version: '8.0'
    
    • Added support for phpunit-bridge and updated symfony examples to install it using setup-php.
    - name: Setup PHP with Phive
      with:
        php-version: '8.0'
        tools: phpunit-bridge
    
    • Added documentation to run multi-line PHP code in workflows. #482
    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: '8.0'
    
    - name: Run PHP code
      shell: php {0}
      run: |
        <?php
        $welcome = "Hello, world";
        echo $welcome;
    
    • Added support for extensions mongodb and yaml on macOS using shivammathur/extensions tap.
    • Added a specific phive version compatible with PHP 7.2. #481
    - name: Setup PHP with Phive
      uses: shivammathur/[email protected]
      with:
        php-version: '7.2'
        tools: phive
    
    • Added --no-install-recommends to apt install commands on Linux.
    • Added support for JavaScript actions on shivammathur/node images. spc is no longer required for multi-arch workflows and normal GitHub Action syntax should work.
    container: shivammathur/node:latest-${{ matrix.arch }}
    strategy:
      matrix:
        arch: ["amd64", "i386"]
    steps:
      - name: Install PHP
        uses: shivammathur/[email protected]
        with:
          php-version: '8.0'
    
    • PHP 8.1 on Linux in shivammathur/php-builder is now built nightly with the same configuration and patches as official Debian builds of PHP.
    - name: Setup PHP 8.1
      uses: shivammathur/[email protected]
      with:
        php-version: '8.1'
    
    • Added a new flag NO_TOOLS_CACHE. The tool will be fetched from the source instead of any cache that setup-php implements when this is set to true.
    • This can be useful for maintainers to make sure a new version of their tool is used instead of the old cached version.
    • As of this release, only composer phars are cached.
    - name: Setup PHP
      uses: shivammathur/[email protected]
      env:
        NO_TOOLS_CACHE: true
      with:
        php-version: '8.0'
    
    • Removed support for Ubuntu 16.04. Please upgrade to Ubuntu 20.04 or Ubuntu 18.04 environments. #452
    • Removed support for Blackfire v1. Specifying blackfire in tools will now install the latest version of Blackfire CLI v2. #478
    - name: Setup PHP with Blackfire
      uses: shivammathur/[email protected]
      with:
        php-version: '8.0'
        tools: blackfire
    
    • Removed software-properties-common package from dependencies on self-hosted Linux. This package was used for adding third-party repositories(PPA). Removing this reduces self-hosted first run time from 2-3 minutes to 1-2 minutes.

    • PPAs can now be added by setup-php without any dependencies and the deprecated apt-key. It follows the Debian specification for third-party repositories.

    • Remove use of /etc/lsb-release file, /etc/os-release is used now as it has better support.

    • Fixed a bug where the status file was overwritten after PHP was set up on GitHub runners.

    • Fixed support for php-cs-fixer to parse releases.atom file and install correct latest version. #485

    - name: Setup PHP with php-cs-fixer
      uses: shivammathur/[email protected]
      with:
        php-version: '8.0'
        tools: php-cs-fixer
    
    • Fixed cache support for extensions on Windows which need additional libraries.
    • Fixed permissions in composer set up on self-hosted environments. #477
    • Fixed starting Blackfire service on Linux. #483
    • Fixed a warning about shallow clones for Homebrew taps on macOS.
    • Fixed a warning about macOS developer mode while using brew cat.
    • In tsconfig.json set lib to ES2020 and target to ES2019 for supporting Node 12 in self-hosted runners.
    • Update Node.js dependencies.

    Thanks! @jrfnl and @lolautruche for the contributions 🎉

    Source code(tar.gz)
    Source code(zip)
  • 1.11.3(Aug 23, 2021)

    v1 maintenance release

    • Added support for extensions mongodb and yaml on macOS using shivammathur/extensions tap.
    • Added --no-install-recommends to apt-get install commands on Linux.
    • Added a specific phive version compatible with PHP 7.2. #481
    • Removed support for Ubuntu 16.04 on setup-php. #452
    • Fixed permissions in composer set up on self-hosted environments. #477
    • Fixed a warning about shallow clones for Homebrew taps on macOS.
    • Fixed a warning about macOS developer mode while using brew cat.
    • Sync tsconfig.json with v2.
    • Update Node.js dependencies.
    Source code(tar.gz)
    Source code(zip)
  • 2.12.0(Jul 14, 2021)

    • Add support to specify major or major.minor versions for tools. Docs, #467
    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: '7.4'
        tools: php-cs-fixer:3, phpunit:8.5
      env:
        COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    
    • Add a php-version output which can be used in later steps. Docs, #470
    - name: Setup PHP
      id: setup-php
      uses: shivammathur/[email protected]
      with:
        php-version: '7.4'
    
    - name: Print PHP version
      run: echo ${{ steps.setup-php.outputs.php-version }}
    
    • Like Ubuntu, add PHP commit hash in PHP 8.1 (nightly) logs on Windows and macOS.
    • Use composer to install composer-require-checker. #473
    • Use shivammathur/extensions tap for rdkafka extension on macOS. shivammathur/homebrew-php#365
    • Support for Ubuntu 16.04 was dropped on August 1, 2021. 📢Announcement: #452
    • Set the Firebird client version to 3.0.7 on macOS.
    • Improve grpc_php_plugin support on Ubuntu and macOS.
    • Minor fixes for self-hosted setup on Ubuntu.
    • Improve PHP setup on macOS to be more resilient to dependency version inconsistencies.
    • Fix to enable extensions disabled with phpdismod on Ubuntu. actions/virtual-environments#3472
    • Fix Imagick setup with shivammathur/cache-extensions action on Windows. #455
    • Fix support for OCI extensions oci8 and pdo_oci. #449
    • Fix to not use system PHP on macOS.
    • Fix support for Imagick for PHP 5.3 to 5.5 on macOS.
    • Fix installing protoc on macOS.
    • Hotfix: Fix permissions of COMPOSER_HOME directory. #477
    • Hotfix: Fix support for phive on PHP 7.2. #481

    Internal

    • Update contributors SVG in README.md to include contributors from setup-php and all related projects.
    • Move tools set up details from tools.ts to tools.json config.
    • Improve error handling in utils.fetch and its uses.
    • Refactor tests for tools using jest.Each.
    • Update Ubuntu 16.04 warning in install.ts.
    • Set sourceMap to true in tsconfig.json.
    • Update Node.js dependencies.
    Source code(tar.gz)
    Source code(zip)
  • 1.11.2(Jul 14, 2021)

    v1 maintenance release

    • Fix replacing v prefix in tool versions.
    • Use shivammathur/extensions tap for rdkafka on macOS.
    • Update Ubuntu 16.04 warning in install.ts.
    • Update Node.js dependencies.
    Source code(tar.gz)
    Source code(zip)
  • 2.11.0(Apr 27, 2021)

    • Improve cache in shivammathur/php-ubuntu for PHP 5.6 to PHP 8.0. Using cache should reduce setup-php runtime on Ubuntu when the PHP version is not installed on the runner or update: true is set from 1-2 minutes to less than 5 seconds.

    • Add support to compile and install extensions from source from any git repository, from a sub-directory in a repository, with required libraries and configuration. Refer to this guide for more details and examples. #418, Closes #419

    • Add support to set up composer packages using tools input. Closes #442

    - name: Setup PHP with tools
      uses: shivammathur/[email protected]
      with:
        php-version: '7.4'
        tools: phpunit/phpunit
    
    • Add support to skip composer setup by specifying tools: none. Closes #446
    - name: Setup PHP with no tools using composer
      uses: shivammathur/[email protected]
      with:
        php-version: '7.4'
        tools: none
    
    • Add support for different ICU versions with PHP 8.1 on Ubuntu.
    - name: Setup PHP 8.1 with ICU 69.1
      uses: shivammathur/[email protected]
      with:
        php-version: '8.1'
        extensions: intl-69.1
    
    • Improve logs for compiling extensions from source. Now this process is verbose and the logs are grouped.
    • Improve extension support.
      • Add support for pdo_firebird.
      • Improve support for geos to compile on PHP 8.0 and 8.1.
      • Fix cubrid setup on Ubuntu 16.04.
      • Fix gearman support on Ubuntu.
      • Use GitHub releases for all couchbase versions.
      • Use shivammathur/extensions tap for apcu, phalcon, psr, memcache and memcached on macOS.
      • Fix phalcon3 on Windows.
      • Revert to ppa:ondrej/ppa for phalcon3 on Ubuntu.
      • Revert pcov patch for PHP 8 on Windows as the DLL is now available on PECL.
    • Add PHP commit hash in logs on PHP 8.1 (nightly) on Ubuntu. #433
    • Fix versions in logs of tools installed using composer.
    • Fix linking of old libraries on macOS.
    • Fix enabling cached extensions which have other extensions as dependencies. #428
    • Fix pecl setup to avoid unnecessary callbacks.
    • Fix blackfire extension version to 1.50.0 for PHP 5.6 and below.
    • Fix composer setup on self-hosted set up. #435
    • PHP 5.6 to PHP 7.2 on macOS are now built with backported security patches in shivammathur/php tap.

    Internal

    • Add fallback to Install-Module in Install-PSPackage in win32.ps1.
    • Add parameters to add_ppa function in linux.sh.
    • Do not lowercase source extension input.
    • Fix warning about ignored promise in install.ts.
    • Fix shellcheck warning in darwin.sh.
    • Refactor coverage setup.
    • Refactor regex in extension.ts.
    • Remove dotdeb support. PHP 5.4 and 5.5 are now built from source along with compatable extensions in shivammathur/php5-ubuntu.
    • Replace bintray with cdnjs as fallback to GitHub releases for fetching scripts.
    • Replace bintray in Windows script with GitHub Releases.
    • Replace bintray and use shivammathur/intl-icu GitHub releases.
    • Move patches from custom extension scripts to patches directory.
    • Switch from clover.xml to lcov.info for coverage. clover.xml has broken conditional coverage support.
    • Use add_extension_from_source for all custom supported extensions.
    • Move patches from custom extension scripts to patches directory.
    • Move add_pecl_extension to common.sh.
    • Improve switch_version in linux.sh to accept parameters.
    • Cleanup tsconfig.json.
    • Set moduleResolution to node in tsconfig.json.
    • Update year in license.
    • Update Node version to 15.x in Node workflow.
    • Update SECURITY.md.
    • Update Node.js dependencies.
    Source code(tar.gz)
    Source code(zip)
  • 1.11.1(Apr 27, 2021)

    v1 maintenance release

    • Add fallback to Install-Module in Install-PSPackage in win32.ps1.
    • Add parameters to add_ppa function in linux.sh.
    • Cleanup cleanup_lists in linux.sh.
    • Fix gearman support on Ubuntu.
    • Fix warning about ignored promise in install.ts.
    • Fix linking of old libraries on macOS.
    • Make sure global composer.json directory exists.
    • PHP 5.6 to PHP 7.2 on macOS are now built with backported security patches in shivammathur/php tap.
    • Revert pcov patch for PHP 8 on Windows as the DLL is now available on PECL.
    • Update Node version to 15.x.
    • Update SECURITY.md.
    • Switch from clover.xml to lcov.info for coverage. clover.xml has broken conditional coverage support.
    • Use packages from shivammathur/php-ubuntu for PHP setup and upgrades.
    • Use shivammathur/extensions for phalcon and psr.
    Source code(tar.gz)
    Source code(zip)
  • 2.10.0(Feb 23, 2021)

    • Add support to compile extensions from source. Docs (#399).
    - name: Setup PHP with mongodb compiled from source
      uses: shivammathur/[email protected]
      with:
        php-version: '7.4'  
        extensions: mongodb-mongodb/[email protected]
    
    • Add support to setup Xdebug 2.x on PHP 7.2 to PHP 7.4. Docs.
    name: Setup PHP with Xdebug 2.x
    uses: shivammathur/[email protected]
    with:
      php-version: '7.4'
      coverage: xdebug2
    
    • Add support for quoted CSV in ini-values to allow directives with commas (#392, #405).
    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: '8.0'
        ini-values: xdebug.mode="develop,coverage"
    
    • Add support to specify version in d.x notation. For example 5.x, 7.4 and 8.x (#395).
    - name: Setup PHP 7.4
      uses: shivammathur/[email protected]
      with:
        php-version: '7.x'
    
    • Add support for specifying ICU version for intl extension on PHP 8.0 (shivammathur/icu-intl#1).
    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: '8.0'
        extensions: intl-68.2
    
    • Add support for pdo_firebird for all configurations.
    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: '8.0'
        extensions: pdo_firebird
    
    • Add support for self-hosted runners on macOS ARM64 Docs.
    • Add support for blackfire on PHP 8.0.
    - name: Setup PHP with blackfire
      uses: shivammathur/[email protected]
      with:
        php-version: '8.0'
        extensions: blackfire
        tools: blackfire
    
    • Add support for pecl_http for all PHP versions on Ubuntu and macOS and PHP 7.1 to PHP 8.0 on Windows. (#396)
    - name: Setup PHP with pecl_http
      uses: shivammathur/[email protected]
      with:
        php-version: '8.0'
        extensions: pecl_http
    
    • Add support for aliases for symfony-cli, vapor-cli, and wp-cli. Docs
    • Add support for couchbase extension with PHP 5.3 to PHP 5.5 on Ubuntu and macOS.
    • Fail fast on failing to setup the requested PHP version (#368).
    • Fix Composer config syntax (#404).
    • Fix PHP 8 on macOS after update on images.
    • Fix PDO extensions setup on Ubuntu and macOS (#412).
    • Fix compiling extensions in self-hosted workflows (shivammathur/node-docker#5).
    • Fix tools setup on self-hosted runners.
    • Fix pcov on PHP 8.0 on Windows (#398).
    • Fix cache support for cubrid and pdo_cubrid.
    • Fix support for phalcon3 (#413).
    • Improve support for PHP extensions amqp, igbinary, imap, msgpack, propro, raphf, redis and zmq on macOS.
    • Improve support for phive. Now the correct version of phive for the PHP version should be setup (#366).
    • Improve fetching homebrew taps.
    • Improve PECL support. It is no longer required to specify pecl in tools input.
    • Improve regexes in extensions.ts.
    • Improve logs in Symfony examples (#377).
    • Set up Codeception using Composer.
    • Change Node.js version in the workflow.
    • Update Node.js dependencies.

    Thanks @dingo-d, @alcaeus, @smoqadam and @glensc for the contributions 🎉

    Source code(tar.gz)
    Source code(zip)
  • 1.11.0(Feb 23, 2021)

    v1 maintenance release

    • Add support to setup Xdebug 2.x on PHP 7.2 to PHP 7.4. Docs
    name: Setup PHP with Xdebug 2.x
    uses: shivammathur/[email protected]
    with:
      php-version: '7.4'
      coverage: xdebug2
    
    • Add support for quoted CSV in ini-values input to allow directives with commas.
    name: Setup PHP
    uses: shivammathur/[email protected]
    with:
      php-version: '7.4'
      ini-values: xdebug.mode="develop,coverage"
    
    • Add support to specify version in d.x notation. For example 5.x, 7.4 and 8.x.
    name: Setup PHP 7.4
    uses: shivammathur/[email protected]
    with:
      php-version: '7.x'
    
    • Fail fast on failing to setup the requested PHP version.
    • Fix Composer config syntax.
    • Fix PHP 8 on macOS.
    • Improve support for PHP extensions amqp, igbinary, imap, msgpack, pecl_http, propro, raphf, redis and zmq on macOS.
    • Improve support for phive.
    • Improve fetching homebrew taps.
    • Improve regexes in extensions.ts.
    • Improve PECL support. It is no longer required to specify pecl in tools input.
    • Set up Codeception using Composer.
    • Sync Symfony examples from v2.
    • Sync HOMEBREW parameters from v2.
    • Change Node.js version in the workflow.
    • Update Node.js dependencies.
    Source code(tar.gz)
    Source code(zip)
  • 2.9.0(Nov 26, 2020)

    • PHP 8.0 is now stable PHP 8.0.0 on setup-php for all supported OS. 🥳
    • Add new JIT configuration section to the README.

    For example, to enable JIT on PHP 8.0.

    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: '8.0'
        ini-values: opcache.enable_cli=1
    

    Refer to JIT Configuration for more details.

    • Skip prestissimo and composer-prefetcher unless composer:v1 is specified.

    For example to setup prestissimo, use

    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: '8.0'
        tools: composer:v1, prestissimo
    
    • Set Xdebug version to 2.9.8 on PHP 7.2. #345
    • Set xdebug.mode=coverage ini directive always #346
    • Sync dependencies from shivammathur/extensions tap in add_brew_extension.
    • Fix fail-fast on Windows.
    • Fix deleting extensions when one extension is a substring of the other. For example pdo_sqlsrv and sqlsrv.
    • Fix fetching extension version from PECL on macOS.
    • Fix fetching grpc latest tag. (grpc/grpc.io#79)
    • Prioritize Bintray over GitHub releases for fetching scripts.
    • Refactor darwin.sh script.
    • Change project description in actions.yml.
    • Bump version to 2.9.0

    Thanks @owenvoke for the contribution 🎉

    Source code(tar.gz)
    Source code(zip)
  • 1.10.1(Nov 26, 2020)

    v1 maintenance release

    • PHP 8 is stable PHP 8.0.0 now on setup-php.
    • Add JIT configuration section to the README. Refer to JIT Configuration.
    • Sync dependencies from shivammathur/extensions tap in add_brew_extension.
    • Fix Xdebug setup.
    • Fix tool setup on Windows.
    • Fix shellcheck warning in add_tool.
    • Fix deleting extensions when one extension is a substring of the other.
    • Fix fetching extension version from PECL on macOS.
    • Refactor darwin.sh script.
    • Change project description in actions.yml.
    Source code(tar.gz)
    Source code(zip)
  • 2.8.0(Nov 20, 2020)

    • Add support to setup a specific Composer version. For example to setup Composer 2.0.6.
    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: '7.4'
        tools: composer:2.0.6
    
    • Add support for couchbase extension for PHP 5.6 to PHP 7.4.
    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: '7.4'
        extensions: couchbase
    
    • Set blackfire-player to v1.9.3 for PHP 5.5 to PHP 7.0.
    • Set composer version to v1 when prestissimo or composer-prefetcher is specified in tools. It is recommended to stop using prestissimo as Composer 2 is faster on its own.
    • Document using setup-php on i386 and amd64 containers using spc. Docs. Closes #326.
    • Add workflow to document extensions that are enabled by default on wiki. (#327)
    • Fix tools setup when latest release does not have the tool in release assets. Will now fetch tool from the previous release till it is added to the latest release.
    • Improve regex for pre-release PECL extensions. (#325)
    • Install VcRedist from GitHub on Windows.
    • Update PHP dependencies as per GitHub Action runner version on macOS.
    • Fix grpc_php_plugin setup. Now uses Xcode 11.7 as compiling it with Xcode 12 is flaky.
    • Fix extension setup on PHP 8.0 and PHP 8.1 and for all PHP versions on self-hosted Linux.
    • Fix composer setup when it is a dependency of a tool.
    • Revert back to apt-fast as after 1.9.10 release it reports correct exit codes.
    • Revert back to using dashes in step-ids as issue parsing them is fixed upstream (nektos/act#287).
    • Use GitHub releases(s3) as primary source for builds and scripts with bintray only as fallback. This will scale setup-php better and avoid bintray's 2TB/month download limit.
    • Refactor and dry linux.sh and darwin.sh.
    • Fix contribution docs.

    Thanks @GrahamCampbell and @mlocati for the contributions 🎉

    Source code(tar.gz)
    Source code(zip)
  • 1.10.0(Nov 17, 2020)

    v1 maintenance release

    • Allow installing a specific Composer version.
    • Fix tools setup when latest release does not have the tool in release assets. Will now fetch tool from the previous release till it is added to the latest release.
    • Improve regex for pre-release PECL extensions.
    • Install VcRedist from GitHub on Windows.
    • Set composer version to v1 when prestissimo or composer-prefetcher is specified in tools. It is recommended to stop using prestissimo as Composer 2 is faster on its own.
    • Update PHP dependencies as per GitHub Action runner version on macOS.
    • Fix extension setup on PHP 8.0.
    • Fix composer setup when it is a dependency of a tool.
    • Revert back to apt-fast as it now reports correct exit codes.
    • Revert back to using dashes in step-ids as issue parsing them is fixed upstream on nektos/act.
    Source code(tar.gz)
    Source code(zip)
  • 2.7.0(Oct 31, 2020)

    • Add support for PHP 8.1.0-dev. Specify php-version: 8.1 to setup. docs. Closes #303
    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: '8.1'
    
    • Add support for macOS Big Sur macos-11.0. docs
    runs-on: macos-11.0
    
    • Add support for fail-fast flag. It will mark the workflow as failed if an extension or tool fails to install. Closes #306
    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: '7,4'
        tools: deployer
      env:
        fail-fast: true
    
    • Add support for igbinary and imagick for PHP 5.6 and newer on macOS using shivammathur/homebrew-extensions.
    • Fix setup for extensions ast, phalcon4, pdo_oci and oci8 after october update in ppa:ondrej/php.
    • Fix problem matchers setup when action is called more than once in the same workflow.
    • Switch to apt-get till apt-fast is updated to 1.9.10 on the runner.
    • Fetch PhpManager from release assets.
    • Remove patch for RLIMIT_CORE bug in sudo, fixed upstream.
    • Minor fixes for typos in scripts.
    • Update README.

    Thanks @mlocati for the contribution 🎉

    Source code(tar.gz)
    Source code(zip)
  • 1.9.8(Oct 23, 2020)

    • Add support for igbinary and imagick for PHP 5.6 and newer on macOS using shivammathur/homebrew-extensions.
    • Fix matchers setup when action is called twice.
    • Perform only one URL call to download latest PhpManager.zip asset.
    • Switch to apt-get till apt-fast is updated to 1.9.10 on the runner.
    • Add warnings to v1 to switch to v2.
    • Fix phalcon4 setup after october update in ppa:ondrej/php.
    • Minor fixes in scripts.
    • Update Node.js dependencies
    Source code(tar.gz)
    Source code(zip)
  • 2.6.0(Oct 18, 2020)

    • Setup PHP now has discussions feature. So if you need any help with your workflows, want to suggest features or share anything in general related to PHP, please use setup-php discussions.
    • Add support for behat and phpspec. (Docs)
    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: '7.4'
        tools: behat, phpspec
    
    • Add version of tools in logs. Closes #288
    • Add alias latest for current stable php version. (Docs). Closes #293
    - name: Setup PHP with phing
      uses: shivammathur/[email protected]
      with:
        php-version: latest
    
    • Switch to environment files to edit PATH and other environment variables. Apply GHSA-mfwh-5m23-j46w (CVE-2020-15228)
    • Prioritize with over env for inputs. Fixes #295
    • Document PHPStan and Psalm support for GitHub Actions in README. (Docs). Related #292
    • Move problem matchers setup to scripts.
    • Refactor install.ts and install.test.ts.
    • Replace codecov badge with one from shields.io.
    • Hyperlink support URL in the logs.
    • Fix dependency mess in phalcon4 setup on Ubuntu after October update in ppa:ondrej/php.
    • Fix some typos and warnings in bash scripts.
    • Overwrite php_oci8.dll for PHP 8 on Windows to fix error when extensions are cached.
    • Update Node.js dependencies.
    • Bump version to 2.6.0.

    Thanks @szepeviktor for the contributions 🎉

    Source code(tar.gz)
    Source code(zip)
  • 1.9.7(Oct 12, 2020)

    • Switch to environment files to edit PATH and other environment variables. Apply GHSA-mfwh-5m23-j46w (CVE-2020-15228)
    • Prioritize with over env for inputs.
    • Document PHPStan and Psalm support for GitHub Actions in README.
    • Move problem matchers setup to scripts.
    • Hyperlink support URL in the logs.
    • Fix dependency mess in phalcon4 setup on Ubuntu after October update in ppa:ondrej/php.
    • Fix some typos and warnings in bash scripts.
    • Update Node.js dependencies.
    Source code(tar.gz)
    Source code(zip)
  • 2.5.0(Oct 4, 2020)

    • Add support for phing. Closes #275
    - name: Setup PHP with phing
      uses: shivammathur/[email protected]
      with:
        php-version: '7.4'
        tools: phing
    
    • Add support to install intl extension with different ICU versions for PHP 5.6 to PHP 7.4 on Ubuntu. ICU 50.2 and newer versions are supported. Refer to ICU builds for the specific versions supported. Closes #282.
    - name: Setup PHP with intl and ICU 67.1
      uses: shivammathur/[email protected]
      with:
        php-version: '7.4'
        extensions: intl-67.1
    
    • Add printf to PATH if not found in Windows.
    • Add status page badge in README.
    • Revert to Powershell PhpManager to install PHP 8 on Windows. (Ref: mlocati/powershell-phpmanager#62).
    • Switch from tags to releases and use release assets to get Powershell PhpManager.
    • Fix regex in protoc.sh.
    • Fix installing extensions from Dotdeb PPA for PHP 5.4 and PHP 5.5. Ref: #281.
    • Fix removing extensions for Ubuntu self-hosted runners.
    • Replace fedora references with a valid platform name to validate against process.platform.
    • Refactor tools.ts and win32.ps1.
    • Bump Typescript version to 4.0.1.

    Thanks @mlocati for the contributions 🎉

    Source code(tar.gz)
    Source code(zip)
  • 1.9.6(Sep 7, 2020)

    • Add printf to PATH if not found in Windows.
    • Revert to Powershell PhpManager to install PHP 8 on Windows.
    • Switch from tags to releases and use release assets to get Powershell PhpManager.
    • Replace fedora references with a valid platform name to validate against process.platform.
    • Refactor tools.ts.
    • Bump version to 1.9.6.
    Source code(tar.gz)
    Source code(zip)
  • 2.4.3(Aug 21, 2020)

    • Fix removing extensions on Ubuntu self-hosted runners. Fixes #271
    • Fix fallback for fetching composer.
    • Remove old PHPUnit on Ubuntu runners.
    • Switch to fixed getcomposer.org links.
    • Add twitter badge to the README.
    Source code(tar.gz)
    Source code(zip)
  • 1.9.5(Aug 18, 2020)

  • 2.4.2(Aug 10, 2020)

    • Add support for cubrid and pdo_cubrid on Ubuntu. Closes #267
    • Add support for oci8 and pdo_oci extensions in PHP 8 on Windows.
    • Use cached composer builds.
    • Fix permissions in protoc setup.
    • Change cURL parameters.
    • Dry custom tools and extension code.
    • Update README.
    Source code(tar.gz)
    Source code(zip)
  • 2.4.1(Aug 8, 2020)

    • Resume nightly PHP 8 builds on Windows from shivammathur/php-builder-windows. Fixes #261
    • Add support for protoc and grpc_php_plugin tools. Closes #262
    • Improve PHP installation speed using cached packages.
    • Revert to default packagist mirror for old PHP.
    • Use cached composer builds from shivammathur/composer-cache.
    • Use blackfire API to get versions.
    • Accept PECL default parameters.
    • Improve cURL use.
    • Limit swoole support to PHP 7.4.
    • Dry extension and tools code with custom support.
    • Fail fast PCOV on unsupported PHP versions.
    • Remove update_extension from linux.sh.
    • Remove obsolete pcov.sh.
    • Fix warning in cleanup_lists on ubuntu-20.04.
    • Fix updating lists in phalcon setup on Ubuntu.
    • Fix coverage message in node workflow.
    • Bump supported version in SECURITY.md.
    Source code(tar.gz)
    Source code(zip)
  • 1.9.4(Aug 10, 2020)

    v1 maintenance release

    • Resume nightly PHP 8 builds on Windows from shivammathur/php-builder-windows.
    • Revert to default packagist mirror for old PHP.
    • Accept PECL default parameters.
    • Limit swoole support to PHP 7.4.
    • Remove update_extension from linux.sh.
    • Remove obsolete pcov.sh.
    • Bump supported version in SECURITY.md.
    Source code(tar.gz)
    Source code(zip)
  • 2.4.0(Jul 21, 2020)

    • Add support for these tools. Specify in tools input to setup. Closes #250
      • composer-require-checker
      • composer-normalize
      • composer-unused.
    • Add support for these PHP extensions. Specify in extensions input to setup.
      • oci8 and pdo_oci Closes #241
      • ioncube Closes #243
    • Improve composer setup. #239
      • Setup different versions of composer directly.
      • Add a breaking check to verify composer.phar integrity.
    • Fix blackfire configuration on Ubuntu and macOS. Fixes #247 and fixes #248
    • Disable memory_limit on all configurations. Fixes #251
    • Show adding xdebug.mode=coverage for Xdebug 3 to php.ini in logs.
    • Add values to php.ini after coverage setup.
    • Improve setup on Ubuntu when PHP versions are installed.
      • Only install CLI SAPI from ppa:ondrej/php.
      • Only update ppa:ondrej/php and Ubuntu archives package lists.
    • Patch OpenSSL binaries after PHP 5.3 and PHP 5.4 setup on Windows .
    • Improve support for pre-release extensions.
    • Fix warning while installing PDO extensions on PHP 5.6 and PHP 7.0 on Ubuntu.
    • Remove src/configs/config.yaml as it is no longer used.
    • Fix order of tools in README.
    • Update README with licensing information about setup-php logo.
    • Add information about setup-php being part of Tidelift Subscription in README.
    • Improve getXdebugVersion in extension.ts.
    • Fix typo in tools.test.ts.
    • Sort tools in switch case in tools.ts and in tools.test.ts.
    • Update dependencies including lodash to apply advisory GHSA-p6mc-m468-83gw.
    • Bump cache key in main test workflow.

    Thanks @GrahamCampbell, @localheinz and @lolautruche for the contributions 🚀

    Source code(tar.gz)
    Source code(zip)
  • 1.9.3(Jul 21, 2020)

    v1 maintenance release

    • Improve composer setup.
    • Disable memory_limit on Windows and macOS.
    • Improve getXdebugVersion in extension.ts.
    • Improve setup on Ubuntu when PHP versions are installed.
      • Only install CLI SAPI from ppa:ondrej/php.
      • Only update ppa:ondrej/php and Ubuntu archives package lists.
    • Improve support for pre-release extensions.
    • Remove src/configs/config.yaml as it is no longer used.
    • Update README.
    • Fix typo in tools.test.ts.
    • Update dependencies including lodash to apply advisory GHSA-p6mc-m468-83gw.
    Source code(tar.gz)
    Source code(zip)
Owner
Shivam Mathur
Creator of @setup-php
Shivam Mathur
This is a collection of tutorials for learning how to use Docker with various tools. Contributions welcome.

Docker Tutorials and Labs At this time we are not actively adding labs to this repository. Our focus is on training.play-with-docker.com where new lab

Docker 10.4k Nov 16, 2021
Run your WP site on github pages, php innovation award winner https://www.phpclasses.org/package/12091-PHP-Make-a-WordPress-site-run-on-GitHub-pages.html

Gitpress Run wordpress directly on github pages Gitpress won the innovation award for may 2021 Read more about this https://naveen17797.github.io/gitp

naveen 9 Oct 9, 2021
JSON schema models and generated code to validate and handle various data in PocketMine-MP

DataModels JSON schema models and generated code to validate and handle various data in PocketMine-MP This library uses php-json-schema-model-generato

PMMP 1 Nov 17, 2021
Q2A plugin that allows users to import and export Q2A configuration

Configuration Manager [by Gabriel Zanetti] Description Configuration Manager is a Question2Answer plugin that allows users to import and export Q2A co

Gabriel Zanetti 1 Nov 22, 2021
A PHP library to convert text to speech using various services

speaker A PHP library to convert text to speech using various services

Craig Duncan 91 Nov 22, 2021
Zephir is a compiled high level language aimed to the creation of C-extensions for PHP.

Zephir - is a high level programming language that eases the creation and maintainability of extensions for PHP. Zephir extensions are exported to C c

Zephir Language 3.1k Nov 26, 2021
It's goal is to create my own platform where I can play various board games I like.

Card games The goal of this project is to create a social platform where players can communicate, create lobbies and play various board games. Current

Ondřej Mastík 2 Oct 29, 2021
Learning design patterns by implementing them in various programming languages.

design-patterns Learning design patterns by implementing them in various programming languages. Creational design patterns Creational design patterns

Paweł Tryfon 1 Nov 20, 2021
A story about SQLinject and a demonstration of some vulnerabilities and tools

Предысловие Если не умру,буду дальше развивать эту тему Идея которая пришла мне в голову,<<А почему бы не рассказать об уязвимостях SQL?>>.Поэтому я б

null 1 Nov 12, 2021
Add custom armors, tools and many items!

CustomThings This plugin was created for the new version of Hiroshima and allows you to add tools, armors and items! Informations Here are the differe

null 13 Oct 16, 2021
A curated list of awesome Laravel bookmarks, packages, tools, articles, tutorials and related resources.

ATTENTION: This list is obsolete and discontinued. Please find a much more comprehensive, much more well-maintained awesome-laravel list at chiraggude

Unnawut Leepaisalsuwanna 97 Nov 7, 2021
PHP package to make your objects strict and throw exception when you try to access or set some undefined property in your objects.

?? Yell PHP package to make your objects strict and throw exception when you try to access or set some undefined property in your objects. Requirement

Zeeshan Ahmad 20 Dec 8, 2018
A set of classes to create and manipulate HTML objects abstractions

HTMLObject HTMLObject is a set of classes to create and manipulate HTML objects abstractions. Static calls to the classes echo Element::p('text')->cla

Emma Fabre 129 Nov 6, 2021
The swiss army knife for Magento developers, sysadmins and devops. The tool provides a huge set of well tested command line commands which save hours of work time. All commands are extendable by a module API.

netz98 magerun CLI tools for Magento 2 The n98 magerun cli tools provides some handy tools to work with Magento from command line. Build Status Latest

netz98 678 Nov 17, 2021
Bug bounty tools built in PHP to help penetration tester doing the job

BugBountyTools-PHP Bug bounty tools built in PHP to help penetration tester doing the job Website who using this script: KitaBantu Soon! 403 Bypasser

Muhammad Daffa 6 Oct 21, 2021
A set of utilities for working with vk api!

vk-utils Документация на русском языке Installation composer require labile/vk-utils How to use it? Simple example use Astaroth\VkUtils\Client; $api

null 1 Nov 5, 2021
⚙️ A WordPress plugin to set WordPress options from a .env file.

dotenv A WordPress plugin to set WordPress options from a .env file. Any WPENV_ prefixed variables in the .env will be used to override the WordPress

Brad Parbs 12 Oct 6, 2021
CrateKeyShopGUI Pocketmine-MP plugin which can be set in Config.yml file

CrateKeyShopGUI CrateKeyShopGUI Pocketmine-MP plugin which can be set in Config.yml file Depend FormAPI EconomyAPI PiggyCrate InvCrashFix Download Dow

null 4 Nov 6, 2021
[READ-ONLY] CakePHP Utility classes such as Inflector, Text, Hash, Security and Xml. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp

CakePHP Utility Classes This library provides a range of utility classes that are used throughout the CakePHP framework What's in the toolbox? Hash A

CakePHP 111 Oct 2, 2021