Skip to content

MonitoredMiddleware crashes if probe is not present #71

Description

@Pixelshaped

Following the Symfony Messenger configuration https://docs.blackfire.io/php/integrations/symfony/messenger

framework:
  messenger:
    buses:
      messenger.bus.default:
        middleware:
          - 'Blackfire\Bridge\Symfony\MonitoredMiddleware'

services:
  Blackfire\Bridge\Symfony\MonitoredMiddleware: ~

I've got a crash in MonitoredMiddleware at line 32: Class "BlackfireProbe" not found.

And it's true: on my local machine, I don't have the probe installed.

I fixed it by adding

when@prod:

So that MonitoredMiddleware only works on my prod env.

But I still think that if phpversion('blackfire') returns false, it should fail silently or log.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions