# shivammathur/setup-php

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

Repository: https://github.com/shivammathur/setup-php
Canonical: https://ross.abutalabs.com/products/setup-php
Homepage: https://setup-php.com
Language: TypeScript
License: MIT
License Family: permissive
Topics: php, github-actions, php-extensions, code-coverage, tools, continuous-integration, composer, static-analysis
Last push: 2026-08-23T06:08:36+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 87, longevity 100
- inputs: {"age_days": 2554, "days_push": 10, "days_rel": 86, "gap_med": 25, "n_releases_24m": 14}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3255, forks 419 (observed 2026-08-28T04:07:52.278234+00:00)

## What it is
A GitHub Action that installs PHP with specified extensions, php.ini configuration, coverage drivers (Xdebug, PCOV), and tools like Composer in CI workflows. It supports PHP 5.3 through nightly builds across GitHub-hosted and self-hosted runners.

## Use cases
- set up php in github actions workflow
- install php extensions in ci
- run phpunit with code coverage in github actions
- test php app across multiple php versions
- install composer in ci pipeline
- configure php.ini in github actions

## When to choose
- you run PHP projects on GitHub Actions and need a specific PHP version or extensions
- you need matrix builds across PHP versions or operating systems
- you want coverage drivers like Xdebug or PCOV configured automatically

## When to avoid
- you use CI providers other than GitHub Actions
- you need PHP set up on local development machines rather than CI
- your project is not PHP-based

## Facets
- artifact type: plugin
- maturity: active
- function: ci-cd, developer-tools, testing, configuration-management
- domain: developer-tools, web-development, testing
- platform: windows, self-hosted
- tags: github-actions, php, composer, xdebug, pcov, php-extensions, continuous-integration, devops, linux, macos, docker

## Member repositories
- shivammathur/setup-php (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:52.278234+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:24:23.205603+00:00, confidence not recorded.
  - readme: https://github.com/shivammathur/setup-php (fetched 2026-08-28T04:07:52.278234+00:00, sha d2be5bcdee1c)
  - homepage: https://setup-php.com (fetched 2026-08-29T09:37:08.971714+00:00, sha 3ef3670c2919)
  - registry_npm: https://registry.npmjs.org/setup-php (fetched 2026-08-29T09:37:08.981046+00:00, sha 7b55242d8485)
- Data as of 2026-08-30T08:39:29.467469+00:00.
