Provides a launcher to run Phing without Phing.
Because we want:
- to get and run composer.phar with a Phing command,
- to install Phing dependency with Composer.
I explain the magic trick:
- if the Composer shortcut does not exist, the launcher download the latest Phing phar binary,
- and when the Composer shortcut is created, the launcher will remove the phar binary.
The Composer shortcut can be specified by your configuration or it defaults vendor/bin/phing.
1. Modify your composer.json file, to require Phing by Composer:
- add
phing/phingdependency to therequiresection,
"require": {
"phing/phing": "2.*"
}- set the
bin-dirdirectory to theconfigsection, if you have to.
"config": {
"bin-dir": "path/to/bin/directory"
}2. Download the Phing Launcher script into your project (near composer.json).
curl -sS -O https://bitbucket.org/maxime-pasquier/phing-launcher/raw/master/phing.sh3. Run the Phing Launcher script instead of Phing.
./phing.shYou can try the several configurations available into the phing/ directory, like:
phing/composer.xmlprovides the complete usage of Composer (including the download),phing/phpunit.xmlprovides a usage of PHPunit,phing/symfony.xmlprovides a usage of Symfony console.
Run the following command to download the classics configurations and the build.xml example file on your project:
./phing.sh get-the-classics