Skip to content

[1.x] Fix abandoned-extensions sync never being scheduled#4706

Merged
imorland merged 1 commit into
1.xfrom
im/schedule-abandoned-fix
Jun 11, 2026
Merged

[1.x] Fix abandoned-extensions sync never being scheduled#4706
imorland merged 1 commit into
1.xfrom
im/schedule-abandoned-fix

Conversation

@imorland

Copy link
Copy Markdown
Member

Fixes #4705.

ExtensionServiceProvider registered the extensions:sync-abandoned command and its weekly schedule onto flarum.console.scheduled inside boot(). ConsoleServiceProvider::boot() is what consumes that array to build the Laravel schedule, and it is registered before ExtensionServiceProvider, so the entry was appended too late and the task was never scheduled. The weekly sync therefore never ran and the abandoned-extensions list was never refreshed.

This moves the flarum.console.commands and flarum.console.scheduled registrations into register(), which completes for all providers before any boot(), so the entry is present when the schedule is built. The Disabling event listener stays in boot() as it depends on the dispatcher.

Adds an integration test asserting extensions:sync-abandoned appears in schedule:list. The test fails on the current code and passes with the fix.

A 2.x port will follow.

The sync command was registered onto `flarum.console.scheduled` in
ExtensionServiceProvider::boot(). ConsoleServiceProvider consumes that array
in its own boot() and is registered first, so the entry was appended too
late and the task was never scheduled. Move the command and schedule
registration into register() so it is present when the schedule is built.

Fixes #4705
@imorland imorland requested a review from a team as a code owner June 11, 2026 16:14
@imorland imorland added this to the 1.8.17 milestone Jun 11, 2026
@imorland imorland merged commit 8d674b8 into 1.x Jun 11, 2026
409 checks passed
@imorland imorland deleted the im/schedule-abandoned-fix branch June 11, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant