Skip to content

Latest commit

 

History

History
125 lines (88 loc) · 9.15 KB

README.md

File metadata and controls

125 lines (88 loc) · 9.15 KB

Icon GitHub Action: Setup PHP

Setup PHP

Overview

Set up PHP and Composer, cache downloads and install project dependencies with or without lockfiles.

Usage

- uses: hoverkraft-tech/ci-github-php/actions/setup-php@9fc3d4e8925f8c6d87f1d46bd6b695ef75cb0f0a # 2.0.4
  with:
    # Project directory relative to the checkout.
    # Default: `.`
    working-directory: .

    # Explicit PHP version. Empty honors .php-version and Composer platform overrides, then discovers the highest stable release matching composer.json require.php.
    php-version: ""

    # PHP extensions forwarded to shivammathur/setup-php.
    # Default: `mbstring, dom, xml, xmlwriter, curl, zip, intl`
    extensions: mbstring, dom, xml, xmlwriter, curl, zip, intl

    # Coverage driver: none, pcov or xdebug.
    # Default: `pcov`
    coverage: pcov

    # JSON array of Composer project directories relative to working-directory. Empty installs the root project and tools/composer.json when present, without recursive discovery.
    composer-directories: ""

    # Install project dependencies. Disable for jobs that only create an archive or install a separate consumer.
    # Default: `true`
    install-dependencies: "true"

    # Disable Composer installation scripts. Explicit Composer scripts run by later actions are unaffected.
    # Default: `true`
    ignore-scripts: "true"

    # Disable Composer plugins during installation. Set false when needed; composer.json allow-plugins still controls which plugins may run.
    # Default: `true`
    ignore-plugins: "true"

Inputs

Input Description Required Default
working-directory Project directory relative to the checkout. false .
php-version Explicit PHP version. Empty honors .php-version and Composer platform overrides, then discovers the highest stable release matching composer.json require.php. false -
extensions PHP extensions forwarded to shivammathur/setup-php. false mbstring, dom, xml, xmlwriter, curl, zip, intl
coverage Coverage driver: none, pcov or xdebug. false pcov
composer-directories JSON array of Composer project directories relative to working-directory. Empty installs the root project and tools/composer.json when present, without recursive discovery. false -
install-dependencies Install project dependencies. Disable for jobs that only create an archive or install a separate consumer. false true
ignore-scripts Disable Composer installation scripts. Explicit Composer scripts run by later actions are unaffected. false true
ignore-plugins Disable Composer plugins during installation. Set false when needed; composer.json allow-plugins still controls which plugins may run. false true

Outputs

Output Description
php-version Installed PHP major and minor version.

Marketplace Release License Stars PRs Welcome GitHub Verified Creator

Contributing

Contributions are welcome! Please see the contributing guidelines for more details.

License

This project is licensed under the MIT License.

SPDX-License-Identifier: MIT

Copyright © 2026 hoverkraft

For more details, see the license.


This documentation was automatically generated by CI Dokumentor.