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

Can a negative lookbehind be used in Phing replaceregexp task?

Having tried to drop a negative lookbehind regex into a Phing replaceregexp task and receiving the error: BUILD FAILED Error reading project file [wrapped: C:\path\to\build.xml:110:29: > required] Total time: 0.4800 seconds I see that the…
A.M. D.
  • 928
  • 6
  • 10
0
votes
3 answers

Dependency management with php (for own libraries)

Most of the time I'm developing Joomla extensions. It happens often that one needs to reuse helper classes, installation classes etc. Up until now I've just copy pasted code around. I know, I know... but this is always the fastest solution, that in…
Daniel Dimitrov
  • 1,848
  • 21
  • 35
0
votes
2 answers

Phing alternative for fixlastline from ant

I'm rewriting build.xml file from Ant to Phing and everything goes fine with one exception. I need to add new line at the end of each appended file but I can't find any alternative for fixlastline="true". In Ant it was
Elon Than
  • 9,603
  • 4
  • 27
  • 37
0
votes
1 answer

Is it possible to programmatically launch the php interactive shell from a file?

I would like to be able to either launch php in interactive mode via phing or via PHP (worst case scenario, phing can run an adhoc task with the desired code). I've gotten this far:
hjc1710
  • 576
  • 4
  • 17
0
votes
1 answer

ExecTask is not running

I have the following build.xml file:
Songo
  • 5,618
  • 8
  • 58
  • 96
0
votes
2 answers

Running phpdoc through Phing, phpdocumentor.ini location

I'm rebuilding my xampp and CI environment (on win7) from scratch but am having trouble running phpdoc through phing. In particular, Phing is looking to phpdocumentor.ini in a place that doesn't exist (and never has). Phing and PhpDocumentor have…
A.M. D.
  • 928
  • 6
  • 10
0
votes
1 answer

The phing is installed to old php directory

I am trying to install phing using pear. I basically used the command pear channel-discover pear.phing.info pear install --alldeps phing/phing phing is installed but into my old php version folder php5.4.3. I wanted to install it on php5.4.16…
uddhab
  • 338
  • 4
  • 9
0
votes
1 answer

Validating Phing's build.xml using Netbeans

I have the following build.xml file in my project's root directory (the file is taken from Phing's manual):
Songo
  • 5,618
  • 8
  • 58
  • 96
0
votes
1 answer

Phing zip fails with regex excludes

I have Phing build file to create releases of my components. I have two kind of packages: the free and the pro one. Inside the pro package, all the files should be included, while in the free one I have to exclude files that match this…
tampe125
  • 8,231
  • 7
  • 30
  • 45
0
votes
1 answer

phing file could not be uploaded

I just started with phing. Below is my code. There are no errors coming regarding connection. The only error it is giving is File could not be uploaded. I don't have a clue how to resolve this. I mean I am not really able to debug this with this…
user1346107
  • 157
  • 4
  • 11
0
votes
2 answers

propel-gen: command not found (phing)

I've installed the Propel ORM in my Zend Framework project with the following commands: pear channel-discover pear.phing.info pear install phing/phing pear install Log But always when I try to run propel-gen I get the following…
nielsv
  • 6,540
  • 35
  • 111
  • 215
0
votes
0 answers

symfony can't build schema (propel)

I've been trying symfony 1.2.12, using xampp 3.1.0 over windows XP (the jobeet tutorial). When I try to run php symfony propel:build-schema I've got the following error (over and over): Propel Running "reverse" phing task [taskdef] Error importing…
Jorge Hernandez
  • 187
  • 1
  • 1
  • 10
0
votes
1 answer

Chmod specific directories using Phing FtpDeploy task

I've recently setup a Phing build step to deploy a Wordpress website to an external FTP server. The actual transfer works fine, but I'm trying to figure out a way to set the permissions on the uploads directory to allow users to upload files. I…
PhilHalf
  • 129
  • 2
  • 12
0
votes
3 answers

Error generating phpdoc with phing

I'm configuring Jenkins for my project and I want to create phpdoc but it doesn't works. I'm using phing and my server is with Debian. What I've made : Install phpDoc pear install phpdoc/phpDocumentor-beta Phing :
Gilles
  • 317
  • 5
  • 15
0
votes
2 answers

Execute a phing target when a file has been modified

I have a filelist of about 25 files. I need to execute a certain phing target when the modification time of one of these files has changed. What is the best way to do this?
Nikolay Yordanov
  • 1,404
  • 16
  • 25