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

Error importing phing task file but the file is present there

2.4.12 build. i have placed the phing file inside /opt/phing and added lines to the .bashrc. export PHP_COMMAND=/usr/bin/php export PHING_HOME=/opt/phing export PHP_CLASSPATH=${PHING_HOME}/classes export PATH=${PATH}:${PHING_HOME}/bin I am able…
0
votes
1 answer

How to exclude base directory from phing/ant FileSet

I have a phing build target that I want to run on each directory directly under my project base. I'm using a foreach task with a fileset to run the target on each directory. The problem I'm having is that the base directory is included, with a…
dmertl
  • 805
  • 8
  • 13
0
votes
1 answer

Cannot execute zip task in Phing on XP

I'm using Phing to create build files, but I've noticed that it does not appear to be able to execute the zip task:
sunwukung
  • 2,815
  • 3
  • 41
  • 56
0
votes
1 answer

Phing pdosqlexec Segmentation Fault

when i try to execute this
Easly
  • 334
  • 2
  • 11
0
votes
1 answer

Phing fails inside if statement

If i execute this in phing it works well: If i…
Mike
  • 5,416
  • 4
  • 40
  • 73
0
votes
1 answer

Accessing variables defined in unit testcase file in src file using phing

I have defined some variables in my test file then i call a function from my test file defined in src file and verify the result then While using phing it is not working, but if i use php or phpunit to verify it is working fine. Example: add.php…
0
votes
1 answer

Prune old files in a directory with phing

This target works fine
Moosh
  • 386
  • 1
  • 8
0
votes
1 answer

how to evaluate junit.xml using phing

I am using phing to build my CakePHP web application. I want to have a phing target that goes along these lines: Run the test suite if there is even 1 failure, end the phing target if all okay, run the command "git commit -a" For my test suite, I…
Kim Stacks
  • 10,202
  • 35
  • 151
  • 282
0
votes
1 answer

Deploy only newer files with Phing

I'm using Phing as my build tool for a website i'm developing. I have a server running on localhost to test things on my own system, and i have a test environment on the server it's eventually going to run on. Deploying to that test environment is…
Erik S
  • 1,939
  • 1
  • 18
  • 44
0
votes
1 answer

How to run Phing target based upon current version?

How can I create a Phing build script that will handle deployments, and migrate a project from it's current version to the latest version? Assuming that I have broken my deployment down into incremental version updates. Let's say my live server is…
Reactgular
  • 52,335
  • 19
  • 158
  • 208
0
votes
1 answer

symfony (propel) can't generate schema

I'm using symfony 1.4.19 and php 5.4.8. I think the problem appeared after upgrading php from 5.3 to 5.4... When I thy to generate schema.yml with a php symfony propel:build-schema I recieve an error: PHP Strict Standards: Declaration of…
khartvin
  • 551
  • 1
  • 7
  • 20
0
votes
1 answer

Phing: get a filename without the extension

Given a Phing loop such as this
Roberto
  • 2,206
  • 4
  • 24
  • 31
0
votes
1 answer

How i can add phing task for automated parsing my project and cresting a PO for translation?

How i can add phing task for automated parsing my project and creating a PO for translation?
Cawa
  • 1,269
  • 3
  • 25
  • 44
0
votes
1 answer

Checking for database existence with Phing

I'd like to do something like the following in my Phing build.xml:
0
votes
1 answer

Order of files in a FileSet (phing)

Is it possible to get the files from a phing FileSet in a specific order (0-9 followed by A-Z for example)? Right now it is taking my numbered files in a completely random order.
dataviruset
  • 109
  • 1
  • 9
1 2 3
25
26