Download the PHP package shellrent/kraken-client without Composer

On this page you can find all versions of the php package shellrent/kraken-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 kraken-client

Last version Php version


kRAKEN is an application for tracking and managing errors issued by external applications

This library provides a PHP client API to facilitate calls to kRAKEN and an integration for the Laravel and Phalcon frameworks

The integrations add an ExceptionHandler, which carries out a complete report of unhandled exceptions and a Logger, which allows you to use the kRAKEN system for receiving and archiving log messages

Table of Contents

Get Started

Requires PHP 8.1+

First, install Kraken Client via the Composer package manager:

Then interact with kRAKEN's API to send a report:

To generate a standard report starting from an exception, simply use the specific ReportBuilder method:

Laravel

Requires Laravel 10.x

Laravel 9.x

Previous or later versions have not yet been tested

use on other versions is possible at your own risk

There is an integration with the Laravel framework

The Laravel package provides an ExceptionHandler and registers the client API and a psr style logger in the service container

Integration (Laravel)

To make the package work, you need to add the following settings to the .env file:

To be able to send reports via queue you must specify the name of the queue to use in the .env file, you can use the "default" value to use the standard queue

It is possible to test the connection to kraken and that the configurations are correct, using the command:

ExceptionHandler Usage (Laravel)

To enable exception reporting via the Exception Handler, you need to set the ExceptionHandler in the file bootrstrap/app.php, overriding the current configuration:

It is possible to decide on which environments to activate the sending of reports by modifying enabled_envs in the config file; by default only the production environment is enabled

By default the package does not send the information of the logged in user, they can be added by setting user_report_builder in the configuration file, with a callable that returns this information

For more details see laravel customization

Logger Usage (Laravel)

It is possible to send single reports and logs via KrakenLogger using its Facade:

Instead, to use kraken through the Laravel logging system, you can add kraken as a custom channel in the config/logging.php configuration file

It can also be added to the stack channel along with other channels

The kraken log channel can be used as a replacement for the ExceptionHandler, simply set 'report_exceptions' => true in the configuration

WARNING

Use the ExceptionHandler and the log channel with set 'report_exceptions' => true at the same times, duplicates the reports sent in case of an exception

Customization (Laravel)

To be able to modify the configuration you must first publish it via the command:

From the file created in config/kraken.php you can edit:

For more details see the configuration file

Phalcon

Requires Phalcon 5.1

Previous or later versions have not yet been tested

use on other versions is possible at your own risk

There is an integration with the Phalcon framework

The integration with Phalcon provides an ExceptionHandler and allows you to obtain the configuration and a psr style logger via the DI container of the framework

Integration (Phalcon)

To make the package work, you need to add the following settings to the .env file:

ExceptionHandler Usage (Phalcon)

To send exception reports it is necessary to integrate the ExceptionHandler provided in the phalcon package with the one used by the application

It is possible to decide on which environments to activate the sending of reports, passing the collections of environments to the ExceptionHandler. By default the activated environment is production

The handler handles both exceptions and php errors

You can add session parts to the report via the addSessionKey method

Furthermore, it is possible to hide specific information in the report by passing the key or the value that identifies it. Useful if sensitive data is present in $_SERVER or other collections

By default the package does not send the information of the logged in user, they can be added by setting userDataGetter property in the configuration object, with a callable that returns this information

For more details see phalcon customization

Logger Usage (Phalcon)

It is possible to send single reports and logs via KrakenLogger using KrakenService:

Customization (Phalcon)

It is not necessary for correct working, but in order to customize the behavior of the package, the services need to be registered in the DI

The config object can be customized for change:

For more details see the configuration class


All versions of kraken-client with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
guzzlehttp/guzzle Version ^7.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 shellrent/kraken-client contains the following files

Loading the files please wait ....