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

#20055 Fix X-Pagination-Total-Count is always 0 #20070

Merged
merged 10 commits into from
May 16, 2024
Merged

Conversation

lav45
Copy link
Contributor

@lav45 lav45 commented Nov 17, 2023

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

Copy link

what-the-diff bot commented Nov 17, 2023

PR Summary

  • Refactoring ActiveDataProvider.php
    The code was simplified by removing unnecessary lines that were previously being used to count total items. This helps in making the program run faster and more efficiently.
  • Optimization in ArrayDataProvider.php
    The pagination process, which controls how items are displayed over several pages, has been improved. It now uses a more efficient method for handling the distribution of items.
  • Improving Conditionals in BaseDataProvider.php
    The process to check whether total count of items is established was restructured. This design tweak furthers optimization, by making the system smarter in how it handles counts of items.
  • Code Cleanup in SqlDataProvider.php
    Similar to the changes in ActiveDataProvider, redundant lines were removed, simplifying the process of gathering the total count of items. This contributes to overall efficiency in the SQL data handling process.

Copy link

codecov bot commented Nov 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.56%. Comparing base (8861f7b) to head (90b60c1).

❗ Current head 90b60c1 differs from pull request most recent head 7346a46. Consider uploading reports for the commit 7346a46 to get more accurate results

Additional details and impacted files
@@              Coverage Diff              @@
##             master   #20070       +/-   ##
=============================================
+ Coverage     13.49%   47.56%   +34.07%     
=============================================
  Files           430      445       +15     
  Lines         37068    43407     +6339     
=============================================
+ Hits           5002    20647    +15645     
+ Misses        32066    22760     -9306     

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

@samdark
Copy link
Member

samdark commented Nov 23, 2023

@lav45 how about #20060?

@lav45
Copy link
Contributor Author

lav45 commented Nov 24, 2023

@samdark This is a crutch that is long overdue for removal.

Take a look at the changes in tests/framework/data/ActiveDataProviderTest.php

@samdark
Copy link
Member

samdark commented Dec 4, 2023

Would you please add a line for CHANGELOG?

@samdark samdark requested review from a team December 4, 2023 14:51
@samdark
Copy link
Member

samdark commented May 16, 2024

👍

@samdark samdark merged commit 90c0eb0 into yiisoft:master May 16, 2024
63 of 71 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