A GitHub Action to set up PHP with extensions, configuration, coverage drivers, and tools for CI/CD workflows.
Setup PHP is a GitHub Action that configures PHP environments for continuous integration and deployment workflows. It automates the installation of specific PHP versions, extensions, coverage drivers, and development tools across different operating systems. The action solves the problem of maintaining consistent PHP setups in CI/CD pipelines, especially when testing across multiple PHP versions and platforms.
PHP developers and teams using GitHub Actions for CI/CD who need to test their applications across different PHP versions and configurations. It's particularly valuable for open-source projects, agencies, and enterprises maintaining PHP applications with complex dependency requirements.
Developers choose Setup PHP because it provides a single, well-maintained action that handles all PHP environment configuration needs in GitHub Actions. Unlike manual setup or multiple separate actions, it offers extensive version support, flexible extension management, and tool integration while maintaining cross-platform compatibility and performance optimizations.
GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports GitHub-hosted and self-hosted runners across Ubuntu, Windows, and macOS, as detailed in the OS/Platform Support tables, ensuring consistent environments.
Covers PHP versions from 5.3 to 8.6, including nightly builds, allowing comprehensive testing across legacy and modern PHP releases.
Enables installing or disabling extensions via CSV input with PECL and custom build support, including version-specific and pre-release extensions.
Sets up popular PHP tools like Composer, PHPUnit, and PHP CS Fixer globally, reducing boilerplate in workflow files and keeping composer.json clean.
Easily switches between Xdebug and PCOV for code coverage or disables both for performance, with clear configuration options in the coverage input.
Relies on multiple dependencies like ppa:ondrej/php and various homebrew taps, which can introduce breaking changes or maintenance issues outside the action's control.
With numerous inputs and options, it can be overwhelming for simple PHP environments that only need a basic version switch, adding unnecessary configuration overhead.
Exclusively designed for GitHub Actions, making it unsuitable for other CI/CD platforms without significant adaptation or manual workarounds.
Users of the deprecated v1 version must migrate to v2, requiring workflow adjustments as noted in the versioning section, which can be a hassle for existing projects.