PHPackages                             wakeonweb/errors-extra-library - 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. wakeonweb/errors-extra-library

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

wakeonweb/errors-extra-library
==============================

Wakeonweb errors extra library

v1.1.0(7y ago)01711[1 issues](https://github.com/WakeOnWeb/errors-extra-library/issues)PHPPHP &gt;=5.5

Since Oct 1Pushed 7y ago2 watchersCompare

[ Source](https://github.com/WakeOnWeb/errors-extra-library)[ Packagist](https://packagist.org/packages/wakeonweb/errors-extra-library)[ RSS](/packages/wakeonweb-errors-extra-library/feed)WikiDiscussions master Synced 4d ago

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

WakeOnWeb Errors Extra Library
==============================

[](#wakeonweb-errors-extra-library)

- Error dictionary

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

[](#installation)

composer.json

```
    "require": {
        "wakeonweb/errors-extra-library": "~1.0"
    }
```

AppKernel

```
$bundles[] = new WakeOnWeb\ErrorsExtraLibrary\App\Bundle\WakeonwebErrorsExtraLibraryBundle();
```

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

[](#configuration)

Override http status code, show error messages on exceptions:

```
wakeonweb_errors_extra_library:
    force_format: json
    exception:
        http_status_codes:
            Pagerfanta\Exception\OutOfRangeCurrentPageException: 400
        show_messages:
            - Pagerfanta\Exception\OutOfRangeCurrentPageException
        log_levels:
            Pagerfanta\Exception\OutOfRangeCurrentPageException: notice
            Pagerfanta\Exception\NotValidCurrentPageException: error

```

Log level values as defined by [PSR-3](http://www.php-fig.org/psr/psr-3/#basics) (from [RFC 5424](https://tools.ietf.org/html/rfc5424)).

Exception listener
------------------

[](#exception-listener)

The bundle adds an exception listener to format the response when the requested response format is `application/json`.

### Default JSON response

[](#default-json-response)

- `code` : HTTP status code
- `message` : HTTP reason phrase

#### Example

[](#example)

```
{
    "code": 403,
    "message": "Forbidden",
}

```

#### Form Errors normalization

[](#form-errors-normalization)

This bundle also standardize Symfony Form Errors.

With something like this:

```
    if (!$form->isValid()) {
        return new JsonResponse($this->normalizer->normalize($form, 'json'), 400);
    }

```

You will have:

```
{
   "code":"400",
   "message":"Validation Failed",
   "errors":{
      "children":{
         "firstName":{
            "errors":[
               [
                  "This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.",
                  {
                     "{{ value }}":"\"LL\"",
                     "{{ limit }}":3
                  }
               ]
            ]
         },
         "lastName":{
            "errors":[
               [
                  "This value should not be blank.",
                  {
                     "{{ value }}":"null"
                  }
               ]
            ]
         }
      },
      "errors":[
         [
            "This is a global form error with {{ param }}",
            {
               "{{ param }}":"TEST"
            }
         ]
      ]
   }
}

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~197 days

Total

2

Last Release

2586d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47c3006a9e7662031ee9d3fa064238fef88479fd7d60f18dd47f038fbbd7dc5a?d=identicon)[steph\_py](/maintainers/steph_py)

---

Top Contributors

[![stephpy](https://avatars.githubusercontent.com/u/232744?v=4)](https://github.com/stephpy "stephpy (6 commits)")[![MatthieuCutin](https://avatars.githubusercontent.com/u/12746178?v=4)](https://github.com/MatthieuCutin "MatthieuCutin (2 commits)")[![oliviermarechal](https://avatars.githubusercontent.com/u/42959119?v=4)](https://github.com/oliviermarechal "oliviermarechal (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wakeonweb-errors-extra-library/health.svg)

```
[![Health](https://phpackages.com/badges/wakeonweb-errors-extra-library/health.svg)](https://phpackages.com/packages/wakeonweb-errors-extra-library)
```

###  Alternatives

[spomky-labs/pwa-bundle

Progressive Web App Manifest Generator Bundle for Symfony.

6144.4k1](/packages/spomky-labs-pwa-bundle)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[numero2/contao-storelocator

Contao Plugin for managing stores (or in common address data) and providing a frontend-search based on geo data

121.5k](/packages/numero2-contao-storelocator)

PHPackages © 2026

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