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(database): using empty objects instead of empty arrays for date filtering #198

Merged
merged 2 commits into from
Apr 16, 2023

Conversation

braumye
Copy link
Contributor

@braumye braumye commented Apr 16, 2023

  • The DateFilter class was modified to accept an object as a value in addition to string, bool, and array.
  • The tests for CompoundFilter and DateFilter were updated to use objects instead of empty arrays for the past_week, past_month, past_year, next_week, next_month, next_year, and this_week properties in the date array. The tests were also updated to use assertEquals instead of assertSame for the expected and actual arrays.

see more: https://developers.notion.com/reference/post-database-query-filter#date

@codecov-commenter
Copy link

codecov-commenter commented Apr 16, 2023

Codecov Report

Merging #198 (639f861) into main (2fc1940) will not change coverage.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff            @@
##               main     #198   +/-   ##
=========================================
  Coverage     99.08%   99.08%           
  Complexity     1214     1214           
=========================================
  Files           130      130           
  Lines          3925     3925           
=========================================
  Hits           3889     3889           
  Misses           36       36           
Impacted Files Coverage Δ
src/Databases/Query/DateFilter.php 98.43% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mariosimao mariosimao merged commit 1f21cbc into mariosimao:main Apr 16, 2023
@mariosimao
Copy link
Owner

Hi @braumye! Thank you very much for contributing 😄

I've made some small changes on your PR before merging it.

The fixes on the date filter are already available on v1.6.2.

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.

3 participants