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

Support doctrine/persistence 4.0 #2913

Merged
merged 1 commit into from
Feb 1, 2025

Conversation

mbabker
Copy link
Contributor

@mbabker mbabker commented Feb 1, 2025

Just as advertised

Copy link

codecov bot commented Feb 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.63%. Comparing base (b6048c1) to head (6c21284).
Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

Comment on lines +129 to +134
static fn () => new ArrayCollection(
$manager->getRepository($class)
->findBy([
$identifier => $id,
]);

return new ArrayCollection(is_array($results) ? $results : $results->toArray());
}
])
)
Copy link
Contributor Author

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.

Copy link
Collaborator

@phansys phansys left a 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?

@mbabker
Copy link
Contributor Author

mbabker commented Feb 1, 2025

Could you please add a changelog note?

Done

@phansys phansys merged commit 0402d01 into doctrine-extensions:main Feb 1, 2025
23 checks passed
@phansys
Copy link
Collaborator

phansys commented Feb 1, 2025

Thank you @mbabker!

@mbabker mbabker deleted the persistence-4 branch February 1, 2025 22: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.

2 participants