-
Notifications
You must be signed in to change notification settings - Fork 120
Symfony auto instrumentation improvements #120
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
Conversation
Make class final Calculate content length if header don't exist
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #120 +/- ##
============================================
- Coverage 52.82% 52.72% -0.10%
- Complexity 445 447 +2
============================================
Files 48 48
Lines 1683 1686 +3
============================================
Hits 889 889
- Misses 794 797 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
| $contentLength = $response->headers->get('Content-Length'); | ||
| /** @psalm-suppress PossiblyFalseArgument */ | ||
| //BinaryFileResponse and StreamedResponse return boolean as response | ||
| if (null === $contentLength && is_string($response->getContent())) { |
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.
Don't know if that may happen, but what in the case when Content-length header is not provided and $response->getContent() returns false ?
Otherwise LGTM.
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.
it's set null as before - default value for $response->headers->get(), I added tests that cover this case and also removed some redundant parameters.
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.
I missed test. I was just thinking if it makes sense to set this attribute in this case
Hi, I add more Symfony instrumentation improvements:
Big clap for your work, all works perfect 🎉