Skip to content

fix(discovery): log the exception when an event cannot be placed in WordPress cron - #52

Merged
ogorzalka merged 1 commit into
mainfrom
fix/log-schedule-exception
Dec 3, 2026
Merged

ogorzalka merged 1 commit into
mainfrom
fix/log-schedule-exception

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

ScheduleDiscovery::placeWordPressCron() caught ScheduleException and logged only the hook name, so the reason was lost (noted in Pollora/framework#740).

The log entry now carries the exception under the exception key of its context, as the catch of apply() and the other discoveries do. Message and caught type are unchanged, no public API change.

The existing test it logs an event the driver refuses now requires the thrown exception in the context; it fails without the change.

composer qa:fast and composer qa pass (PHP 8.5, 2G; npm audit and performance budgets are skipped by the profile). Not tried in a running WordPress; mutation score not measured.

@ogorzalka
ogorzalka merged commit 8fd5ae8 into main Dec 3, 2026
18 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.

1 participant