Skip to content

State machine#333

Merged
rmcdaniel merged 4 commits intomasterfrom
feature/model-states
Feb 23, 2026
Merged

State machine#333
rmcdaniel merged 4 commits intomasterfrom
feature/model-states

Conversation

@rmcdaniel
Copy link
Member

  • Promotes the internal state machine fixture to a component.
  • Uses it instead of external dependency.

@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (bb2c33c) to head (1e1964d).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##              master      #333    +/-   ##
============================================
  Coverage     100.00%   100.00%            
- Complexity       431       561   +130     
============================================
  Files             54        60     +6     
  Lines           1625      1925   +300     
============================================
+ Hits            1625      1925   +300     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rmcdaniel rmcdaniel merged commit 121bac8 into master Feb 23, 2026
3 checks passed
@rmcdaniel rmcdaniel deleted the feature/model-states branch February 23, 2026 08:52
@JustinElst
Copy link
Contributor

Hi, this looks good, but im missing the StateChanged event from the external dependency:

https://spatie.be/docs/laravel-model-states/v2/working-with-transitions/05-transition-events

https://github.com/spatie/laravel-model-states/blob/ce1a41b4fbdf58b28eacd04bb6a758d7057b50de/src/State.php#L197

https://github.com/spatie/laravel-model-states/blob/ce1a41b4fbdf58b28eacd04bb6a758d7057b50de/src/Events/StateChanged.php

Would you be open to have such an event (and maybe other helpful events) in the library?

I was using this event to broadcast the change of state and (hard)set the state in another model.

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.

2 participants