A Freemium package to help you tracking your project errors
dev-develop
2024-05-30 18:10 UTC
Requires
- php: ^7.3|^7.4|^8.0|^8.1
- guzzlehttp/guzzle: ^7.5
- illuminate/container: ^8.83|^9.28
- illuminate/http: ^8.8|^9.28
- illuminate/support: ^6.9|^7.0|^8.0|^9.0
- spatie/backtrace: ^1.2 <1.6.0
- symfony/console: v5.4|v6.1
- symfony/dotenv: v5.4|v6.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- mockery/mockery: ^1.5
- phpmd/phpmd: ^2.9
- phpunit/phpunit: ^9.3.3
- squizlabs/php_codesniffer: ^3.6
This package is auto-updated.
Last update: 2024-12-19 21:34:58 UTC
README
Cockpit is a beautiful error tracking package that will help your software team to track and fix errors.
Composer Installation
This package is compatible with PHP 7.3 or greater.
Add these lines to the composer.json file in your project root:
"repositories": [ { "type": "composer", "url": "https://devsquad.repo.repman.io" } ]
Create the auth.json file with this content in your project root:
{ "http-basic": { "devsquad.repo.repman.io": { "username": "1fc2d46ccf0406664c6427da36c26c3bebadd220b86ff7aed078def2ca03ebd6", "password": "1fc2d46ccf0406664c6427da36c26c3bebadd220b86ff7aed078def2ca03ebd6" } } }
Now you can install the package:
composer require devsquad-cockpit/php
Configuration
So that the cockpit can send the errors to the application you need to define this environment configuration in your .env file
COCKPIT_DOMAIN=http://fake-cockpit.app/ COCKPIT_TOKEN=project-token
Testing
You're able to send a fake error to the Cockpit as a test by running this command:
./vendor/bin/cockpit test
Set logged user
Using the function below when reporting an error, the cockpit will send the data of the logged in user according to what was returned by Closure.
Cockpit::setUser(function() { return ['name'=>'name', 'email'=>'user@email.com'...]; });