-
Notifications
You must be signed in to change notification settings - Fork 54
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
Strengthen type checking in AuditTrait #228
Conversation
6f4b028
to
088ebb1
Compare
Thanks @janklan, would you mind applying PHP-CS-Fixer ( |
Also, a test that emphasizes your fix would be greatly appreciated ;) |
I did it for you ;) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #228 +/- ##
==========================================
- Coverage 97.15% 96.81% -0.34%
==========================================
Files 42 42
Lines 1721 1792 +71
==========================================
+ Hits 1672 1735 +63
- Misses 49 57 +8 ☔ View full report in Codecov by Sentry. |
Hey Damien, thanks. TBH I did want to run the CS fixer etc., but I didn't get it working in the time I could spend on it on that day. I planned to get back to it later, so thanks for being faster and doing it instead of me! Does the cs fix tooling work, though? I tried the composer method and got yelled at because of old PHP CS Fixer not liking PHP 8.3, and the makefile method fails the same. BTW the Makefile is not mentioned anywhere, I didn't even notice it until now - poor attention on my end, I know, but maybe the contribution guide may need a bump. I'm getting:
|
Hi @janklan! |
Fixes #227
I'm between two minds whether (a) doing what I did is better than (b) tweaking
AuditTrait::deepDiff()
so that it can handle non-arrays. But then it's not a deep diff anymore, so changing the signature would justify changing the name. I went with (a) because it does the job, and the only other place wheredeepDiff
is used already enforces the correct data type.