zoltanlaca / eh-symfony
Handling errors
Installs: 622
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.1
- symfony/framework-bundle: ^6.1
- symfony/http-client: ^6.3
Requires (Dev)
- phpunit/phpunit: ^9.5
README
Setup
Add Environment Variables
EH_ERROR_HANDLER_URL
- URL to the error handler. Eg:https://localhost/error/handler
EH_ERROR_HANDLER_API_AUTH
- Key to access the error handler API. Eg:1234567890
Symfony
Add ExceptionListener
Into config/services.yaml
add the following:
services: Zoltanlaca\EhSymfony\EventListener\ExceptionListener: tags: [ kernel.event_listener ]
Skip exceptions
- copy
Zoltanlaca\EhSymfony\EventListener\ExceptionListener
- fill
skipExceptions
array with your exceptions - replace ExceptionListener in config/services.yaml with your ExceptionListener