Download the PHP package nadar/yii2-sentry without Composer

On this page you can find all versions of the php package nadar/yii2-sentry. 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 yii2-sentry

Sentry for Yii2

Yii2 Sentry integration with log target support for error tracking and monitoring.

Tests

[!IMPORTANT] Yii might look inactive, but it is still used a lot. This Sentry extension is actively supported, works with current PHP versions, and supports the latest Sentry SDK options.

Requirements

Installation

Install via Composer:

Configuration

Basic Configuration

Configure the Sentry component in your application config:

Console Test Command (Optional)

For console applications, you can add the Sentry test command to verify your integration:

Then test your Sentry integration by running:

This will send various test events to Sentry including exceptions, messages with different severity levels, log events, and events with custom context data. Check your Sentry dashboard to verify the events appear correctly.

Log Target Configuration

Add the Sentry log target to your log component:

Verifying Installation

After installing and configuring the package, you can verify that Sentry is working correctly:

  1. Configure the Sentry component in your config/console.php (for console apps) or config/web.php (for web apps)
  2. Add the test command to your console config (see Console Test Command section below)
  3. Run the test command:

  4. Check your Sentry dashboard at https://sentry.io/ to see the test events

The test command will send multiple test events including exceptions, messages, and events with custom context to help you verify your integration is working correctly.

Configuration Options

Sentry Component Options

Log Target Options

Usage

Manual Exception Capture

You can manually capture exceptions or messages:

Manual Message Capture

Using Yii2 Logger

The log target will automatically capture messages logged through Yii2's logger:

Extra Callbacks

Both the Sentry component and SentryTarget support extraCallback functions to add custom context data to events. When both callbacks are defined, they are merged together with the SentryTarget callback taking precedence.

Define a global extraCallback in the Sentry component to add context data to ALL events:


All versions of yii2-sentry with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4|^8.5
sentry/sentry Version ^4.19
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 nadar/yii2-sentry contains the following files

Loading the files please wait ...