Giter Site home page Giter Site logo

Lumen support about laravel-airbrake HOT 7 CLOSED

theokouzelis avatar theokouzelis commented on June 20, 2024
Lumen support

from laravel-airbrake.

Comments (7)

TheoKouzelis avatar TheoKouzelis commented on June 20, 2024

Hi @wjgilmore

I have never used this package with Lumen, but having had a quick look at the docs, I can't see why the Service Provider wouldn't work in Lumen.

But in the case it didn't, the package supports direct instantiation to support custom Monolog configurations by passing the Application model into the AirbrakeHandler class.

But failing that, you could always just use Airbrakes package directly and just make sure you are filtering all the sensitive variables set in you .env file.

from laravel-airbrake.

cesuarez avatar cesuarez commented on June 20, 2024

Just a quick note. The package uses the function "config_path()", but Lumen does not have that by default. Adding the function to a helpers file and adding that to the autoload should do the trick.

from laravel-airbrake.

TheoKouzelis avatar TheoKouzelis commented on June 20, 2024

@cesuarez OK thanks I will take a look at that

from laravel-airbrake.

darkcarnage avatar darkcarnage commented on June 20, 2024

Hi,

Can someone give an example of Lumen integration ? I added config_path() function to a helpers.php file but still having the same error :

Uncaught Illuminate\Contracts\Container\BindingResolutionException: Unresolvable dependency resolving [Parameter #0 [ <required> $opt ]] in class Airbrake\Notifier in /vendor/laravel/framework/src/Illuminate/Container/Container.php:993

PS. It is the same error when using the Exception Handler or when calling php artisan vendor:publish --provider="Kouz\LaravelAirbrake\ServiceProvider"

Thanks.

from laravel-airbrake.

TDiblik avatar TDiblik commented on June 20, 2024

Hi @darkcarnage did you find a solution? I'm currently dealing with the same issue

Thanks

from laravel-airbrake.

darkcarnage avatar darkcarnage commented on June 20, 2024

Hi @TDiblik, no I finally switched to another error monitoring solution.

from laravel-airbrake.

TDiblik avatar TDiblik commented on June 20, 2024

Oh, okay, I was able to solve ti actually, by using: https://github.com/airbrake/phpbrake
I just putted this code:
`
// Create new Notifier instance.
$notifier = new Airbrake\Notifier([
'projectId' => 12345, // FIX ME
'projectKey' => 'abcdefg' // FIX ME
]);

// Set global notifier instance.
Airbrake\Instance::set($notifier);
Airbrake\Instance::notify($e);
`
inside the exception handler... Not the best practice but it works....
Just putting it out there if somebody finds out while looking for answear 👍

from laravel-airbrake.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.