Skip to content

[Cron Monitoring] Getting error "Method Illuminate\Support\Str::replace does not exist" #761

@fredericgboutin-yapla

Description

@fredericgboutin-yapla

How do you use Sentry?

Sentry SaaS (sentry.io)

SDK version

3.7.3

Steps to reproduce

I simply followed the instructions https://docs.sentry.io/platforms/php/guides/laravel/crons/ basically adding ->sentryMonitor() calls to my scheduled commands.

Expected result

Well, the whole thing ended up generating a Sentry event 😅 pointing to this code,

It seems Str::replace was introduced in Laravel 8.41.0 https://github.com/laravel/framework/releases/tag/v8.41.0 but the current composer dependency requirements for this projet includes support for Laravel 6, which I'm shamefully using at the moment but doesn't provide an implementation for Str::replace

Actual result

As a workaround, I suppose I should explicitly provide a monitorSlug to avoid this error and make it work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions