Skip to content

Keep driver tap callbacks separate - #26

Merged
stevebauman merged 1 commit into
masterfrom
fix/isolated-driver-taps
Oct 24, 2026
Merged

stevebauman merged 1 commit into
masterfrom
fix/isolated-driver-taps

Conversation

@stevebauman

Copy link
Copy Markdown
Member

Registering a RecurrSchedule::tap() callback also changes the callback used by the Cron and php-rrule drivers. They share one inherited static property, so typed callbacks can throw a TypeError, and registering or clearing one driver's callback overwrites the others.

Store callbacks by concrete driver class so each driver can be configured and reset independently. Subclasses are isolated as well. The tap() API and callback arguments stay the same.

Validated with the full Pest suite (143 tests) and Pint.

Fixes #20.

@stevebauman
stevebauman merged commit 9dac062 into master Oct 24, 2026
7 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.

Keep driver tap callbacks separate for each driver class

1 participant