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/phing
dependency to therequire
section,
"require": {
"phing/phing": "2.*"
}
- set the
bin-dir
directory to theconfig
section, 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.sh
3. Run the Phing Launcher script instead of Phing.
./phing.sh
You can try the several configurations available into the phing/
directory, like:
phing/composer.xml
provides the complete usage of Composer (including the download),phing/phpunit.xml
provides a usage of PHPunit,phing/symfony.xml
provides 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