Download the PHP package wyox/laravel-gitlab-reporter without Composer
On this page you can find all versions of the php package wyox/laravel-gitlab-reporter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wyox/laravel-gitlab-reporter
More information about wyox/laravel-gitlab-reporter
Files in wyox/laravel-gitlab-reporter
Package laravel-gitlab-reporter
Short Description Creates Gitlab Issues when Exceptions are thrown
License MIT
Informations about the package laravel-gitlab-reporter
Laravel Gitlab Report
Create issues for Exceptions that happen on your servers.
This package will create issues in your Gitlab project if Exceptions occur and will post some more debug information to the issue to help you solve problems.
This package will contact your Gitlab server and checks if an exception has occurred before based on a generated identifier hash in the issue description. Don't remove this line in the description as it will be the only way for this package to validate if an exception occurred before.
Gitlab version 9 or higher required.
Installation
Install with composer
To use the Gitlab reporter you need to do the following with Laravel 11
Open your bootstrap/app.php
and add the code shown below that is between the comment to the withExceptions closure
For Laravel 9, 10 use you should change the following in your app/Exceptions/Handler.php
file in your Laravel
project
Now setup your .env file to include the following variables:
I would suggest making a separate user account for the reporter and only let it access Issues and allow it for issue creation. This way you can ensure if your server or code gets compromised you won't give full access to the server
To retrieve an access token go to your gitlab server to profile/personal_access_tokens
and generate a token for using
the API
For your Project ID you need to go to your project -> Settings -> General -> General Project settings. There should be a box with Project ID
Adding labels to issues
Adding labels to newly created issues is easy, just add a comma-separated list to GITLAB_REPORT_LABELS=
If the labels don't exist in Gitlab they will be automatically created.
Ignoring certain exceptions
Make sure you publish the config as setting exceptions is not possible using an .env file
A file called gitlab-report.php will be created there and you can change settings there. A couple of exceptions have been added by default
Hiding fields in reports
In some cases you don't want reports to contain passwords of your clients. You can extend or replace values in the configuration file to include more fields that shouldn't show up in a report. All these fields will be replaced with [redacted]. Fields that are filled with null will also be replaced with [redacted]
All versions of laravel-gitlab-reporter with dependencies
illuminate/support Version ^9|^10|^11
m4tthumphrey/php-gitlab-api Version ^11.4
guzzlehttp/guzzle Version ^7.2
http-interop/http-factory-guzzle Version ^1.0