PHPackages                             zoopcommerce/maggott-module - 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. [Database &amp; ORM](/categories/database)
4. /
5. zoopcommerce/maggott-module

ActiveLibrary[Database &amp; ORM](/categories/database)

zoopcommerce/maggott-module
===========================

Zend Framework 2 Module that provides exception handling functionality

1.1.3(11y ago)01.2k1MITPHPPHP &gt;=5.4

Since Jul 12Pushed 11y ago2 watchersCompare

[ Source](https://github.com/zoopcommerce/maggott-module)[ Packagist](https://packagist.org/packages/zoopcommerce/maggott-module)[ Docs](http://zoopcommerce.github.io/maggott-module)[ RSS](/packages/zoopcommerce-maggott-module/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (3)Versions (7)Used By (1)

Zoop maggott-module
===================

[](#zoop-maggott-module)

[![Build Status](https://camo.githubusercontent.com/6d244cb0c47a3e931c012860ad7dac157ff4f88e35fd359e01945211d1ab0eda/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f7a6f6f70636f6d6d657263652f6d6167676f74742d6d6f64756c652e706e67)](http://travis-ci.org/zoopcommerce/maggott-module)

A simple zend framework 2 module to return exceptions as json in accordance with the [application/api-problem+json](http://tools.ietf.org/html/draft-nottingham-http-problem-02) standard.

Install
-------

[](#install)

Add the following to your composer root:

```
"require": {
    "zoopcommerce/maggott-module" : "~1.1"
}

```

Add the module to your application config:

```
'modules' => [
    'Zoop\MaggottModule'
],

```

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

[](#configuration)

Any exceptions that you want returned as json need to be configured in the `exception_map` config key.

Eg:

```
'zoop' => [
    'maggott' => [
        'exception_map' => [
            'Zoop\ShardModule\Exception\AccessControlException' => [
                'described_by' => 'access-control-exception',
                'title' => 'Access denied',
                'status_code' => 403,
                'extra_fields' => ['action'],
                'restricted_extra_fields' => ['documentClass']
            ]
        ]
    ],
]

```

The `exception_map` is an array of configured exceptions. The key for each item in the array must be the FQCN of the exception. All fields to configure an exception are optional. They are:

described\_by
-------------

[](#described_by)

If this field is supplied, the returned exception will have a `described_by` field which points to a resource where more information about the exception can be found in human readable format.

If using the `described_by` field, you should also create a view model template called `zoop/maggott/` that hold the extra human readable inforamtion.

title
-----

[](#title)

The title of the exception

status\_code
------------

[](#status_code)

The http status code should the json response be set to. Defaults to 500, but also observes the status code in the response.

extra\_fields
-------------

[](#extra_fields)

Other properties of the exception that should always be included in the json response.

restricted\_extra\_fields
-------------------------

[](#restricted_extra_fields)

Other properties of the exception that should only be included in the json response if `displayExceptions` is set to `true`.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

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 ~107 days

Recently: every ~134 days

Total

6

Last Release

4199d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f3bf5fcc3eabf76d34f29c0dd234bd0651efd165c700cd214c5d87be894edc5?d=identicon)[superdweebie](/maintainers/superdweebie)

---

Top Contributors

[![superdweebie](https://avatars.githubusercontent.com/u/1670364?v=4)](https://github.com/superdweebie "superdweebie (9 commits)")

---

Tags

jsondoctrineexceptionzf2shard

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/zoopcommerce-maggott-module/health.svg)

```
[![Health](https://phpackages.com/badges/zoopcommerce-maggott-module/health.svg)](https://phpackages.com/packages/zoopcommerce-maggott-module)
```

###  Alternatives

[sonata-project/doctrine-extensions

Doctrine2 behavioral extensions

26822.4M68](/packages/sonata-project-doctrine-extensions)[facile-it/doctrine-mysql-come-back

Auto reconnect on Doctrine MySql has gone away exceptions on doctrine/dbal

2123.2M4](/packages/facile-it-doctrine-mysql-come-back)

PHPackages © 2026

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