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?

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
Michael Ekoka
  • 19,050
  • 12
  • 78
  • 79

2 Answers2

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
Pascal MARTIN
  • 395,085
  • 80
  • 655
  • 663
  • 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. – racl101 Nov 13 '18 at 21:24
9

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

Gordon
  • 312,688
  • 75
  • 539
  • 559