ConfigProvider.php 1.35 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<?php

/**
 * Created by PhpStorm.
 * User: zero
 * Date: 2020/2/11
 * Time: 11:49
 */

namespace Meibuyu\Micro;

class ConfigProvider
{
    public function __invoke(): array
    {
        return [
王源's avatar
王源 committed
17
            'exceptions' => [
18 19 20 21
                /**
                 * 以下异常处理器会合并到项目的config/autoload/exceptions.php文件配置数组的前面;
                 * 请勿在此使用顶级异常捕获处理器,防止项目中异常处理器无效;
                 */
王源's avatar
王源 committed
22 23 24
                'handler' => [
                    'http' => [
                        \Meibuyu\Micro\Exceptions\Handler\MicroExceptionHandler::class,
25
                        \Meibuyu\Micro\Exceptions\Handler\QueryExceptionHandler::class,
26
                        \Meibuyu\Micro\Exceptions\Handler\PhpSpreadsheetExceptionHandler::class,
王源's avatar
王源 committed
27 28 29
                    ],
                ],
            ],
30 31 32
            'dependencies' => [
                \Hyperf\ServiceGovernance\Listener\RegisterServiceListener::class => \Meibuyu\Micro\Listener\RegisterServiceListener::class,
            ],
33
            'commands' => [
34
                \Meibuyu\Micro\Command\MakeModelCommand::class,
35
            ],
王源's avatar
王源 committed
36 37 38 39 40 41 42
            'annotations' => [
                'scan' => [
                    'paths' => [
                        __DIR__,
                    ],
                ],
            ],
43 44
        ];
    }
45
}