kick-in/exception-handler-bundle
最新稳定版本:4.0.1
Composer 安装命令:
composer require kick-in/exception-handler-bundle
包简介
This bundles integrates an simple Exception Handler in your Symfony Application, which is capable of mailing the exact problem.
README 文档
README
This bundles integrates an simple Exception Handler in your Symfony Application, which is capable of mailing the exact problem.
Upgrading
See the upgrade notes.
Installation
In order for this bundle to work, you are required to follow the following steps:
- Install the bundle:
php composer.phar require kick-in/exception-handler-bundle
- Enable the bundle in your
bundles.php(if not done automatically)
$bundles = [ Kickin\ExceptionHandlerBundle\KickinExceptionHandlerBundle::class => ['all' => true], ];
- Choose the mail backend in the configuration. For example, for SwiftMailer:
kickin_exception_handler: mail_backend: 'swift' # One of "swift"; "swift_mailer"; "symfony"; "symfony_mailer"
-
Implement your custom configuration service. This should implement either
Configuration\SwiftMailerConfigurationInterfaceor
Configuration\SymfonyMailerConfigurationInterface, depending on you mail backend choice.You can check a custom example implementation here.
-
Your configuration will be autowired to the correct ExceptionHandler if you have set
container.autowiring.strict_modeto false. Otherwise, (default in Symfony >=4.0), alias theKickin\ExceptionHandlerBundle\Configuration\(Swift|Symfony)MailerConfigurationInterfaceservice to your custom configuration class. For example:
Kickin\ExceptionHandlerBundle\Configuration\SymfonyMailerConfigurationInterface: alias: 'App\ExceptionHandler\ExceptionHandlerConfiguration'
- [SwiftMailer only] Create the
exception_mailerSwiftMailer instance. For example:
swiftmailer: default_mailer: default mailers: default: transport: "%mailer_transport%" exception_mailer: transport: "%mailer_transport%" spool: { type: memory }
That should be it, happy exception mailing!
Contributors
The original functionality has been created by WendoB, while BobV splitted the codebase into a separate bundle making it configurable for more users.
Problems
If you experience any problems, do not hesitate to create an issue (or PR if you're able to fix it)!
统计信息
- 总下载量: 17.73k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-10-28