| CARVIEW |
PHing Is Not GNU make
Phing is a PHP project build system or build tool based on Apache Ant. You can do anything with it that you could do with a traditional build system like GNU make, and its use of simple XML build files and extensible PHP "task" classes make it an easy-to-use and highly flexible build framework.
Features include running PHPUnit unit tests (including test result and coverage reports), file transformations (e.g. token replacement, XSLT transformation, template transformations), file system operations, interactive build support, SQL execution, Git, Mercurial and Subversion operations, tools for creating PEAR packages, documentation generation (PhpDocumentor, ApiGen) and much, much more.
If you find yourself writing custom scripts to handle the packaging, deploying, or testing of your applications, then we suggest looking at Phing. Pre-packaged with numerous out-of-the-box operation modules (tasks), and an easy-to-use OO model to extend or add your own custom tasks.
Features
Simple XML buildfiles
Rich set of provided tasks
Easily extendable via PHP classes
Works on Linux, Mac & Windows
No required external dependencies
Runs great on PHP 7 and 8
Installation
Composer
Install Phing by adding a dependency to phing/phing to the require-dev or require section of your project's composer.json configuration file, and running 'composer install':
{
"require-dev": {
"phing/phing": "2.*"
}
}
Or, if you want to install the latest alpha version:
{
"require-dev": {
"phing/phing": "3.*"
},
"minimum-stability": "alpha"
}
Phar
Download the Phar archive (version 3.1.1, sha-512 hash). The archive can then be executed by running:
php phing-latest.phar
Or directly download a specific version:
NB: starting from 3.1.1, all releases are signed using GPG. The [email protected] public key can be downloaded here. To verify a release, run:
curl https://keys.openpgp.org/vks/v1/by-fingerprint/56697956EBD451594B03AEFDD5F0CB76E2DD74F8 | gpg --import gpg --verify phing-3.1.1.phar.asc
PEAR (deprecated)
Our PEAR channel has been deprecated. Phing is only available through Composer or as a .phar archive.
Manual install (deprecated)
Phing is only available through Composer or as a .phar archive.
Documentation
Phing User Guide
The most comprehensive source for Phing documentation.
NB: the documentation links below are autogenerated from the latest Phing development version. For the latest stable version, please refer to this repository.
RELAX NG schema
Tutorials
Presentations
- Phing - An Introduction - Slide's from Ken Guest's talk at PHPDublin, June 2015
- Building and deploying PHP applications with Phing - Slides from Michiel Rook's talk at the 2012 PHP UK Conference in London.
- Deploying applications with Phing - Slides from Michiel Rook's talk at the 2011 PHPNW Conference in Manchester.
- Phing - A PHP Build Tool - Slides from Michiel Rook's talk at the 2011 Dutch PHP Conference (Unconference track) in Amsterdam.
- PHPBenelux - Using Phing - Slides from Marco de Krijger's talk at the PHPBenelux Meetup, May 10th 2011.
- Phing - Phing presentation by Dom Udall at PHPLondon on 2nd September 2010.
- Putting Phing to Work for You - Slides from workshop at 2007 International PHP Conference in Frankfurt.
- Phing: Building with PHP - Slides from Phing presentation at 2007 International PHP Conference in Frankfurt.
More Phing (related) presentations can be found here: https://www.slideshare.net/tag/phing
Contribute
We contributions! There are a number of ways that you can get involved in Phing development.
Help us spot & fix bugs
We greatly appreciate it when users report issues or come up with feature requests. However, there are a few guidelines you should observe before submitting a new issue:
- Make sure the issue has not already been submitted, by searching through the list of (closed) issues.
- Support and installation questions should be asked on Twitter, Slack or IRC, not filed as issues.
- Give a good description of the problem, this also includes the necessary steps to reproduce the problem!
- If you have a solution - please tell us! This doesn't have to be code. We appreciate any snippets, thoughts, ideas, etc that can help us resolve the issue.
Issues can be reported on GitHub.
Documentation
We can always use better documentation. The user guide is written in DocBook and can be found in docs/guide/en/source. The source is rendered to multiple formats (html, pdf, etc.), these can be found in docs/guide/en/output).
Donate
Developing and maintaining Phing has cost many hours over the years. If you want to show your appreciation, you can use one of the following methods to donate something to the project maintainer, Michiel Rook:
- Become a patron on Patreon
- Flattr Phing
- Send money via PayPal
- Choose something from the Amazon Wishlist
Thank you!
Tests
To successfully run all Phing tests, please ensure you have the following setup:
- PEAR installed, channel pear.phing.info discovered
- On Linux: package python-docutils installed
- php.ini setting phar.readonly set to Off
Then, perform the following steps (on a clone/fork of Phing):
composer install cd test ../bin/phing
Pull requests
The best way to submit code to Phing is to make a Pull Request on GitHub. Please help us merge your contribution quickly and keep your pull requests clean and concise: squash commits and don't introduce unnecessary (whitespace) changes. Phing's source code is formatted according to the PSR-2 standard.
Phing's source code is hosted on GitHub.
Support
There are several ways to get help if you are having problems with Phing.
Latest
Latest Release

