Skip to content

Releases: shivammathur/setup-php

2.18.0

22 Mar 14:37
36d7068
Compare
Choose a tag to compare

Support Ukraine

#StandWithUkraine


  • Added support for installing libraries and custom configure options for PECL extensions. #575. Docs.

  • Added support for blackfire extension on PHP 8.1 on Windows.

  • Improved support for http extension on Windows and self-hosted environments.

  • Fixed installing php-dev package on self-hosted environments when missing. #569

  • Fixed linking pecl ini file on self-hosted environments. #569

  • Fixed copying extensions when installed using brew from its Cellar to extension directory on macOS.

  • Fixed generating extension dependency map.

  • Fixed a bug in log functions on Linux and macOS by using local variables.

  • Improved switching versions on Linux. #572

  • Improved enabling default extensions by reducing PHP calls.

  • Bumped actions/checkout, actions/upload-artifact, actions/download-artifact and actions/cache version in examples and workflows to v3. #571, #577

  • Added PECL customization guide to README.

  • Updated Node.js dependencies.


Thanks! @jrfnl for the contributions 🚀

Follow for updates

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

1.11.7

09 Apr 21:39
28c92ba
Compare
Choose a tag to compare

v1 maintenance release

  • Added support for mcrypt extension using shivammathur/extensions tap on macOS.
  • Fixed Composer setup for changes since Composer 2.3.
  • Fixed patching brew for overwriting existing linked libraries
  • Refactored updating dependencies on macOS.
  • Updated Node.js dependencies.
  • Updated docs for supported GitHub Hosted environments.

2.17.1

01 Mar 15:30
b75c104
Compare
Choose a tag to compare

This release is possible because of our sponsors ❤️.

Help setup-php reach its sponsorship goals.

Sponsor shivammathur


  • Added support for OpenSSL config on Windows. #564
    Now setup-php will set the environment variable OPENSSL_CONF pointing to a valid openssl.cnf file on Windows.

  • Added GitHub releases fallback URL for phing.

  • Updated version of sqlsrv and pdo_sqlsrv extensions to 5.10.0 for PHP 7.4 and above.

  • Fixed logs for symfony-cli on failure. #568

  • Fixed setting an environment variable on Windows in self-hosted environments.

  • Fixed a bug in adding a directory to PATH. #562

  • Fixed a minor UUOC shellcheck warning in add_tools.sh.

  • Updated Node.js dependencies.


Thanks! @mlocati for adding Set-OpenSSLConf 🚀

Follow for updates

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

2.17.0

08 Feb 12:59
7854a0c
Compare
Choose a tag to compare

This release is possible because of our sponsors ❤️.

Help setup-php reach its sponsorship goals.

