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

Add a compat trait to address B/C issues with EntityRepository #2758

Merged
merged 1 commit into from
Feb 11, 2024

Conversation

mbabker
Copy link
Contributor

@mbabker mbabker commented Feb 8, 2024

Ref: #2708

In ORM 3.0, the EntityRepository::__call() method signature is fully typehinted. As it includes a mixed return type, that signature can't just be applied to the package right now due to PHP 7.4 still being supported.

To help with B/C, an internal trait is introduced that any entity repository provided by this package can use (thus far, it only affects the NestedTreeRepository, but if we find other gaps, the trait can be updated to account for those as well.

Copy link

codecov bot commented Feb 8, 2024

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (66e6a60) 79.33% compared to head (01b535b) 79.26%.

Files Patch % Lines
...rc/Tree/Entity/Repository/NestedTreeRepository.php 73.17% 11 Missing ⚠️
src/Tool/ORM/Repository/EntityRepositoryCompat.php 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2758      +/-   ##
==========================================
- Coverage   79.33%   79.26%   -0.07%     
==========================================
  Files         162      163       +1     
  Lines        8506     8517      +11     
==========================================
+ Hits         6748     6751       +3     
- Misses       1758     1766       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@franmomu franmomu merged commit 50352f7 into doctrine-extensions:main Feb 11, 2024
16 of 18 checks passed
@franmomu
Copy link
Collaborator

Thanks @mbabker! I guess we should use this strategy with more classes to deal with BC with ORM 3.

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