Skip to content

Rollbar Logs Errors Despite Being Disabled in Laravel 12 #659

@azgooon

Description

@azgooon

Description:
I’ve been trying to report this issue for a while but struggled to identify a consistent reproduction case until now. I’m using Laravel 12 with the latest versions of rollbar/rollbar-php and rollbar/rollbar-laravel. I believe the issue originates in the base rollbar-php package rather than the rollbar-laravel wrapper, as errors are logged to Rollbar despite it being disabled. Below are my config/logging.php and .env configurations for my local environment:

return [
    'default'           => env('LOG_CHANNEL', 'single'), 

    'channels'          => [
        'stack'             => [
            'driver'            => 'stack',
            'channels'          => env('LOG_STACK', 'single'),
            'ignore_exceptions' => false,
        ],
LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=single

The above configuration does not reference Rollbar, yet errors are intermittently logged to my Rollbar account. I’ve discovered that I can consistently reproduce this issue by calling dump() within a synchronous job, triggering an error every time.

<?php

namespace App\Jobs;

use Exception;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;

class DevJob_ implements ShouldQueue
{
    use Dispatchable;

    public function handle(): void
    {
        dump(['foo' => 'bar']);
    }
}

Then in web.php

Route::get('/dev-job', fn () => \App\Jobs\DevJob_::dispatchSync());

Please let me know if you need any additional information to investigate this issue. Thank you!

Metadata

Metadata

Assignees

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