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(4mo ago)028↓92.3%Apache-2.0PHPPHP ^8.2

Since Mar 4Pushed 4mo 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 today

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

38

—

LowBetter than 83% of packages

Maintenance78

Regular maintenance activity

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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

120d ago

Major Versions

0.9.0 → 1.0.02026-03-04

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/33914726?v=4)[Sam](/maintainers/Dock)[@Dock](https://github.com/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.9k247.1M333](/packages/sentry-sentry)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M736](/packages/sylius-sylius)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28150.5k](/packages/phpro-http-tools)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)

PHPackages © 2026

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