PHPackages                             cronfy/yii2-web-errorhandler - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. cronfy/yii2-web-errorhandler

ActiveExtension[Logging &amp; Monitoring](/categories/logging)

cronfy/yii2-web-errorhandler
============================

Yii2 customizable error handler

v0.0.1(9y ago)445.6k↓39.4%GPL-3.0PHPPHP &gt;=5.4.0

Since Oct 6Pushed 9y agoCompare

[ Source](https://github.com/cronfy/yii2-web-errorhandler)[ Packagist](https://packagist.org/packages/cronfy/yii2-web-errorhandler)[ RSS](/packages/cronfy-yii2-web-errorhandler/feed)WikiDiscussions master Synced 1mo ago

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

Yii2 customizable ErrorHandler
==============================

[](#yii2-customizable-errorhandler)

Can be customized in terms of which error types should be converted to exceptions or only logged.

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

[](#installation)

```
php composer.phar require cronfy/yii2-web-errorhandler
```

Usage
-----

[](#usage)

Replace `errorHandler` component in application configuration and configure error types you want to convert to exceptions or log. Default is `E_ALL | E_STRICT`.

Example:

```
...
    'components' => [
        'errorHandler' => [
            'class' => 'cronfy\yii\web\ErrorHandler',
            'typesToExceptions' => YII_DEBUG ? (E_ALL | E_STRICT) : false,
            'typesToLog' => E_ALL | E_STRICT,
        ],
    ],
...
```

This configuration will convert all php notices and warnings to exceptions only in debug mode, and none in production environment. Errors will be logged both in debug and production modes. You can customize error types that go to log or convereted to exceptions.

Errors are logged via internal Yii2 `log` component.

You can enable/disable ErrorHandler for particular error types by setting `typesToHandle` option. All error types not specified there will be forwarded to internal php error handler:

```
...
    'components' => [
        'errorHandler' => [
            'class' => 'cronfy\yii\web\ErrorHandler',
            'typesToHandle' => E_ALL & ~E_NOTICE,

	        // NOTE: although E_ALL is set here, PHP Notices will not be converted to exceptions,
	        // because they were disabled via 'typesToHandle' option above.
	        // PHP Warnings and other errors will be converted to exceptions.
            'typesToExceptions' => E_ALL,
        ],
    ],
...
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3512d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9437b35b9443597f698ce24f3d4b38754196b43a94e34b42be715c4e08aa401a?d=identicon)[cronfy](/maintainers/cronfy)

---

Top Contributors

[![cronfy](https://avatars.githubusercontent.com/u/762954?v=4)](https://github.com/cronfy "cronfy (5 commits)")

### Embed Badge

![Health badge](/badges/cronfy-yii2-web-errorhandler/health.svg)

```
[![Health](https://phpackages.com/badges/cronfy-yii2-web-errorhandler/health.svg)](https://phpackages.com/packages/cronfy-yii2-web-errorhandler)
```

###  Alternatives

[bedezign/yii2-audit

Yii2 Audit records and displays web/cli requests, database changes, php/js errors and associated data.

201657.4k4](/packages/bedezign-yii2-audit)[mito/yii2-sentry

Yii 2 extension for Sentry

92377.7k](/packages/mito-yii2-sentry)

PHPackages © 2026

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