phuongdev89/yii2-errorhandler

Yii2 Error Handle

1.0.0 2023-10-18 15:52 UTC

This package is auto-updated.

Last update: 2024-04-18 16:49:49 UTC


README

Must have phpstorm-protocol before

Composer

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist phuongdev89/yii2-errorhandler "@dev"

or add

"phuongdev89/yii2-errorhandler": "@dev"

to the require section of your composer.json file.

Parameters

$traceLine

Type: string
Default: {html}
If phpstorm-protocol installed, change it to

<a href="phpstorm://open?url=file://{file}&line={line}">{html}</a>

$projectDirectionMap

Type: array|null
Default: null
In docker container, project directory is /app maybe different with your IDE, just map it

Example

    'components' => [
        'errorHandler' => [
            'class' => \phuongdev89\errorhandler\ErrorHandler::class,
            /**
            'traceLine' => '<a href="phpstorm://open?url=file://{file}&line={line}">{html}</a>',
            'projectDirectionMap' => [
                '/app' => 'D:\\Ampps\\www\mofiex-com'
            ]
            */
        ], 
    ],