PHPackages                             bushbaby/zf2-module-phing-service - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bushbaby/zf2-module-phing-service

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

bushbaby/zf2-module-phing-service
=================================

Zend Framework 2 module for Phing, a PHP project build system or build tool based on Apache Ant.

2.0.0(11y ago)163753MITPHPPHP &gt;=5.3.3

Since May 31Pushed 9y ago1 watchersCompare

[ Source](https://github.com/bushbaby/zf2-module-phing-service)[ Packagist](https://packagist.org/packages/bushbaby/zf2-module-phing-service)[ Docs](https://github.com/basz/zf2-module-phing-service)[ RSS](/packages/bushbaby-zf2-module-phing-service/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (5)Versions (6)Used By (0)

BsbPhingService
===============

[](#bsbphingservice)

Introduction
------------

[](#introduction)

BsbPhingService is module for Zend Framework 2 that will enable you to execute [phing](http://www.phing.info/ "Phing") build files from within ZF2 projects.

Requirements
------------

[](#requirements)

- [Zend Framework 2](http://framework.zend.com) &gt;=2.0
- [Phing](http://www.phing.info) &gt;=2.4.13
- The ability to execute commandline programs from PHP via [proc\_open](http://php.net/manual/en/function.proc-open.php).

[changelog](CHANGELOG.md)

[![Latest Stable Version](https://camo.githubusercontent.com/a51a135b74ad7c5ccf942bb39bb4d39e32ffd973cd63c63cb3c0cfb58fb014ee/68747470733a2f2f706f7365722e707567782e6f72672f62757368626162792f7a66322d6d6f64756c652d7068696e672d736572766963652f762f737461626c652e737667)](https://packagist.org/packages/bushbaby/zf2-module-phing-service)[![Total Downloads](https://camo.githubusercontent.com/58bd6c4d8b31568d9bac02f85b6368906391e001be754f8f79b1ac39212ba79f/68747470733a2f2f706f7365722e707567782e6f72672f62757368626162792f7a66322d6d6f64756c652d7068696e672d736572766963652f646f776e6c6f6164732e737667)](https://packagist.org/packages/bushbaby/zf2-module-phing-service)[![Latest Unstable Version](https://camo.githubusercontent.com/efdaf0805593d71c408a8177067a376a7ccfbc65052e50e1942c130c615f3a59/68747470733a2f2f706f7365722e707567782e6f72672f62757368626162792f7a66322d6d6f64756c652d7068696e672d736572766963652f762f756e737461626c652e737667)](https://packagist.org/packages/bushbaby/zf2-module-phing-service)[![License](https://camo.githubusercontent.com/1550d84968293191378b470dbd2e0d1791d585b6a939de9000c8115c853a9bab/68747470733a2f2f706f7365722e707567782e6f72672f62757368626162792f7a66322d6d6f64756c652d7068696e672d736572766963652f6c6963656e73652e737667)](https://packagist.org/packages/bushbaby/zf2-module-phing-service)

\[[![Build Status](https://camo.githubusercontent.com/bba6ab20a7c923752f3e5f859a7bc799ed9874f129573328b3c567788741c056/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62757368626162792f7a66322d6d6f64756c652d7068696e672d736572766963652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://camo.githubusercontent.com/bba6ab20a7c923752f3e5f859a7bc799ed9874f129573328b3c567788741c056/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62757368626162792f7a66322d6d6f64756c652d7068696e672d736572766963652f6261646765732f6275696c642e706e673f623d6d6173746572)\]([![Build Status](https://camo.githubusercontent.com/eb349265732dd4a8305ccec9ebdb244c6a107c49087e958161c0170e19cb3946/68747470733a2f2f7472617669732d63692e6f72672f62757368626162792f7a66322d6d6f64756c652d7068696e672d736572766963652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bushbaby/zf2-module-phing-service)) [![Code Coverage](https://camo.githubusercontent.com/bc420b39f4929a095c3f13639c90a1cb3b60f79521a7e9bb4a2c51c45655f556/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62757368626162792f7a66322d6d6f64756c652d7068696e672d736572766963652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bushbaby/zf2-module-phing-service/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/45ce2b2c81a0ad192e64662b09f1c70990d8fa327b922f3a3738ba39435d20ba/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62757368626162792f7a66322d6d6f64756c652d7068696e672d736572766963652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bushbaby/zf2-module-phing-service/?branch=master)[![Dependency Status](https://camo.githubusercontent.com/a29672c1dcf83fe432cf8e2f51a4b6ad33f8c927fbcd74bb42600306ca2f5ba6/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3534643133313862336361303834393533313030303063362f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/54d1318b3ca08495310000c6)

---

Installation
------------

[](#installation)

### Using Composer

[](#using-composer)

The recommended way to get a working copy of this project is to modify your composer.json in your project root. This will take care of dependencies.

```
"require":{
    "bushbaby/zf2-module-phing-service":"~2.0",
 },

```

and then update

```
cd /to/your/project/directory
./composer.phar update -v

```

Configuration
-------------

[](#configuration)

- Open `./configs/application.config.php` and add 'BsbPhingService' to the 'modules' parameter to register the module within your application.
- Optionally copy `./vendor/bushbaby/zf2-module-phing-service/config/bsbphingservice.global.php.dist` to `./config/autoload/bsbphingservice.global.php` to override some defaults.

How to use BsbPhingService
--------------------------

[](#how-to-use-bsbphingservice)

There is only one command to use which is `$service->build($target, $phingOptions);`.

As of version 2.0.0 an instance of the [Symfony Process component](http://symfony.com/doc/current/components/process.html)is returned when you call 'build'.

```
$process = $phingService->build('target', array('buildFile' => 'build.xml'));
$process->getOutput();

```

A third argument 'immediate' has been added to build which allows you retrieve a configured but unexecuted Process instance for whenever you need to do more advanced process management. Such as getting realtime feedback or asynchronously running the build.

```
$process = $phingService->build('target', array('buildFile' => 'build.xml'), false);
$process->run(function ($type, $buffer) {
    if (Process::ERR === $type) {
        echo 'ERR > '.$buffer;
    } else {
        echo 'OUT > '.$buffer;
    }
});

```

See the official documentation of [Symfony Process component](http://symfony.com/doc/current/components/process.html).

### Controller example

[](#controller-example)

You can create an instance of the Service manually, however it is recommended to retrieve an configured instance from the ServiceLocator. The ServiceLocator is available in every controller so retrieval is trivial.

```
public function indexAction() {
    $options = array('buildFile' => __DIR__ . '/../../../data/build-example.xml');

    $buildResult = $this->getServiceLocator()->get('BsbPhingService')->build('show-defaults dist', $options);

    if ($buildResult->getExitCode() > 0) {
  	    // problem
        echo $buildResult->getCommandline();
        echo $buildResult->getErrorOutput();
    } else {
        // yeah
        echo $buildResult->getOutput();
    }

    $view = new ViewModel(array('process'=>$buildResult));

    return $view;
}

```

To get a quick taste you can enable the defined route in module.conf.php and point your browser at `http://yourhost/phingservice` to get an working example.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~244 days

Total

5

Last Release

4165d ago

Major Versions

1.0.1 → 2.0.02015-02-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/e42bb1eb4035d280d16210974fa60d0dbddeba8a061abec926e5e081d097231d?d=identicon)[bushbaby](/maintainers/bushbaby)

---

Top Contributors

[![basz](https://avatars.githubusercontent.com/u/143068?v=4)](https://github.com/basz "basz (56 commits)")

---

Tags

modulezf2phing

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/bushbaby-zf2-module-phing-service/health.svg)

```
[![Health](https://phpackages.com/badges/bushbaby-zf2-module-phing-service/health.svg)](https://phpackages.com/packages/bushbaby-zf2-module-phing-service)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
