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

Deploy code with phing

I want to sync files from source folder to public folder with Phing but the problem is when I use
Anton_Sh
  • 225
  • 1
  • 7
  • 16
0
votes
1 answer

Phing: Cutting out piece of code with Phing

I tried different phing filters regex aso. to cut out different pieces of code out of a build target. For that i use something like ##CUTSTART ##CUTEND This won't work because of no multiline support i guess: …
Mike
  • 5,416
  • 4
  • 40
  • 73
0
votes
1 answer

phing dbdeploy with postgres

Hiho, I want to use Phing an dbdeploy with a postgres DB. the problem is that I can not connect to the database with the connection string because I can not define a password. Does any one has an solution for this? The following is the deply xml: …
0
votes
2 answers

Phing does not install on composer install

I am trying to run composer install on my local dev environment. Unfortunately I get a fatal error at the point where phing is being installed. I did a google search as well as looked at the issue queues for both composer and phing projects, but…
Benjen
  • 2,835
  • 5
  • 28
  • 42
0
votes
1 answer

phing FtpDeploy "connection to host failed"

I'm getting the following error when trying to deploy a ZIP file to a remote FTP server. I tried connecting to the server using an FTP client (filezilla) and all goes well. Also, when connecting to a public ftp like ftp.belnet.be connections work…
Jorre
  • 17,273
  • 32
  • 100
  • 145
0
votes
1 answer

Phing: replace token with file or multiline value?

I have a file ga-code.txt which contains analytics code. I want to use phing in a build to replace this token @ga-code@ in index.php with the contents of ga-code.txt Is this possible with phing?
Sam Luther
  • 1,170
  • 3
  • 18
  • 38
0
votes
1 answer

How to set the path for a non-interactive, non-login process which is not executed in bash

It's jenkins installed as a package, which executes phing, but everything is executed with /bin/sh it seems. So bash_env is not an option I think. Can anybody help me with this?
daften
  • 1
0
votes
1 answer

Linux sdiff command cut output text

I have two files which I compare using sdiff command. Unfortunately it cuts filename, which is necessary for me. Command looks like that: sdiff -t ${build.fileListDir}/${build.fileList} ${build.dir}/git/${build.fileList} | grep '[|]' >…
Dariss
  • 1,258
  • 1
  • 12
  • 27
0
votes
1 answer

Composer skips prompt in scripts

I'm using composer and phing to initialize a boilerplate I made. Basically I'm using this post-create-project hook to call my phing buildfile. "scripts": { "post-create-project-cmd": "bin/phing -f boilerplate.xml" } My phing file looks…
Jochen Ullrich
  • 568
  • 3
  • 22
0
votes
2 answers

Mirror for pear.phing.info

pear.phing.info seems to be down, does anyone know if there are any mirrors available for this package? Thanks, Jon
Ian morgan
  • 935
  • 3
  • 11
  • 15
0
votes
1 answer

Need to install php5.4 on ubuntu 12.04 LTS precise

I am using following instruction to install latest php on unbutu instance: Add to /etc/apt/source.list deb http://packages.dotdeb.org stable all deb-src http://packages.dotdeb.org stable all Update apt-key sudo wget -q …
sakhunzai
  • 13,900
  • 23
  • 98
  • 159
0
votes
1 answer

Phing overrides Symfony2 CLI table output colours

I'm trying to print a coloured table after running a Symfony2 CLI command which works fine when running on its own like this: CLI Command: php app/console phing:report inanzzz Output: PROBLEM: When I run same CLI command within Phing, table colour…
BentCoder
  • 12,257
  • 22
  • 93
  • 165
0
votes
1 answer

Codesniffer to exit after identiying error before proceeding any further

I want codesniffer to produce error output in CLI and exit before proceeding any further to avoid running other tests like behat, phpmd, phpcpd so that comes after. Current code (as shown below) creates a XML report with errors listed in but it…
BentCoder
  • 12,257
  • 22
  • 93
  • 165
0
votes
1 answer

Git Rebase task for Phing?

It seems that Phing does not have a Git task for performing a rebase. It seems strange that it would not have a task for this, so I question if I'm overlooking it. Can someone confirm that Phing doesn't have a Git rebase task? Note that I'm aware a…
Courtney Miles
  • 3,756
  • 3
  • 29
  • 47
0
votes
1 answer

Use two composer autoloaders in phing to run phpunit

I have a situation, that all app code comes from one source already compiled and in read only access. I need to run tests, but code that comes to me do not have phpunit installed. Would it be possible to pass 2 autoloaders to phpunit using phing?…
Kazimieras Aliulis
  • 1,531
  • 3
  • 13
  • 25