- Is this package compatible with Laravel, or only OroCRM?
- This package is specifically designed for OroCRM (Symfony-based) and wraps the older `bugsnag/bugsnag-symfony` bundle (v1.x). While it *can* work in Laravel apps using Symfony components, you’ll need to manually adapt Oro-specific logic (e.g., entity events) or replace it with `bugsnag/bugsnag-laravel` for a native Laravel solution.
- What Laravel versions does this package support?
- The package requires PHP ≥5.6 and relies on Symfony 2/3 components, making it incompatible with modern Laravel (8.x+) or Symfony (5.4+) apps. If you’re on PHP 8.x, you’ll need to fork the package or use a newer BugSnag bundle like `bugsnag/bugsnag-symfony` (v3.x) instead.
- How do I install and configure this for OroCRM 2.x?
- Install via Composer: `composer require allies/oro-bugsnag`. Configure the `oro` Monolog channel to forward errors to BugSnag, then enable Oro-specific event listeners (e.g., `oro_entity.extend.entity.persist_after`) if you need CRM metadata in error reports. Follow the README for exact channel setup.
- Can I use this package in a non-OroCRM Laravel app?
- Technically yes, but it’s not plug-and-play. You’d need to replace Oro’s Monolog channel with Laravel’s default handlers, remove Oro-specific event listeners, and manually map Laravel’s error contexts (e.g., Eloquent model data) to BugSnag payloads. A better approach might be to use `bugsnag/bugsnag-laravel` directly.
- Why is this package outdated (last release in 2017)?
- The package depends on abandoned `bugsnag/bugsnag-symfony` v1.x, which is incompatible with modern Symfony/Laravel. The lack of updates and tests suggests it’s no longer maintained. For production use, consider forking it or switching to a supported alternative like `bugsnag/bugsnag-laravel` or `sentry/sentry-laravel`.
- How do I add custom CRM metadata (e.g., user IDs, entity data) to BugSnag reports?
- For OroCRM, leverage Oro’s event system (e.g., `oro_entity.extend.entity.persist_after`) to enrich BugSnag payloads with CRM-specific data. In non-Oro apps, manually bind Laravel events (e.g., `Model::saved()`) to append custom metadata to BugSnag’s context using the underlying Symfony bundle’s `setContext()` method.
- What are the risks of using this package in production?
- Key risks include: (1) PHP 5.6 dependency conflicts with modern Laravel, (2) untested reliability due to no CI or tests, (3) tight coupling to OroCRM internals (hard to adapt), and (4) reliance on an abandoned Symfony bundle. For critical apps, weigh these against alternatives like `bugsnag/bugsnag-laravel`.
- Can I downgrade PHP to 5.6 just for this package?
- Downgrading PHP is possible but not recommended for modern Laravel apps, which rely on PHP 8.x features. Instead, fork the package to update dependencies (e.g., switch to `bugsnag/bugsnag-symfony` v3.x) or replace it entirely. Test thoroughly after any changes.
- What alternatives should I consider for Laravel?
- For Laravel, prioritize `bugsnag/bugsnag-laravel` (official, actively maintained) or `sentry/sentry-laravel` (feature-rich). If using Symfony components, `bugsnag/bugsnag-symfony` (v3.x) is a direct drop-in. Avoid this package unless you’re locked into OroCRM 2.x and need its specific event integrations.
- How do I test this package before deploying to production?
- Since the package lacks tests, manually verify error logging by throwing exceptions in your OroCRM app and checking BugSnag’s dashboard. For Laravel adaptations, mock Monolog handlers and Symfony’s `HttpKernel` to simulate error contexts. Test edge cases like nested exceptions or custom metadata enrichment.