Reduce deprecations due to FieldMapping array access#2889
Reduce deprecations due to FieldMapping array access#2889phansys merged 10 commits intodoctrine-extensions:mainfrom
Conversation
…named $fieldMapping)
627676d to
4347cff
Compare
|
Ok I renamed my first commit (since it addressed only variables named |
…apping\ClassMetadata::getFieldMapping()
…ine\ORM\Mapping\ClassMetadata::getFieldMapping()
|
Ok that's all for me. Let me know if there are more ways to fetch the FieldMapping object that I should inspect. |
|
Check the changes in the YAML mapping drivers, some of those are parsing the YAML files as arrays and not from the metadata objects. |
|
Likewise, anything that's in MongoDB ODM specific code (like document repository classes) doesn't need to change as the deprecations only affect the ORM. |
|
@mbabker I addressed your comments with some reverts; it may be a good idea to squash this PR while merging. |
|
Thanks @mbabker, I've addressed all the comments of your review. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2889 +/- ##
==========================================
- Coverage 78.82% 78.67% -0.15%
==========================================
Files 167 167
Lines 8637 8752 +115
==========================================
+ Hits 6808 6886 +78
- Misses 1829 1866 +37 ☔ View full report in Codecov by Sentry. |
|
Good job @Jean85! |
Fixes #2827, at least in large part.
I did a simple regex find&replace of access to
$mapping['...'], and then:??(null coalescing) has one of the lowest operator precedence in PHPODMclass (since there is no deprecation there)issetcall (it wouldn't work)??(so it's a concatenation)I realize this may not cover all the places where this deprecation may be triggered, but I'm sure that all my changes are covering some, so it's a good start.