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
2 answers

Phing and Jenkins

I'm using Jenkins on Windows 7 and I would like to use phing with it. I installed the corresponding plugin but in the build I've this error : [src] $ cmd.exe /C '"phing.bat -buildfile "C:\Program Files\Jenkins\workspace\Test\utils\build\build.xml"…
skurty
  • 738
  • 1
  • 11
  • 26
0
votes
1 answer

phing with phpdoc2 doesn't run

So I have a jenkins job to update a copy of my code and generate the phpdoc for my library, this is all done with phing When I use these line in de build.xml it generates jsut fine (but with phpdocumentor 1.4.4)
acrobat
  • 2,179
  • 2
  • 27
  • 35
0
votes
1 answer

How to generate propel ORM objects on virtual host with no include_path?

I have a dev server with several virtual hosts on it. Each one needs to be able to run the command: propel-gen ./ creole That script executes some php that reverse-engineers the database... BUT the php it executes needs to be included to do…
lo_fye
  • 6,790
  • 4
  • 33
  • 49
0
votes
1 answer

Phing console width: override, or retrieve actual width value

I'm working on a cli php script that needs to be aware of the current console width (does periodic checks to `tput col`, outputs data in columns, linebreaks etc.). This works fine when calling the script directly, but when running the script from a…
Billiam
  • 2,349
  • 2
  • 19
  • 19
0
votes
1 answer

Phing PHPUnit run all php files

I'm using Phing to run phpunit on a folder called runtest which contains all my phpunit tests. My build.xml is below:
van
  • 9,159
  • 19
  • 60
  • 93
0
votes
1 answer

Why am I geting an invalid XML error in my Phing build.xml?

It says XML not well formed when I highlight over the unzip tag. The complete file is at: https://github.com/reload/phing-drupal-template/blob/master/build.xml (line 255) What am I doing wrong?
Strong Like Bull
  • 11,155
  • 36
  • 98
  • 169
0
votes
3 answers

Locating a program in a Phing build file

In a Phing build file, I would like to invoke an external program (lessc in this case), but the program might live in a different location depending on which system the script is run on. This is what I am doing currently. It works, but it smells to…
user212218
-1
votes
2 answers

PHP Remove Phing after PROD Deploy

We are currently using phing on deployment from jenkins to our different environments. We use it to do some cleanup. We would like to remove phing from our source/vendor folder after the build is completed. Can phing remove itself as a final build…
user1050544
  • 437
  • 5
  • 24
-1
votes
2 answers

How to display total time per build target in Phing output

In my build.xml I have a main build target which is composed of several targets. I need to check how much time takes to run those targets. Currently in my output console, I only see TOTAL TIME for the build. Is there a way to show times for internal…
Jakub Filipczyk
  • 1,141
  • 8
  • 18
1 2 3
25
26