PHPackages                             phpro/zf-annotated-forms - 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. phpro/zf-annotated-forms

AbandonedArchivedLibrary

phpro/zf-annotated-forms
========================

v0.1.2(11y ago)01.1k1MITPHP

Since May 5Pushed 5y ago5 watchersCompare

[ Source](https://github.com/phpro/zf-annotated-forms)[ Packagist](https://packagist.org/packages/phpro/zf-annotated-forms)[ RSS](/packages/phpro-zf-annotated-forms/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (10)Versions (3)Used By (0)

> ## Repository abandoned 2020-11-27
>
> [](#repository-abandoned-2020-11-27)
>
> This repository has been archived since we are not using it anymore internally. Feel free to use it AS-IS, we won't be providing any support anymore.

Installation
============

[](#installation)

Add to composer.json
--------------------

[](#add-to-composerjson)

```
"phpro/zf-annotated-forms": "dev-master"

```

Add to application config
-------------------------

[](#add-to-application-config)

```
return array(
    'modules' => array(
        'Phpro\\AnnotatedForms',
        // other libs...
    ),
    // Other config
);
```

Configuration files
-------------------

[](#configuration-files)

Copy `module.zf-annotated-forms-global.dist.php` to your application configuration autoload directory. You can adjust this file and set the default values. The `annotated_forms` can also be declared in your module config.

### Form configuration

[](#form-configuration)

```
return array(
    'annotated_forms' => array(
        'form-key' => array(
            'initializers' => array(),
            'listeners' => array(),
            'cache' => null,
            'cache_key' => 'cached-form-key',
            'entity' => '',
        ),
    ),
);
```

`initializers`: Array of service manager keys, which return InitializerInterfaces. These initializers are used to inject dependencies in form elements.

`listeners`: Array of service manager keys, which return EventListenerAggregateInterface. These listeners can be used to adjust the form.

`cache`: Service manager key, which return Cache\\StorageInterface. This cache storage is used to save parsed annotations. This can be left `null` if you do not want to be using cache.

`cache_key`: The cache key where the parsed configuration is being saved in the cache locator. This can be left `null` if you do not want to be using cache.

`entity`: The name of the class which contains the form annotations.

### Load the form

[](#load-the-form)

You can now use the serviceManager to retrieve your form. In the config example above, you can use:

```
$serviceManager->get('form-key');
```

### Configure cache

[](#configure-cache)

While configuring a cache storage, there are some things to keep in mind:

- Disable the exceptions by default
- Add a serializer
- The ttl of the forms can be infinite if you clear the cache after building your application

Sample configuration:

```
'caches' => [
    'Cache\AnnotatedForms' => [
        'adapter' => [
            'name' => 'redis',
            'options' =>  [
                'namespace' => 'zf-annotated-forms',
                'server' => [
                    'host' => '127.0.0.1',
                    'port' => '6379',
                ],
                'ttl' => 86400 // 1 day
            ],
        ],
        'plugins' => [
            'exception_handler' => [
                'throw_exceptions' => false,
            ],
            'serializer',
        ],
    ],
],
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.2% 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 ~165 days

Total

3

Last Release

4056d ago

### Community

Maintainers

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

---

Top Contributors

[![veewee](https://avatars.githubusercontent.com/u/1618158?v=4)](https://github.com/veewee "veewee (25 commits)")[![stefliekens](https://avatars.githubusercontent.com/u/3245491?v=4)](https://github.com/stefliekens "stefliekens (1 commits)")

### Embed Badge

![Health badge](/badges/phpro-zf-annotated-forms/health.svg)

```
[![Health](https://phpackages.com/badges/phpro-zf-annotated-forms/health.svg)](https://phpackages.com/packages/phpro-zf-annotated-forms)
```

###  Alternatives

[zf-commons/zfc-base

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

1441.1M25](/packages/zf-commons-zfc-base)

PHPackages © 2026

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