Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Check dates against DateTimeInterface instead of DateTime #2239

Merged
merged 3 commits into from
Apr 30, 2021

Conversation

jeromegamez
Copy link
Contributor

Greeting! 👋

I noticed that where() queries in which I used DateTimeImmutable objects returned empty results.

This change would allow the usage of DateTimeImmutable or CarbonImmutable in addition to DateTime/Carbon 🤞

:octocat:

@jeromegamez jeromegamez force-pushed the date-time-interface branch from dfa1f8b to 0db1e61 Compare April 29, 2021 00:41
@jeromegamez jeromegamez changed the title Check dates against DateTimeInterface instead of DateTime in the Query Builder Check dates against DateTimeInterface instead of DateTime Apr 29, 2021
@Smolevich Smolevich self-requested a review April 29, 2021 06:35
@Smolevich Smolevich self-assigned this Apr 29, 2021
@Smolevich Smolevich assigned jeromegamez and unassigned Smolevich Apr 29, 2021
Copy link
Contributor

@Smolevich Smolevich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs work

@jeromegamez jeromegamez force-pushed the date-time-interface branch from 0db1e61 to dc32644 Compare April 29, 2021 07:21
@jeromegamez jeromegamez removed their assignment Apr 29, 2021
@codecov-commenter
Copy link

codecov-commenter commented Apr 30, 2021

Codecov Report

Merging #2239 (9815f38) into master (73b6a91) will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2239      +/-   ##
============================================
+ Coverage     86.82%   86.88%   +0.06%     
  Complexity      664      664              
============================================
  Files            33       33              
  Lines          1556     1556              
============================================
+ Hits           1351     1352       +1     
+ Misses          205      204       -1     
Impacted Files Coverage Δ Complexity Δ
src/Jenssegers/Mongodb/Eloquent/Model.php 93.63% <100.00%> (ø) 83.00 <0.00> (ø)
src/Jenssegers/Mongodb/Query/Builder.php 89.18% <100.00%> (+0.26%) 162.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 73b6a91...9815f38. Read the comment docs.

@jeromegamez
Copy link
Contributor Author

Shall I address the StyleCI issues in a separate commit?

@divine
Copy link
Contributor

divine commented Apr 30, 2021

Shall I address the StyleCI issues in a separate commit?

Hello,

No, we'll take care of it later.

Thanks!

@Smolevich Smolevich merged commit 683749c into mongodb:master Apr 30, 2021
@divine
Copy link
Contributor

divine commented Apr 30, 2021

Thank you for your contribution @jeromegamez !

@jeromegamez
Copy link
Contributor Author

🚀

Thank you both for accepting it! 🤗

@jeromegamez jeromegamez deleted the date-time-interface branch April 30, 2021 21:55
mnphpexpert added a commit to mnphpexpert/laravel-mongodb that referenced this pull request Sep 2, 2024
Check dates against `DateTimeInterface` instead of `DateTime`
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants