Questions tagged [phing]

Phing is a project build system based on Apache ant. You can do anything with Phing that you could do with a traditional build system like Gnu make, and Phing's use of simple XML build files and extensible PHP "task" classes make it an easy-to-use and highly flexible build framework.

Phing is a project build system based on Apache ant. You can do anything with Phing that you could do with a traditional build system like Gnu make, and Phing's use of simple XML build files and extensible PHP "task" classes make it an easy-to-use and highly flexible build framework. Phing comes packaged with numerous out-of-the-box operation modules (tasks), and an easy-to-use OO model for adding your own custom tasks. (copied from the Phing documentation)

Phing provides the following features:

  • Simple XML buildfiles
  • Rich set of provided tasks
  • Easily extendable via PHP classes
  • Platform-independent: works on UNIX, Windows, MacOSX
  • No required external dependencies
  • Built & optimized for ZendEngine2/PHP5

Useful resources:

Hello World Example

Contents of build.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project name="HelloWorld" default="world" basedir=".">
    <target name="world" depends="message">
        <echo message="World!" />
    </target>
    <target name="message">
        <echo message="Hello, " />
    </target>
</project>

Executed by running phing or phing world

$ phing world
Buildfile: /tmp/phingtest/build.xml

HelloWorld > message:

     [echo] Hello, 

HelloWorld > world:

     [echo] World!

BUILD FINISHED

Total time: 0.0940 seconds

Installing via Composer

{
    "require": {
        "phing/phing": "2.5.0"
    },
}
384 questions
0
votes
1 answer

Phing throws "Segmentation Fault" on a Copy Task with stripphpcomments in the filter chain

I'm using Phing to set up a build process for a large PHP project. I thought the stripphpcomments directive would be useful when copying files, so I added it. When I run Phing with this directive included, however, the copy process errors out with…
MBuscemi
  • 102
  • 8
0
votes
1 answer

How can I use Phing to SCP directory with symlinks inside it?

I'm just playing around with Phing, and I've setup a task like this: But it fails when it gets to a symlink within my directory (the symlink is a relative…
jonotron
  • 83
  • 7
0
votes
3 answers

Commit through Phing using eclipse on Windows

I am using eclipse to commit my changes to SVN. Now I want to automate few things using Phing, which would do commit with the build process. Phing code for svn commit is:
jtanmay
  • 2,607
  • 6
  • 26
  • 36
0
votes
1 answer

How to force Phing task to respect verbose exec command?

In other words how to display output of currently executed phing task?
Matt Komarnicki
  • 5,198
  • 7
  • 40
  • 92
0
votes
1 answer

Extracting String with Phing

I got a directory structure like this: plugins (directory) - file1.php - file1.xml - file2.php - file2.xml - file3.php - file3.xml ... What i need is a directory structure like this: plugins (directory) - file1 (directory) -- file1.php --…
Mike
  • 5,416
  • 4
  • 40
  • 73
0
votes
2 answers

Default phing log file location?

I am debugging a phing-based workflow and wish to see errors in detail. (An error is being sent to standard output when I run my phing-based migration script, but it is fairly minimal.) The main file that seems to be prescribing phing behaviors is…
0
votes
2 answers

PHPUnit times out running on empty cache

I'm trying to create a build process using phing. During this process I want to run the composer install script and phpunit, which is installed by composer Inside my buildfile I have 2 targets.
Ronald
  • 100
  • 9
0
votes
1 answer

Phing build xml file hanging after sudo su to a user but normal command line execution works

Following is a section of my build.xml file - Flow 1 Flow…
Sandeepan Nath
  • 9,966
  • 17
  • 86
  • 144
0
votes
1 answer

Phing does just the default target

I have a problem with Phing. He only does the default job. Has anyone encountered such behavior? The environment works on Windows 10. Thank you for your help.