Download the PHP package shiftonelabs/php-rollbar-extensions without Composer

On this page you can find all versions of the php package shiftonelabs/php-rollbar-extensions. 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 php-rollbar-extensions

php-rollbar-extensions

Latest Version on Packagist Build Status Coverage Status Quality Score Total Downloads

This package provides extra strategies to be used with the Rollbar SDK for PHP. The base Rollbar SDK comes with some default strategies for truncation, but they don't always do everything that is needed. The configuration allows for specifying custom strategies for transforming, truncating, etc, and this package aims to provide some of these custom strategies.

Install

Via Composer

Configuration

Rollbar configuration is dependent on the framework/application being used.

Rollbar documentation for installing rollbar for PHP: https://docs.rollbar.com/docs/php

Rollbar configuration options: https://docs.rollbar.com/docs/php-configuration-reference

Usage

This package provides a set of classes that can be provided to the Rollbar configuration. For the most part, usage of this queue driver is the same as the built in queue drivers. There are, however, a few extra things to consider when working with Amazon's SQS FIFO queues.

Custom Data Method

Allows creating dynamic custom data on runtime during error reporting. The callable taking two parameters $toLog (the context of what's being logged) and $context (additional context data provided in the config). You provide $context by adding custom_data_method_context key to the $extra or $context parameters Rollbar::log or RollbarLogger::log.

-- Rollbar config reference

To specify a custom data method to use, set the custom_data_method key of the Rollbar config to a new instance of an invocable Custom Data Method class. These classes should implement the \ShiftOneLabs\PhpRollbarExtensions\CustomDataInterface interface.

No custom data methods available yet.

Custom Truncation

A fully qualified name of your custom truncation strategy class. It has to inherit from \Rollbar\Truncation\AbstractStrategy. This custom strategy will be applied before the built-in strategies.

-- Rollbar config reference

To specify a custom truncation to use, set the custom_truncation key of the Rollbar config to the fully qualified name of the class to use.

No custom truncation methods available yet.

Transformers

From Rollbar:

The class to be used to transform the payload before it gets prepared for sending to Rollbar API. It has to implement \Rollbar\TransformerInterface.

-- Rollbar config reference

To specify a transformer to use, set the transformer key of the Rollbar config to the fully qualified name of the class to use.

Available transformers:

Transformer Description
AddExceptionPropertiesTransformer Adds all properties of the exception to the Rollbar log.

AddExceptionPropertiesTransformer

When an exception is logged to Rollbar, only the basic exception information is sent to Rollbar (exception name, message, code, line number, file, previous exception, and stack trace). However, if you have created a custom exception with additional properties, the values of those properties are not sent to Rollbar by default. Sometimes this information is very valuable in attempting to debug the issue.

The AddExceptionPropertiesTransformer transformer will add all data stored on the exception to the "custom" element of the Rollbar payload, under a new "properties" key. This includes all defined public, protected, and private properties, as well as any properties dynamically assigned at runtime. This transformer also traverses the exception chain, so all the properties for the set "previous" exceptions will be reported, as well. This custom data will be displayed in Rollbar for each occurrence.

Example configuration: 'transformer' => \ShiftOneLabs\PhpRollbarExtensions\Transformers\AddExceptionPropertiesTransformer::class

Contributing

Contributions are welcome. Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of php-rollbar-extensions with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
rollbar/rollbar Version >=1.2.0
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 shiftonelabs/php-rollbar-extensions contains the following files

Loading the files please wait ....