PHPackages                             c975l/exceptionchecker-bundle - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. c975l/exceptionchecker-bundle

AbandonedArchivedSymfony-bundle[Debugging &amp; Profiling](/categories/debugging)

c975l/exceptionchecker-bundle
=============================

Listener for Symfony Exceptions in order to redirect to another url, or throw GoneException with a list of urls

v5.7(6mo ago)1634MITPHPPHP ^8

Since Apr 14Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/975L/ExceptionCheckerBundle)[ Packagist](https://packagist.org/packages/c975l/exceptionchecker-bundle)[ Docs](https://github.com/975L/ExceptionCheckerBundle)[ Fund](https://buymeacoff.ee/laurentmarquet)[ Fund](https://opencollective.com/laurent-marquet)[ RSS](/packages/c975l-exceptionchecker-bundle/feed)WikiDiscussions main Synced 3d ago

READMEChangelogDependencies (7)Versions (78)Used By (0)

ExceptionCheckerBundle
======================

[](#exceptioncheckerbundle)

**Imagine...** There's a bad request on your Symfony website, which leads Monolog to send you an email (action level set to error). Then, you simply just delete the email OR set the action level to critical (and then lose all warnings about real links problems that should be solved!).

With `ExceptionCheckerBundle`, excluding and redirect to your homepage, or wherever you want, a bad url call is **as easy as clicking on a link!**.

A link is provided in the log file sent by email, this link will lead to a form where you need to enter your defined secret code (secret code is not needed if you're logged in), and that's it! The url is excluded and redirected! You can use the form to change the kind and data, before submitting it.

ExceptionCheckerBundle does the following:

- Catches Symfony's exceptions and checks if the called url has been deleted or redirected or is an excluded or ignored one,
- Allows to use **wildcards** to match urls,
- Searches and redirects for any kind of different character case (i.e. `https://example.com/YourFILe.html` which should be `https://example.com/YourFile.html`)
- Provides forms to create, modify, duplicate, delete the ExceptionCheckers,
- Will reduce errors trigerred as if urls are registered, they will not be exception anymore (except for deleted urls which will throw GoneHttpException),
- Integrates with your web design,
- Creates new ExceptionChecker with a simple url call (+ secret code or already signed in), provided in the log file sent by email,

This Bundle relies on the use of [jQuery](https://jquery.com/) and [Bootstrap](http://getbootstrap.com/).

[ExceptionCheckerBundle dedicated web page](https://975l.com/en/pages/exception-checker-bundle).

[ExceptionCheckerBundle API documentation](https://975l.com/apidoc/c975L/ExceptionCheckerBundle.html).

Bundle installation
-------------------

[](#bundle-installation)

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Use [Composer](https://getcomposer.org) to install the library

```
    composer require c975l/exceptionchecker-bundle
```

### Step 2: Configure the Bundle

[](#step-2-configure-the-bundle)

Check dependencies for their configuration:

- [Doctrine](https://github.com/doctrine/DoctrineBundle)
- [KnpPaginatorBundle](https://github.com/KnpLabs/KnpPaginatorBundle)

v2.0+ of c975LExceptionCheckerBundle uses [c975L/ConfigBundle](https://github.com/975L/ConfigBundle) to manage configuration parameters. Use the Route "/exception-checker/config" with the proper user role to modify them.

Upgrading from v1.x? Check **UPGRADE.md**

### Step 3: Enable the Routes

[](#step-3-enable-the-routes)

Then, enable the routes by adding them to the `/config/routes.yaml` file of your project:

```
c975_l_exception_checker:
    resource: "@c975LExceptionCheckerBundle/Controller/"
    type:     annotation
    prefix: /
    #Multilingual website use the following
    #prefix: /{_locale}
    #defaults:   { _locale: '%locale%' }
    #requirements:
    #    _locale: en|fr|es
```

### Step 4: Create MySql table

[](#step-4-create-mysql-table)

You can use `php bin/console make:migration` to create the migration file as documented in [Symfony's Doctrine docs](https://symfony.com/doc/current/doctrine.html) OR use `/Resources/sql/exception_checker.sql` to create the table `exception_checker`. The `DROP TABLE` is commented to avoid dropping by mistake.

**As a bonus some well known tested links to be excluded are provided in the sql file, simply un-comment this part before running the sql file.**

### Step 5: Integration with your website

[](#step-5-integration-with-your-website)

It is strongly recommended to use the [Override Templates from Third-Party Bundles feature](http://symfony.com/doc/current/templating/overriding.html) to integrate fully with your site.

For this, simply, create the following structure `/templates/bundles/c975LExceptionCheckerBundle/` in your app and then duplicate the file `layout.html.twig` in it, to override the existing Bundle file, then apply your needed changes, such as language, etc.

In `layout.html.twig`, it will mainly consist to extend your layout and define specific variables, i.e. :

```
{% extends 'layout.html.twig' %}

{# Defines specific variables #}
{% set title = 'ExceptionChecker (' ~ title ~ ')' %}

{% block content %}
    {% block exceptionchecker_content %}
    {% endblock %}
{% endblock %}
```

### How to use

[](#how-to-use)

ExceptionCheckerBundle can easily replace `excluded_404s` placed in Monolog to avoid being flooded by too many 404 errors, so you can remove this option from your `config_prod.yml`.

Use the Route `exceptionchecker_dashboard` (url: "/exception-checker/dashboard") to access Dashboard. Then you can add urls.

Matching of urls is made with `LIKE url%` so it means that if the searched url is the beginning of a checked url, the match will be met, i.e. `/wp-login.php` will be matched by `/wp-login`.

**You can use wildcards, to match a set of urls, by adding `*` at the end of the url, i.e. url `/wp*` will be matched by `/wp-login`, `/wp-admin`, `/wp-login.php`, etc.**

### Add deleted or excluded via url call

[](#add-deleted-or-excluded-via-url-call)

This bundle provides a great feature to add deleted|excluded url easily and fastly!

Imagine, you receive a new email (from Monolog i.e.), saying "No Route found for...". To add this url to ExceptionCheckerBundle, simply indicate {kind} (deleted or excluded) and copy/paste the requested {url} in `http://example.com/ec-add/{kind}?u={url}` (this will use the Route `exceptionchecker_add`). Type your secret code (if you're not signed in) and the url is added!

i.e. `http://example.com/ec-add/excluded?u=/js/mage/cookies.js`.

**You need to have set `exceptionCheckerSecret` in `/config/config_bundles.yaml` or with c975L/ConfigBundle, by using the Route "/exception-checker/config", to be able to add urls without having to sign in.**

### Deleted Urls

[](#deleted-urls)

If the url is found, ExceptionCheckerBundle will throw a `GoneHttpException`.

### Redirected Urls

[](#redirected-urls)

Redirected Urls can redirect to an `Asset`, a `Route` or an `Url`. You will need to enter the following type of data

- Asset: path to your asset, i.e. `/path_to_asset`
- Url: relative or absolute url, i.e. `http://example.com`
- Route without parameters: `route_name`
- Route with one parameter: `route_name['param_key' => 'param_value']`
- Route with multiple parameters: `route_name['param_key' => 'param_value', 'another_param_key' => 'another_param_value']`

If the url is found, ExceptionCheckerBundle will update Event Response to redirect to the defined url.

### Ignored Urls

[](#ignored-urls)

If the url is found, ExceptionCheckerBundle will throw a `BadRequestHttpException`.

### Excluded Urls

[](#excluded-urls)

Excluded Urls are the unwanted 404 HTTP errors, like when an attacker scans your app for some well-known application paths (e.g. /phpmyadmin).

If the url is found, ExceptionCheckerBundle will redirect to the Route defined in the config value `redirectExcluded`. We advise you to redirect to your homepage.

If this project **help you to reduce time to develop**, you can sponsor me via the "Sponsor" button at the top :)

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance67

Regular maintenance activity

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity78

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

Recently: every ~103 days

Total

76

Last Release

193d ago

Major Versions

1.x-dev → v2.02018-08-31

2.x-dev → v3.02021-10-11

v3.0.3 → v4.02022-07-25

v4.1 → v5.02024-02-15

PHP version history (4 changes)v1.0PHP &gt;=5.5.9

v2.0.3PHP ^7

v2.6PHP \*

v4.0PHP ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/5679e828a48e37afabd92da60ab8d78bf65a3bedc0f618ef3fddf92082840f52?d=identicon)[Laurent3170](/maintainers/Laurent3170)

---

Top Contributors

[![LaurentMarquet](https://avatars.githubusercontent.com/u/16478286?v=4)](https://github.com/LaurentMarquet "LaurentMarquet (84 commits)")

---

Tags

symfonybundleexceptionredirect

### Embed Badge

![Health badge](/badges/c975l-exceptionchecker-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/c975l-exceptionchecker-bundle/health.svg)](https://phpackages.com/packages/c975l-exceptionchecker-bundle)
```

###  Alternatives

[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[lexik/translation-bundle

This bundle allows to import translation files content into the database and provide a GUI to edit translations.

4362.7M19](/packages/lexik-translation-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1714.8k8](/packages/2lenet-crudit-bundle)[kilik/table

Symfony Ajax Datagrid Bundle for doctrine entities

3361.4k](/packages/kilik-table)[arkounay/quick-admin-generator-bundle

QAG is a bundle that generates cruds admin for Symfony applications using Doctrine.

2510.4k](/packages/arkounay-quick-admin-generator-bundle)

PHPackages © 2026

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