- How do I install php-bug-catcher/bug-catcher in a Laravel app?
- Install it with composer require php-bug-catcher/bug-catcher. In Laravel, register the provided service provider if your app does not use package discovery, then adjust the package configuration for your reporting channels; the package is designed for minimal setup in normal Laravel workflows.
- What kinds of errors and exceptions does Bug Catcher capture?
- Bug Catcher captures PHP errors and Laravel exceptions by integrating with your existing exception handling. It records rich context such as request details, the current user, and stack information so failures are easier to inspect. It is intended to complement, not replace, your normal Laravel logging setup.
- Which Laravel versions are supported by php-bug-catcher/bug-catcher?
- The package is built for Laravel, but the exact supported Laravel and PHP versions should be checked in its composer.json and repository before installing. Confirm the constraints against your app version, especially before a major Laravel upgrade. If the constraints are not published clearly, test in a staging app first.
- How do I report captured bugs to logs, notifications, or a custom handler?
- Bug Catcher supports flexible reporting through logs, notifications, or custom handlers. You configure the reporting channel in the package configuration, and custom handlers let you forward bugs to your own service or workflow. Check the package docs for the exact handler registration steps.
- Can I filter or group bugs in production with Bug Catcher?
- Yes. The package includes production-ready hooks for filtering and grouping bugs, which helps suppress noise and keep similar failures together. Use these hooks per environment so staging can be verbose while production stays focused. Review filters after launch to avoid hiding real regressions.
- Does Bug Catcher work outside Laravel in plain PHP applications?
- It is described as a Laravel/PHP package with exception capture for PHP errors, but its documented setup is Laravel-friendly through configuration and a service provider. Plain PHP use may require manual wiring of the capture and reporting components. Confirm the non-Laravel path in the repository before relying on it.
- How can I test that Bug Catcher is capturing exceptions correctly?
- Throw a deliberate exception in a non-production environment and point reporting at a log or test handler. Then assert that the captured record includes the expected request, user, and stack context using your normal Laravel testing workflow. Avoid sending test failures to real notification channels or shared production logs.
- What context is included with each captured bug?
- Captured bugs include rich context such as request data, the current user, and stack details. That context makes failures easier to reproduce and debug, but it can also contain sensitive values. Review and redact context before enabling notifications or third-party reporting in production.
- Is Bug Catcher safe to use in production?
- Yes, it is designed with production-ready filtering and grouping hooks, but you should still configure reporting deliberately. Use environment-specific filters, avoid leaking sensitive request or user data, and test against staging traffic first. Monitor report volume after enabling it so alerts stay useful.
- How does Bug Catcher compare to Sentry, Flare, or Bugsnag?
- Bug Catcher is a lightweight option that plugs into Laravel exception handling and reports through logs, notifications, or custom handlers. Hosted tools like Sentry, Flare, and Bugsnag typically add dashboards, alerting, release tracking, and team workflows. Choose Bug Catcher when you want minimal setup and control over reporting; choose a hosted service when you need a full monitoring UI.