PHPackages                             dockcodes/dock-thor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. dockcodes/dock-thor

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

dockcodes/dock-thor
===================

A PHP SDK for Thor (https://dock.codes)

1.0.1(2mo ago)028↓50%Apache-2.0PHPPHP ^8.2

Since Mar 4Pushed 2mo agoCompare

[ Source](https://github.com/dockcodes/dock-thor-php)[ Packagist](https://packagist.org/packages/dockcodes/dock-thor)[ RSS](/packages/dockcodes-dock-thor/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (23)Versions (4)Used By (0)

DockTHOR PHP
============

[](#dockthor-php)

Functions for the DockTHOR SDK that simplify the most common operations such as:

- capturing exceptions
- capturing messages
- sending events
- working with breadcrumbs
- managing scopes
- starting transactions

Instead of interacting directly with SDK classes, this package exposes a set of global helper functions that internally use the currently active Thor SDK hub.

Installation
------------

[](#installation)

Install via Composer:

```
composer require dockcodes/dock-thor
```

This package requires the main Thor SDK.

Initialization
--------------

[](#initialization)

Before using any helper functions, initialize the SDK:

```
use function Dock\Thor\init;

init([
    'dsn' => 'YOUR_DSN',
    'environment' => 'production',
]);
```

The init() function builds the client and binds it to the current SDK hub.

Capturing Messages
------------------

[](#capturing-messages)

Send a simple message event.

```
use function Dock\Thor\captureMessage;

captureMessage('Something happened');
```

With severity level:

```
captureMessage('Cache cleared', Severity::info());
```

Capturing Exceptions
--------------------

[](#capturing-exceptions)

Capture and report exceptions.

```
use function Dock\Thor\captureException;

try {
    riskyOperation();
} catch (\Throwable $e) {
    captureException($e);
}
```

Capturing Custom Events
-----------------------

[](#capturing-custom-events)

You can also send fully customized events.

```
use function Dock\Thor\captureEvent;

$event = new Event();
$event->setMessage('Custom event');

captureEvent($event);
Capturing Last Error
```

Capture the last PHP error.
---------------------------

[](#capture-the-last-php-error)

```
use function Dock\Thor\captureLastError;

captureLastError();
```

Breadcrumbs
-----------

[](#breadcrumbs)

Breadcrumbs help track application activity before an error occurs.

```
use function Dock\Thor\addBreadcrumb;

addBreadcrumb(new Breadcrumb(
Breadcrumb::LEVEL_INFO,
    'auth',
    'User logged in'
));
```

Working with Scope
------------------

[](#working-with-scope)

Modify the current scope.

```
use function Dock\Thor\configureScope;

configureScope(function ($scope) {
    $scope->setTag('feature', 'payments');
});
```

Create a temporary scope:
-------------------------

[](#create-a-temporary-scope)

```
use function Dock\Thor\withScope;

withScope(function ($scope) {
    $scope->setTag('operation', 'import');
});
```

Transactions
------------

[](#transactions)

Start a transaction for performance tracing.

```
use function Dock\Thor\startTransaction;
use Dock\Thor\Tracing\TransactionContext;

$context = new TransactionContext();
$context->setName('order-processing');

$transaction = startTransaction($context);
```

License
=======

[](#license)

DockTHOR is open-source software licensed under the MIT license.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance85

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

75d ago

Major Versions

0.9.0 → 1.0.02026-03-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/ab12acda93236bdd0f4976f387bd99171d0becdf94af094b3f9663fb3e30753c?d=identicon)[Dock](/maintainers/Dock)

---

Top Contributors

[![JacekLabudda](https://avatars.githubusercontent.com/u/109294766?v=4)](https://github.com/JacekLabudda "JacekLabudda (4 commits)")

---

Tags

logloggingerror-handlererror-monitoringcrash-reportingcrash-reportsbugs

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/dockcodes-dock-thor/health.svg)

```
[![Health](https://phpackages.com/badges/dockcodes-dock-thor/health.svg)](https://phpackages.com/packages/dockcodes-dock-thor)
```

###  Alternatives

[sentry/sentry

PHP SDK for Sentry (http://sentry.io)

1.9k227.1M273](/packages/sentry-sentry)[sentry/sentry-laravel

Laravel SDK for Sentry (https://sentry.io)

1.3k114.3M154](/packages/sentry-sentry-laravel)[sentry/sdk

This is a meta package of sentry/sentry. We recommend using sentry/sentry directly.

328134.8M151](/packages/sentry-sdk)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2322.9M248](/packages/open-telemetry-sdk)[stayallive/wp-sentry

A (unofficial) WordPress plugin to report PHP and JavaScript errors to Sentry.

379197.9k](/packages/stayallive-wp-sentry)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
