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

Fix query count #777

Merged
merged 6 commits into from
Nov 16, 2023
Merged

Fix query count #777

merged 6 commits into from
Nov 16, 2023

Conversation

Tigrov
Copy link
Member

@Tigrov Tigrov commented Nov 15, 2023

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues #753

Copy link

codecov bot commented Nov 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (437c629) 98.47% compared to head (17c924b) 99.64%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #777      +/-   ##
============================================
+ Coverage     98.47%   99.64%   +1.16%     
- Complexity     1271     1272       +1     
============================================
  Files            67       63       -4     
  Lines          3080     3061      -19     
============================================
+ Hits           3033     3050      +17     
+ Misses           47       11      -36     

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

Copy link

what-the-diff bot commented Nov 15, 2023

PR Summary

  • Workflow Environment Variable Updates
    In this pull request various workflow files were updated, specifically within the .github/workflows directory. The changes relate to a modification in the environment variable COMPOSER_ROOT_VERSION, which was updated to 1.2.0 from 1.0.0. This change affects the versions used during CI/CD operations, aiming to improve compatibility and performance.

  • Bug Fix in CHANGELOG
    Updates were made to the CHANGELOG.md file, including a new bug fix under version 1.2.1. The said bug fix resolves an issue (Fix query count #777) related to the Query::count() method, which inaccurately returned the count if the output exceeded PHP_INT_MAX.

  • Improvement of Query.php Method
    Modifications were made to the count() method found in src/Query/Query.php file to better manage situations where results surpass PHP_INT_MAX. Now, instead of construing the count as an integer, it will transmit the count as a string in these scenarios, helping to maintain accuracy.

  • New Test Case
    A fresh test case was added to the tests/AbstractQueryTest.php file to check how the improved count() method performs when the result exceeds PHP_INT_MAX. The test sets up a pseudo instance of the Query class and anticipates the queryScalar() method to revert with a string value of 12345678901234567890. Consequently, the revised count() method is expected to return a string value in such cases, ensuring faithful representation of results.

@Tigrov Tigrov marked this pull request as ready for review November 15, 2023 14:01
@Tigrov Tigrov added the status:code review The pull request needs review. label Nov 16, 2023
CHANGELOG.md Outdated Show resolved Hide resolved
@vjik vjik merged commit 6845a40 into master Nov 16, 2023
169 of 171 checks passed
@vjik vjik deleted the fix-query-count branch November 16, 2023 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:code review The pull request needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants