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

ORM 3 compat fixes #2709

Merged
merged 3 commits into from
Oct 17, 2023
Merged

Conversation

mbabker
Copy link
Contributor

@mbabker mbabker commented Oct 12, 2023

This is some low-hanging fruit working as a very first pass for #2708. Best viewed by individual commits.

Three things are tackled:

  • The Doctrine\ORM\EntityRepository::$_em property was made private, the getter method is used instead
  • The Doctrine\ORM\Internal\Hydration\AbstractHydrator::$_em property was renamed to $em, and it has no getter method; an internal trait was introduced and implemented in all ORM hydrators to support retrieving the entity manager from the parent class in a cross-version compatible manner
  • The unit tests will now use the ORM's AttributeDriver instead of the deprecated AnnotationDriver when running on PHP 8 when configuring an entity manager

@codecov
Copy link

codecov bot commented Oct 12, 2023

Codecov Report

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

Comparison is base (4a0d0f9) 79.67% compared to head (b76536d) 79.68%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2709   +/-   ##
=======================================
  Coverage   79.67%   79.68%           
=======================================
  Files         161      162    +1     
  Lines        8453     8455    +2     
=======================================
+ Hits         6735     6737    +2     
  Misses       1718     1718           
Files Coverage Δ
.../Loggable/Entity/Repository/LogEntryRepository.php 96.96% <100.00%> (ø)
.../Sortable/Entity/Repository/SortableRepository.php 91.17% <100.00%> (ø)
src/Tool/ORM/Hydration/EntityManagerRetriever.php 100.00% <100.00%> (ø)
src/Translatable/Hydrator/ORM/ObjectHydrator.php 93.33% <100.00%> (ø)
...Translatable/Hydrator/ORM/SimpleObjectHydrator.php 93.33% <100.00%> (ø)
.../Tree/Entity/Repository/AbstractTreeRepository.php 80.85% <100.00%> (ø)
...e/Entity/Repository/MaterializedPathRepository.php 98.36% <100.00%> (ø)
...atable/Entity/Repository/TranslationRepository.php 84.07% <93.33%> (ø)
src/Tree/Hydrator/ORM/TreeObjectHydrator.php 88.37% <80.00%> (ø)
...rc/Tree/Entity/Repository/NestedTreeRepository.php 89.86% <94.11%> (ø)
... and 1 more

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

@phansys phansys requested a review from franmomu October 14, 2023 11:42
@franmomu franmomu merged commit 43073e0 into doctrine-extensions:main Oct 17, 2023
21 checks passed
@franmomu
Copy link
Collaborator

thanks @mbabker!

@mbabker mbabker deleted the orm-3-compat-fixes branch October 17, 2023 15:18
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.

3 participants