yucadoo / graze-neighborhoods-diagnostic
Exception detection strategy for Graze's transient fault handler using Neighborhoods' throwable diagnostic component.
0.0.1
2020-10-18 14:35 UTC
Requires
- php: ~7.2
- graze/transient-fault-handler: ^0.3.1
- neighborhoods/throwable-diagnostic-component: ^2.1
Requires (Dev)
- phpunit/phpunit: >=8.0
- squizlabs/php_codesniffer: ^3.0
This package is auto-updated.
Last update: 2024-12-19 00:12:49 UTC
README
Exception detection strategy for Graze's transient fault handler using Neighborhoods' throwable diagnostic component.
Install
Via Composer
$ composer require yucadoo/graze-neighborhoods-diagnostic
Usage
use YucaDoo\GrazeNeighborhoodsDiagnostic\ExceptionDetectionStrategy as NeighborhoodsExceptionDetectionStrategy; use Graze\TransientFaultHandler\TransientFaultHandlerBuilder; /** * Obtain a preconfigured ThrowableDiagnostic builder factory. * You can use Symfony DI as explained in Neighborhoods' throwable diagnostic component. */ $throwableDiagnosticBuilderFactory = $container->get('ThrowableDiagnosticBuilderFactoryWithTailoredDecoratorStack'); $neighborhoodsExceptionDetectionStrategy = new NeighborhoodsExceptionDetectionStrategy(); $neighborhoodsExceptionDetectionStrategy->setThrowableDiagnosticBuilderFactory($throwableDiagnosticBuilderFactory); $builder = new TransientFaultHandlerBuilder(); $transientFaultHandler = $builder ->setExceptionDetectionStrategy($neighborhoodsExceptionDetectionStrategy) ... ->build();
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email hrcajuka@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.