PHPackages                             acseo/aierrorexplained-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. acseo/aierrorexplained-bundle

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

acseo/aierrorexplained-bundle
=============================

This bundle provides AI explaination when an error has occured

v0.1.1(3y ago)2771MITPHPPHP ^8.1

Since Mar 2Pushed 3y ago3 watchersCompare

[ Source](https://github.com/acseo/AIErrorExplainedBundle)[ Packagist](https://packagist.org/packages/acseo/aierrorexplained-bundle)[ Docs](https://github.com/acseo/AIErrorExplainedBundle)[ RSS](/packages/acseo-aierrorexplained-bundle/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

ACSEOAIErrorExplainedBundle
===========================

[](#acseoaierrorexplainedbundle)

This bundle improove Symfony Official Error page with an AI Suggestion to fix the error.

It relies on OpenAI and its [openai-php/client](https://github.com/openai-php/client) package, and it uses a **cache mecanism** in order to avoid calling OpenAI multiple times for the same exception.

In order to handle **ALL** exception, we will need to register a custom **Error Handler** in the Symfony Kernel. This is something that can be done with your `composer.json` file (see installation).

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

[](#installation)

1. Declare the Custom Error Handler in composer.json

```
    ...
    "extra": {
        ...
        "runtime": {
            "error_handler": "ACSEO\\AIErrorExplainedBundle\\Runtime\\Internal\\AIErrorHandler"
        }
    }
    ...
```

2. Install the bundle using composer

```
composer require --dev acseo/aierrorexplained-bundle
```

3. Enable the bundle in you Symfony project (already done with Flex)

```
