Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.x] Fix withoutOverlapping via PendingEventAttributes proxy #53553

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

istiak-tridip
Copy link
Contributor

This PR addresses a bug with the withoutOverlapping method when used through the PendingEventAttributes proxy.

Example Code:

Schedule::runInBackground()
    ->withoutOverlapping()
    ->everyMinute()
    ->command('inspire');

The above throws the following exception:

Undefined property: Illuminate\Console\Scheduling\PendingEventAttributes::$mutex, vendor/laravel/framework/src/Illuminate/Console/Scheduling/ManagesAttributes.php, 145

This issue occurs during schedule execution, not at Event instance creation, so existing tests didn’t catch it.


Thanks to @decadence for reporting this bug.

@decadence
Copy link
Contributor

decadence commented Nov 18, 2024

Yes. With this fix Schedule doesn't throw Exception 👍

@taylorotwell taylorotwell merged commit 60ffb04 into laravel:11.x Nov 18, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants