talira

PHP build tool modelled on Apache Ant, with XML build files and PHP task classes

open sourceLGPL-3.0-onlyfree

Phing (PHing Is Not GNU make) is a build system for PHP projects modelled on Apache Ant. Builds are simple XML files, and tasks are PHP classes you can extend. It ships tasks for running PHPUnit with test and coverage reports, file transformations (token replacement, XSLT, templates), file system operations, interactive builds, SQL, Git, Subversion and Mercurial, and documentation generation. It installs with Composer, as a Phar, as an official Docker image, or through an official GitHub Action.

Ways to install

Package managers

Problems it solves

  • automate packaging, testing and deploying a PHP project
  • replace my ad-hoc PHP build scripts with a build tool
  • run PHPUnit and generate docs as one build step

Features

  • XML build files with extensible PHP task classes
  • PHPUnit runs with test and coverage reports
  • file transformations: token replacement, XSLT and templates
  • SQL, Git, Subversion and Mercurial tasks
  • Composer, Phar, Docker image and GitHub Action

Limitations

  • Phing 3.2 needs PHP 8.2 or later, and Phing 3 has breaking changes from Phing 2.2

Alternatives

The same job

These do what Phing does.

  1. Robo PHP task runner for scripts, asset builds, tests and deploys, written in PHP
  2. Apache Maven Apache Maven builds, tests, and documents Java projects from a single project object model (POM)

Compare Phing with the top 3