PHPackages                             zendframework/zftool - 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. zendframework/zftool

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

zendframework/zftool
====================

Utility module for Zend Framework 2 applications.

v0.1.0(12y ago)1831.4M↓13%98[22 issues](https://github.com/zendframework/ZFTool/issues)[10 PRs](https://github.com/zendframework/ZFTool/pulls)10BSD-3-ClausePHPPHP &gt;=5.3.3

Since Apr 22Pushed 6y ago40 watchersCompare

[ Source](https://github.com/zendframework/ZFTool)[ Packagist](https://packagist.org/packages/zendframework/zftool)[ Docs](http://framework.zend.com/)[ RSS](/packages/zendframework-zftool/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (16)Versions (3)Used By (10)

Zend Framework 2 Tool
=====================

[](#zend-framework-2-tool)

> ## Repository abandoned 2019-12-05
>
> [](#repository-abandoned-2019-12-05)
>
> This repository is no longer maintained. Tooling was not updated to work with ZF3, and with the transition to Laminas, we will be deciding what, if any, new tooling we want to provide for the MVC framework.

**ZFTool** is an utility module for maintaining modular Zend Framework 2 applications. It runs from the command line and can be installed as ZF2 module or as PHAR (see below).

Features
--------

[](#features)

- Class-map generator
- Listing of loaded modules
- Create a new project (install the ZF2 skeleton application)
- Create a new module
- Create a new controller
- Create a new action in a controller
- [Application diagnostics](docs/DIAGNOSTICS.md)

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

[](#requirements)

- Zend Framework 2.0.0 or later.
- PHP 5.3.3 or later.
- Console access to the application being maintained (shell, command prompt)

Installation using [Composer](http://getcomposer.org)
-----------------------------------------------------

[](#installation-using-composer)

1. Open console (command prompt)
2. Go to your application's directory.
3. Run `composer require zendframework/zftool:dev-master`
4. Execute the `vendor/bin/zf.php` as reported below

Using the PHAR file (zftool.phar)
---------------------------------

[](#using-the-phar-file-zftoolphar)

1. Download the [zftool.phar from packages.zendframework.com](http://packages.zendframework.com/zftool.phar)
2. Execute the `zftool.phar` with one of the options reported below (`zftool.phar` replace the `zf.php`)

You can also generate the zftool.phar using the `bin/create-phar` command as reported below

Usage
-----

[](#usage)

### Basic information

[](#basic-information)

```
zf.php modules [list]           show loaded modules
zf.php version | --version      display current Zend Framework version

```

### Diagnostics

[](#diagnostics)

```
zf.php diag [options] [module name]

[module name]       (Optional) name of module to test
-v --verbose        Display detailed information.
-b --break          Stop testing on first failure.
-q --quiet          Do not display any output unless an error occurs.
--debug             Display raw debug info from tests.

```

### Project creation

[](#project-creation)

```
zf.php create project

              The path of the project to be created

```

### Module creation

[](#module-creation)

```
zf.php create module  []

              The name of the module to be created
              The path to the root folder of the ZF2 application (optional)

```

### Controller creation:

[](#controller-creation)

```
zf.php create controller   []

      The name of the controller to be created
    The module in which the controller should be created
      The root path of a ZF2 application where to create the controller

```

### Action creation:

[](#action-creation)

```
zf.php create action    []

          The name of the action to be created
    The name of the controller in which the action should be created
        The module containing the controller
          The root path of a ZF2 application where to create the action

```

### Application configuration

[](#application-configuration)

```
zf.php config list                  list all configuration option
zf.php config get             display a single config value, i.e. "config get db.host"
zf.php config set      set a single config value (use only to change scalar values)

```

### Classmap generator

[](#classmap-generator)

```
zf.php classmap generate   [--append|-a] [--overwrite|-w]

         The directory to scan for PHP classes (use "." to use current directory)
     File name for generated class map file  or - for standard output. If not supplied, defaults to
                    autoload_classmap.php inside .
--append | -a       Append to classmap file if it exists
--overwrite | -w    Whether or not to overwrite existing classmap file

```

### ZF library installation

[](#zf-library-installation)

```
zf.php install zf  []

              The directory where to install the ZF2 library
           The version to install, if not specified uses the last available

```

### Compile the PHAR file

[](#compile-the-phar-file)

You can create a .phar file containing the ZFTool project. In order to compile ZFTool in a .phar file you need to execute the following command:

```
bin/create-phar

```

This command will create a *zftool.phar* file in the bin folder. You can use and ship only this file to execute all the ZFTool functionalities. After the *zftool.phar* creation, we suggest to add the folder bin of ZFTool in your PATH environment. In this way you can execute the *zftool.phar* script wherever you are, for instance executing the command:

```
mv zftool.phar /usr/local/bin/zftool.phar

```

Note: If the above fails due to permissions, run the mv line again with sudo.

Todo
----

[](#todo)

- Module maintenance (installation, configuration, removal etc.) \[installation DONE\]
- Inspection of application configuration. \[DONE\]
- Deploying zf2 skeleton applications. \[DONE\]
- Reading and writing app configuration. \[DONE\]

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity56

Moderate usage in the ecosystem

Community40

Growing community involvement

Maturity49

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

4409d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/296074?v=4)[Zend Framework](/maintainers/zendframework)[@zendframework](https://github.com/zendframework)

---

Top Contributors

[![Thinkscape](https://avatars.githubusercontent.com/u/270528?v=4)](https://github.com/Thinkscape "Thinkscape (65 commits)")[![ezimuel](https://avatars.githubusercontent.com/u/475967?v=4)](https://github.com/ezimuel "ezimuel (41 commits)")[![weierophinney](https://avatars.githubusercontent.com/u/25943?v=4)](https://github.com/weierophinney "weierophinney (39 commits)")[![Maks3w](https://avatars.githubusercontent.com/u/1301698?v=4)](https://github.com/Maks3w "Maks3w (15 commits)")[![fmarcoux96](https://avatars.githubusercontent.com/u/1487078?v=4)](https://github.com/fmarcoux96 "fmarcoux96 (5 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (3 commits)")[![maglnet](https://avatars.githubusercontent.com/u/4430279?v=4)](https://github.com/maglnet "maglnet (3 commits)")[![adamlundrigan](https://avatars.githubusercontent.com/u/527329?v=4)](https://github.com/adamlundrigan "adamlundrigan (2 commits)")[![jrnickell](https://avatars.githubusercontent.com/u/947805?v=4)](https://github.com/jrnickell "jrnickell (2 commits)")[![nullgeraet](https://avatars.githubusercontent.com/u/1734870?v=4)](https://github.com/nullgeraet "nullgeraet (2 commits)")[![raphaeldealmeida](https://avatars.githubusercontent.com/u/235028?v=4)](https://github.com/raphaeldealmeida "raphaeldealmeida (2 commits)")[![valorin](https://avatars.githubusercontent.com/u/897369?v=4)](https://github.com/valorin "valorin (2 commits)")[![nemutaisama](https://avatars.githubusercontent.com/u/2156646?v=4)](https://github.com/nemutaisama "nemutaisama (1 commits)")[![noose](https://avatars.githubusercontent.com/u/438968?v=4)](https://github.com/noose "noose (1 commits)")[![adeelnawaz](https://avatars.githubusercontent.com/u/2161678?v=4)](https://github.com/adeelnawaz "adeelnawaz (1 commits)")[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (1 commits)")[![ralphschindler](https://avatars.githubusercontent.com/u/76674?v=4)](https://github.com/ralphschindler "ralphschindler (1 commits)")[![web-axioma](https://avatars.githubusercontent.com/u/5706238?v=4)](https://github.com/web-axioma "web-axioma (1 commits)")[![bineetchaubey](https://avatars.githubusercontent.com/u/4551052?v=4)](https://github.com/bineetchaubey "bineetchaubey (1 commits)")[![szsoftware](https://avatars.githubusercontent.com/u/2539622?v=4)](https://github.com/szsoftware "szsoftware (1 commits)")

---

Tags

toolzf2

### Embed Badge

![Health badge](/badges/zendframework-zftool/health.svg)

```
[![Health](https://phpackages.com/badges/zendframework-zftool/health.svg)](https://phpackages.com/packages/zendframework-zftool)
```

###  Alternatives

[zf-commons/zfc-user

A generic user registration and authentication module for ZF2. Supports Zend\\Db and Doctrine2.

4851.1M70](/packages/zf-commons-zfc-user)[zf-commons/zfc-base

A set of genetic (abstract) classes which are commonly used across multiple modules.

1441.1M25](/packages/zf-commons-zfc-base)[socalnick/scn-social-auth

Uses the HybridAuth PHP library to Enable authentication via Google, Facebook, Twitter, Yahoo!, etc for the ZfcUser ZF2 module.

21974.2k3](/packages/socalnick-scn-social-auth)[snapshotpl/zf-snap-geoip

MaxMind GeoIP Module for Zend Framework 2

1512.9k](/packages/snapshotpl-zf-snap-geoip)

PHPackages © 2026

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