-
-
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
Reduce deprecations due to FieldMapping array access #2889
base: main
Are you sure you want to change the base?
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. |
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 PHPODM
class (since there is no deprecation there)isset
call (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.