Download the PHP package itsmill3rtime/sentry-laravel-5-7 without Composer

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

Sentry for Laravel

Build Status Total Downloads Downloads per month Latest stable version License

Laravel integration for Sentry.

Laravel Version Compatibility

Installation

Laravel 5.x

Install the sentry/sentry-laravel package:

If you're on Laravel 5.4 or earlier, you'll need to add the following to your config/app.php:

Add Sentry reporting to app/Exceptions/Handler.php:

Create the Sentry configuration file (config/sentry.php):

Add your DSN to .env:

Note: If you use SENTRY_DSN in your .env it will overwrite the DSN value set in the config/sentry.php file.

Laravel 4.x

Install the sentry/sentry-laravel package on version 0.8.* since it's the last version to support Laravel 4:

Add the Sentry service provider and facade in config/app.php:

Create the Sentry configuration file (config/sentry.php):

Lumen 5.x

Install the sentry/sentry-laravel package:

Register Sentry in bootstrap/app.php:

Add Sentry reporting to app/Exceptions/Handler.php:

Create the Sentry configuration file (config/sentry.php):

Testing with Artisan

You can test your configuration using the provided artisan command:

Adding Context

The mechanism to add context will vary depending on which version of Laravel you're using, but the general approach is the same. Find a good entry point to your application in which the context you want to add is available, ideally early in the process.

In the following example, we'll use a middleware:

Displaying the error ID

When something goes wrong and you get a customer email in your inbox it would be nice if they could give you some kind of identitifier for the error they are seeing.

Luckily Sentry provides you with just that by adding one of the following options to your error view.

This could look something like this in for example your resources/views/error/500.blade.php:

This ID can be searched for in the Sentry interface allowing you to find the error quickly.

Using Laravel 5.6 log channels

To configure Sentry as a log channel add the following config to the channels section in config/logging.php:

After you configured the Sentry log channel you can configure your app to both log to a log file and to Sentry by modifiying the log stack:

Optionally you can set the logging level and if events should bubble on the driver:

Resolve name conflicts with packages also called Sentry

To resolve this you will need to create your own service provider extending ours so we can prevent naming conflicts.

You can then add this service provider to the config/app.php.

Optionally if you want to use the facade you also need to extend / create a new facade.

And add that facade to your config/app.php.

After you added your own service provider, running php artisan vendor:publish --provider="App\Support\SentryLaravelServiceProvider" publishes the Sentry config file to your chosen name (in the example above config/sentry-laravel.php) preventing conflicts with a config/sentry.php config file that might be used by the other package.

If you followed the regular installation instructions above (you should), make sure you replace app('sentry') with app('sentry-laravel').

The namespace \App\Support can be anything you want in the examples above.

Note: If you are on Laravel 5.5+ the Sentry package is probably auto discovered by Laravel, to solve this add or append to the extra section in your composer.json file and run composer update/install afterwards:

Contributing

Dependencies are managed through composer:

Tests can then be run via phpunit:

Community


All versions of sentry-laravel-5-7 with dependencies

PHP Build Version
Package Version
Requires php Version ^5.4||^7.0
sentry/sentry Version ^1.9.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 itsmill3rtime/sentry-laravel-5-7 contains the following files

Loading the files please wait ....