Skip to content

Conversation

jackbayliss
Copy link
Contributor

@jackbayliss jackbayliss commented Sep 30, 2025

When upgrading from 12.31 to 12.32 its stopping composer from updating:

> @php artisan package:discover --ansi

In CallbackEvent.php line 141:
                                                                               
  A scheduled event name is required to prevent overlapping. Use the 'name' m  
  ethod before 'withoutOverlapping'.                                           
                                                                               

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
                                   

This happens due to using Schedule::job within a group that uses withoutOverlapping and seems to have been introduced via #57156

This approach makes the event directly, and merges any pending attributes afterwards and ensures the name is set, which works as expected.

The alternative is to revert the above change, but then groups won't work as expected either 😢

Copy link

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@jackbayliss jackbayliss marked this pull request as ready for review September 30, 2025 17:39
@jackbayliss jackbayliss marked this pull request as draft September 30, 2025 18:19
@jackbayliss jackbayliss marked this pull request as ready for review October 1, 2025 09:45
@taylorotwell
Copy link
Member

@jamessa can you take a look at this please?

@jamessa
Copy link
Contributor

jamessa commented Oct 1, 2025

@taylorotwell I'v tested it - looks good to me.

@jackbayliss Good fix 👏. It might be worth a follow-up PR to merge this fix back to Schedule::mergePendingAttributes method by inserting $event->name($this->attributes?->description); as an one line fix.

This also fixes potential onOneServer issue.

The reason this backfires is that previously the event name was taken from the last pending attributes. The new implementation removes that reference, so the event name becomes null.

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