-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Support doctrine/persistence 4.0 #2913
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2913 +/- ##
==========================================
- Coverage 78.64% 78.63% -0.01%
==========================================
Files 171 171
Lines 8775 8771 -4
==========================================
- Hits 6901 6897 -4
Misses 1874 1874 ☔ View full report in Codecov by Sentry. |
static fn () => new ArrayCollection( | ||
$manager->getRepository($class) | ||
->findBy([ | ||
$identifier => $id, | ||
]); | ||
|
||
return new ArrayCollection(is_array($results) ? $results : $results->toArray()); | ||
} | ||
]) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Persistence 4.0 adds the array return type to ObjectRepository::findBy()
, so the is_array()
check isn't needed anymore and I've just simplified this down to an arrow function. Same below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job @mbabker!
Could you please add a changelog note?
1ce106d
to
6c21284
Compare
Done |
Thank you @mbabker! |
Just as advertised