what can Phing do that Ant can't?
Asked Answered
S

2

24

I'm doing PHP development and I'm thinking of using one of these. I have both PHP and Java installed on my machine. In theory I could use any of the two.

What are the compelling arguments to pick Phing over Ant?

Sopher answered 23/3, 2010 at 19:29 Comment(0)
M
33

The greatest argument I have in favor of Phing is that it's fully developed in PHP ; which means, at least :

  • You can debug it / submit patches if you want
  • You can develop tasks in PHP
    • including tasks which are specific to your project
    • that can use stuff from your project (I've written a couple of tasks that use functions of Drupal, in a drupal-based project)
    • And, if you are working on a PHP project, your team probably knows PHP well -- while they might not know Java
  • No need to install Java on your servers
Middlebrooks answered 23/3, 2010 at 19:41 Comment(1)
For some reason, as of version 2.16.1 I find that a lot of Phing specific tasks for tools such as phploc, phpcpd, phpdepend, phpcs and phpmd, for example, don't seem to work and return exceptions. Also, it seems to have a problem finding these tools even if they are in the $PATH directories. I ended up having to rewrite tasks to use these tools in generic Ant buildfile syntax i.e. using the exec task to make them work with Phing. It almost defeated the purpose of using Phing. My build server was running PHP 7.2 if that matters.Homeopathic
S
9

The main argument (for me) for using Phing when doing PHP development is

Snaggy answered 23/3, 2010 at 19:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.