Giter Site home page Giter Site logo

bugsnag / bugsnag-silex Goto Github PK

View Code? Open in Web Editor NEW
9.0 31.0 5.0 85 KB

The BugSnag middleware for Silex. Monitor and report errors in your Silex PHP apps.

Home Page: https://docs.bugsnag.com/platforms/php/silex

License: MIT License

PHP 87.46% Makefile 2.37% HTML 10.16%
php silex crash error-monitoring error-reporting error-handling errors debugging-tool debugging-tools crash-reporting

bugsnag-silex's Introduction

Bugsnag exception reporter for Silex

Build Status StyleCI Status Documentation

The Bugsnag Notifier for Silex gives you instant notification of errors and exceptions in your Silex PHP applications. We support both Silex 1 and 2. Learn more about monitoring and reporting errors in your Silex PHP apps with Bugsnag.

Features

  • Automatically report unhandled exceptions and crashes
  • Report handled exceptions
  • Attach user information and custom diagnostic data to determine how many people are affected by a crash

Getting started

  1. Create a Bugsnag account
  2. Complete the instructions in the integration guide
  3. Report handled exceptions using Bugsnag::notify()
  4. Customize your integration using the configuration options

Support

Contributing

All contributors are welcome! For information on how to build, test, and release, see our contributing guide.

License

The Bugsnag Silex library is free software released under the MIT License. See LICENSE.txt for details.

bugsnag-silex's People

Contributors

cawllec avatar fractalwrench avatar gracecheung avatar grahamcampbell avatar kattrali avatar kyrylo avatar snmaynard avatar steve-nester-uk avatar tomlongridge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bugsnag-silex's Issues

Uncaught Error: Unsupported operand types in <app>/vendor/bugsnag/bugsnag-silex/src/Request/SilexRequest.php:74

In SilexRequest, this library does the following:

$data['params'] = $this->getInput() + $this->request->query->all();

The call to $this->request->query->all() will always return an array - so far so good. But, in the case of a JSON request payload, the return type of getInput() can be anything that json_decode returns (and is under the control of the client):

// in getInput()
if (is_array($parsed = json_decode($this->request->getContent(), true))) {
    return $parsed;
}

While some versions of JSON (e.g. https://tools.ietf.org/html/rfc4627: "A JSON text is a serialized object or array") specify that a JSON document must contain an object or array, PHP's json_decode has never followed this. So, the return value of json_decode() can be a bool, string, float, int, etc.

Using the + operator between a string and array causes a warning. Using the + operator between an int and array causes a fatal error:

Uncaught Error: Unsupported operand types in <app>/vendor/bugsnag/bugsnag-silex/src/Request/SilexRequest.php:74
Stack trace:
#0 <app>/vendor/bugsnag/bugsnag/src/Callbacks/RequestMetaData.php(38): Bugsnag\Silex\Request\SilexRequest->getMetaData()
#1 <app>/vendor/bugsnag/bugsnag/src/Middleware/CallbackBridge.php(40): Bugsnag\Callbacks\RequestMetaData->__invoke(Object(Bugsnag\Report))
#2 [internal function]: Bugsnag\Middleware\CallbackBridge->__invoke(Object(Bugsnag\Report), Object(Closure))
[...]

Can't get breadcrumbs to work

I suppose it depends on the version of bugsnag/bugsnag-php, I'm trying to use the breadcrumbs but it seems the leaveBreadcrumb() method doesn't event exist in Bugsnag's Client class.

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.