Sponsor shivammathur


  • Added ini-file input to specify the base php.ini file. Accepts production, development or none. Docs (#450, #469)

By default the production php.ini is used, you can change it to the development one, or remove it using none.

- name: Setup PHP
  with:
    php-version: '8.1'
    ini-file: development
- name: Setup PHP
  with:
    php-version: '8.1'
    tools: symfony-cli
- name: Setup PHP
  with:
    php-version: '8.1'
    tools: churn
  • Added support for blackfire extension on PHP 8.1.
- name: Setup PHP
  with:
    php-version: '8.1'
    extensions: blackfire
  • Tools pecl, phpize and php-config are now installed by default on Linux. Specifying these in tools input is no longer required.

  • The environment variable COMPOSER_NO_INTERACTION is now set to 1 by default, so using --no-interaction in composer commands is not required. (#547)

  • The environment is now considered self-hosted unless the GitHub hosted environment is detected. This should prevent broken PHP installs in self-hosted environments when the runner environment variable is not specified. (#554)

  • Added support to enable disabled extensions when required by tools. For this extensions are now processed before tools.

  • Added support to enable xml extension before installing other extensions using pecl. (#553)

  • Speed improvements

    • Reduced the initial I/O in script creation.
    • Reduced the number of PHP calls and it now uses php-config instead.
    • Reduced number of brew calls on macOS setup.
    • Windows builds for all PHP versions are now fetched from shivammathur/php-builder-windows releases as a faster cache with windows.php.net as a fallback.
    • SSL libraries for PHP 5.3 to 5.5 on Windows are now fetched in parallel.
    • PHP builds for PHP 5.3 to 5.5 should now use cached macports builds from shivammathur/php5-darwin.
  • Added support for installing tools using composer in different scopes. This allows installing two tools with different versions of a common dependency. (#549)

  • Added support to fail immediately when composer setup fails. (#548)

  • Added support to parse PECL extension versions when wrongly hyphenated. (#536)

  • Added support for composer phars from shivammathur/composer-cache with PHP version as now different PHP versions can have different composer versions for a release type.

  • Added setup-php.com as a fallback in addition to jsdeliver.com for script sources.

  • Fixed support for fallback sources for tools in Windows.

  • Fixed potential exponential backtracking in regex to parse extension input when installing extensions from a git repository.

  • Fixed adding sudo to self-hosted Linux environments. (#555)

  • Fixed enabling disabled extensions with other extensions as dependencies. For example pecl_http, redis, etc.

  • Fixed a bug where the ini file used for enabling extensions by pecl in the scan directory was deleted when disabling extensions.

  • Fixed misconfiguration which prevented package lists from updating on Linux.

  • Fixed the fallback to install PowerShell packages using Install-Module on Windows when GitHub Releases is down. Also fixed not adding the Import-Module command to the profile when it fallbacks.

  • Fixed tools setup to not overwrite an existing tool with a broken one if it fails to set up.

  • Fixed an error when copying tools to a directory in PATH in tools setup.

  • Fixed parsing composer phars from snapshot channel for its version when is a stable version.

  • Fixed support for oci8 and pdo_oci extensions on Windows.

  • Fixed pecl_http setup.

  • Fixed restore-keys input in composer cache example in README with dependency range.

  • Fixed error in tools setup on self-hosted environments when composer's bin directory is not present.

  • Fixed tools.getLatestVersion to handle failing GitHub API call.

  • Fixed output on non-GitHub Action environments where GitHub Action specific command syntax was printed.

  • Fixed a bug where the status variable was overwritten in ppa.sh and was breaking the status output.

  • Fixed scope of variables to local in bash scripts.

  • Fixed setting extension stability in Add-Extension Function on Windows.

  • Fixed node-release workflow to add lib directory to the packages.

  • Fixed sending coverage data to codecov on pull requests.

  • Refactored utils.fetch to its own module and mocked the http module using nock for fetch tests. Now the Node.js test suite does not make any external requests.

  • Refactored setting environment variables and adding to PATH.

  • Refactored setting outputs to functions with a check to only run on GitHub Actions.

  • Refactored extension functions to add_extension.sh and add_extension.ps1.

  • Refactored the default PHP packages for self-hosted Linux environments to a config file. Also added cgi, fpm, mysql, opcache, pgsql and zip to the list.

  • Refactored Nightly PHP setup to Install-PhpNightly Function on Windows.

  • Refactored CI workflows and templates.

  • Rename common.sh to unix.sh.

  • Update security policy to specify clearly that the latest patch versions of both v1 and v2 are supported for security updates.

  • Updated Node workflows to use 16.x.

  • Updated README for the release.

  • Updated Node.js dependencies.


Thanks! @jrfnl and @villfa for the contributions 🚀

Follow for updates

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

1.11.6

08 Feb 12:49
2a0c477
Compare
Choose a tag to compare

v1 maintenance release

  • Fix Node.js tests.
  • Fix manifest URL for v1.
  • Add CodeQL workflow.
  • Update Node workflow to use Node 16.
  • Update Node.js dependencies.
  • Fix sending coverage data to codecov.
  • Update docs.

2.16.0

25 Nov 19:25
da0e854
Compare
Choose a tag to compare

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/setup-php@v2
  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/setup-php@v2
  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. shivammathur/icu-intl#2

- name: Setup PHP
  uses: shivammathur/setup-php@v2
  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/setup-php@v2
  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. #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. #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. #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

2.15.0

28 Sep 08:19
4c5c122
Compare
Choose a tag to compare

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/setup-php@v2
  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/setup-php@v2
  with:
    php-version: '8.0'
    tools: phpDocumentor, parallel-lint, phpunit-polyfills
- name: Setup PHP
  uses: shivammathur/setup-php@v2
  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

1.11.5

28 Sep 08:05
fbdd58c
Compare
Choose a tag to compare
  • 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.

2.14.0

11 Sep 00:46
1fa3ba1
Compare
Choose a tag to compare
  • 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/setup-php@v2
  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/setup-php@v2
  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/setup-php@v2
  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.

1.11.4

11 Sep 00:42
d7eb9ad
Compare
Choose a tag to compare

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.