Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Model.beforeSave to execute closure to satisfy injection requirements #90

Merged
merged 4 commits into from
Nov 18, 2023
Merged

Conversation

jharder
Copy link
Contributor

@jharder jharder commented Oct 24, 2023

I wanted to record the userID on some conditional events, such as if a SoftDeleteTrait was used where the deleted field became set.

Tests have been updated to include test cases, and README has a new example showing possible usage.

@ADmad ADmad changed the title Allow Model.beforeFind to execute closure to satisfy injection requirements Allow Model.beforeSave to execute closure to satisfy injection requirements Oct 25, 2023
@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1d0ccf6) 76.92% compared to head (19e5b08) 78.50%.
Report is 4 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master      #90      +/-   ##
============================================
+ Coverage     76.92%   78.50%   +1.58%     
- Complexity       42       45       +3     
============================================
  Files             4        4              
  Lines           104      107       +3     
============================================
+ Hits             80       84       +4     
+ Misses           24       23       -1     
Files Coverage Δ
src/FootprintPlugin.php 0.00% <ø> (ø)
src/Model/Behavior/FootprintBehavior.php 95.89% <100.00%> (+1.60%) ⬆️

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

@ADmad ADmad merged commit 10b17a1 into UseMuffin:master Nov 18, 2023
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.

2 participants