-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
PHP7.2 count fixes #5427
PHP7.2 count fixes #5427
Conversation
This is still failing on travis for 7.2, but for the same weird updated_at reasons that it usually fails for. I'm not really sure why we're getting a off-by-one-second Carbon parse, TBH... It doesn't really make sense. |
Looks good to me. I wonder if any of these placed would benefit from a withCount()/counting on the db side instead of ->count on the fetched collection? Not sure if theres a performance difference. |
Testing linking back from discourse. Ignore this :) |
|
||
$total = count($fields); | ||
return (new CustomFieldsTransformer)->transformCustomFields($fields, $total); | ||
return (new CustomFieldsTransformer)->transformCustomFields($fields, $fields->count()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing linking back from discourse via commit comment. Ignore this :)
http://discourse.snipeitapp.com/t/this-is-a-test-post-in-bug-reports/17/2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Helps if I use the right url
http://discourse.snipeitapp.com/t/this-is-a-test-post-in-bug-reports/17
This pull request has been mentioned on Snipe-IT Discussion. There might be relevant details there: http://discourse.snipeitapp.com/t/testing-the-gh-linkback-plugin/28/1 |
This should fix some of the count errors we're running into when the object being counted is null. I've re-enabled travis tests for 7.2 for now so we can track down places I missed.
@dmeltzer @uberbrady if either/both of you could eyeball this, seeing as it's 3:22AM, I might have donked something up :)