Download the PHP package codekandis/sentry-client without Composer

On this page you can find all versions of the php package codekandis/sentry-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sentry-client

codekandis/sentry-client

Minimum PHP Version Code Coverage

codekandis/sentry-client is a wrapper library for the Sentry SDK package getsentry/sentry-php, currently supporting the Sentry SDK version 2.x. It provides the functionality of the wrapped package by an object-oriented API.

Index

Installation

Install the latest version with

How to use

Create a configuration

There's two possibilites.

Use the default configuration

For convenience the default configuration SentryClientConfiguration implements the fluent interface.

Implement the configuration interface on your own

The SentryClientConfigurationInterface. So you are enabled to implement a configuration on your own.

Instantiate the Sentry Client

As soon as the display_errors, once set to true, will take effect in displaying all captured events. So besides errors and exceptions manually captured messages are displayed as well.

Capturing events

There are two methods of capturing messages, errors and exceptions - so-called events in terms of Sentry.

Manual capturing

Messages
Errors

Only the last occured error can be captured.

Exceptions

Automatic Capturing

The SentryClient comes with built-in error and exception handlers. Once the automatic capturing of events is enabled the occured events will be captured by that handlers and sent to your configured Sentry instance.

To enable the automatic capturing you just have to call SentryClient::register().

Using custom error and exception handlers

In case you have already set your own error or exception handlers, registering the SentryClient for automatic capturing won't affect them being executed.

The Sentry Client pushes its own handlers on top of its internal managed stack of handlers. So the error and exception handlers are executed in the following order:

  1. the SentryClient handler
  2. the wrapped Sentry SDK handler
  3. your custom handler

So it's guaranteed all events will be sent to your Sentry instance and your handlers are executed as well.

Testing

To get the integration tests running some settings must be made in the TestConstants. All necessary information can be found in your Sentry instance.

Depending on the workload of your Sentry instance your events may not be fetchable immediately by the API. So a proper TestConstants::EVENT_PROCESSING_THRESHOLD in seconds must be set.

Due to the nature of the wrapped Sentry SDK executing all test cases at once causes some integration tests to fail. Some necessary test outputs mess up with the following tests. It's recommended to run all single tests in the test case SentryClientInterfaceTest manually one by one.


All versions of sentry-client with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
codekandis/constants-classes-translator Version ^1
sentry/sdk Version ^2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package codekandis/sentry-client contains the following files

Loading the files please wait ....