Download the PHP package dockcodes/dock-thor-symfony without Composer
On this page you can find all versions of the php package dockcodes/dock-thor-symfony. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dockcodes/dock-thor-symfony
More information about dockcodes/dock-thor-symfony
Files in dockcodes/dock-thor-symfony
Package dock-thor-symfony
Short Description Symfony bundle for the DockTHOR PHP SDK
License MIT
Informations about the package dock-thor-symfony
DockTHOR for Symfony
Reports Symfony exceptions, console errors and HTTP transactions to DockTHOR.
Installation
Without Symfony Flex, register the bundle in config/bundles.php:
Configuration
config/packages/thor.yaml:
Every key is optional. Without a token and a private key the bundle loads but sends nothing.
| Key | Default | Meaning |
|---|---|---|
url |
https://thor.dock.codes |
DockTHOR instance |
environment |
%kernel.environment% |
environment column in the panel |
release |
null |
deployed version |
sample_rate |
1.0 |
share of error events sent |
traces_sample_rate |
0.0 |
share of transactions sent; 0 disables tracing |
send_default_pii |
false |
attach IP address and user agent |
send_default_user |
true |
attach the authenticated user |
ignore_exceptions |
[] |
classes never reported |
ignore_transactions |
['/_wdt', '/_profiler'] |
path prefixes never measured |
options |
{} |
passed straight to the SDK |
What the bundle registers
| Listener | Event | Does |
|---|---|---|
ExceptionListener |
kernel.exception (-128) |
reports the throwable the request actually died on |
TracingListener |
kernel.request / kernel.terminate |
one transaction per main request |
UserListener |
kernel.controller |
attaches the authenticated user |
ConsoleErrorListener |
console.error |
reports failing commands, tagged with the command name |
The last two register only when symfony/security-core and
symfony/console are installed.
404 responses are exceptions in Symfony, so add NotFoundHttpException to
ignore_exceptions unless you want them in the panel.
Reporting by hand
The hub is available as Dock\Thor\State\HubInterface and as the public
thor.hub service:
The SDK's global functions work too — the bundle installs its hub as the current one while the container boots.
Messenger and long-running processes
The hub is a container singleton, so a worker keeps one client for its whole
life. Failing messages are reported through console.error when the worker
itself dies; for per-message reporting add your own Messenger middleware around
captureException().
License
MIT.
All versions of dock-thor-symfony with dependencies
dockcodes/dock-thor Version ^1.0
symfony/config Version ^6.4|^7.0
symfony/dependency-injection Version ^6.4|^7.0
symfony/event-dispatcher Version ^6.4|^7.0
symfony/http-kernel Version ^6.4|^7.0