Download the PHP package 1eonardo-dev/monitoring-client-legacy without Composer
On this page you can find all versions of the php package 1eonardo-dev/monitoring-client-legacy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download 1eonardo-dev/monitoring-client-legacy
More information about 1eonardo-dev/monitoring-client-legacy
Files in 1eonardo-dev/monitoring-client-legacy
Package monitoring-client-legacy
Short Description Legacy PHP client (PHP 5.6) for reporting events (crash/exception/log) to Monitoring Platform.
License MIT
Informations about the package monitoring-client-legacy
Monitoring Platform Client (Legacy)
A PHP 5.6 client for reporting events (crashes, exceptions, logs) to Monitoring Platform, for legacy projects that cannot yet run the modern package.
Warning: PHP 5.6 has been end-of-life since 2018 and no longer receives security patches. This package exists only to provide backward compatibility for legacy projects. The recommended path is to migrate to PHP 7.4+ and use the
1eonardo-dev/monitoring-clientpackage instead.
The two packages
If you are on PHP 7.4+, use the modern package instead:
| Package | PHP | Framework adapters | Type hints |
|---|---|---|---|
1eonardo-dev/monitoring-client |
7.4+ | Laravel & Yii2 | Yes |
1eonardo-dev/monitoring-client-legacy |
5.6+ | None (pure PHP) | No |
Requirements
- PHP 5.6 or later.
Installation
Quick start
Differences from the modern package
- Uses
Exceptioninstead ofThrowable(PHP 5 has noThrowable), so it cannot catch fatal PHP 7+ errors. - No scalar type hints or return types (docblocks only).
- No framework adapters (pure PHP; no Laravel/Yii2 integration).
- No mandatory Composer dependencies.
API
MonitoringClient
| Method | Description |
|---|---|
captureException(Exception $e, array $context = array(), $level = null) |
Report an exception. |
captureMessage($message, $level = 'info', array $context = array()) |
Report a log message. |
captureEvent(Event $event) |
Report a custom event. |
send(array $data) |
Low-level send with a raw payload. |
DTOs
Event— value object for the event payload (type,level,message,platform,version,fingerprint,context).Config— groups the connection parameters (baseUrl,apiKey,platform,version,timeoutSeconds,path).
Custom endpoint path
By default events are sent to {baseUrl}/api/v1/events. You can change the
path via the path argument (or the path key in Config::fromArray):
Custom transport
Implement LeonardoDev\Monitoring\Legacy\Transport\Transport to use your own
HTTP client:
Tests
Changelog
See CHANGELOG.md.
License
MIT. See LICENSE.