Skip to content

Conversation

shmax
Copy link
Contributor

@shmax shmax commented Oct 3, 2023

If I understand correctly, Rails throws a RecordNotFound exception when you pass an empty array to find, and we don't seem to be doing that. I still have a little more research to do, but opening a PR in the meantime.

Also, there are a few points in the code where we retrieve static members from classes via reflection that may or may not exist, and this was throwing warnings.

@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

Merging #109 (9b40a71) into master (a8eca44) will not change coverage.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##              master      #109   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity       936       936           
===========================================
  Files             34        34           
  Lines           2345      2349    +4     
===========================================
+ Hits            2345      2349    +4     
Files Coverage Δ
lib/Relation.php 100.00% <100.00%> (ø)
lib/Table.php 100.00% <100.00%> (ø)

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

@shmax
Copy link
Contributor Author

shmax commented Oct 3, 2023

Confirmed that this was a bug. It seems to predate all this recent 2.0 work (I rolled back), so it must be something that broke in the last few years.

@shmax shmax merged commit d135bd1 into master Oct 3, 2023
@shmax shmax deleted the throw-on-empty-find branch October 3, 2023 20:24
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.

1 participant