-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Use getFieldValue and setFieldValue methods #2966
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
Conversation
beb13b3
to
7f1cdf6
Compare
7f1cdf6
to
f12ac1e
Compare
Can you add a test fixture covering the "generate a slug using an embeddable object" scenario? It looks like all the tests only use fields directly on the model and nothing with a relation or embed, so it'd probably be good to have this covered as well. |
@mbabker test added 👍 ! |
cc @mbabker |
9f586df
to
a523abd
Compare
@phansys CHANGELOG update and rebase done 👍! |
a523abd
to
3153eed
Compare
Changelog diff seems weird since it doesn't show 3.20.1 lines and my recent merged PR Also you have the PHPStan build failing |
3153eed
to
567df5b
Compare
Add sluggable test with embeddable Update CHANGELOG
567df5b
to
5907f23
Compare
I think this is re-ready for a review @phansys :) After the merge, I'll see if I can reduce the baseline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ker0x!
Please, check the test failures.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2966 +/- ##
=======================================
Coverage 78.55% 78.56%
=======================================
Files 169 169
Lines 8823 8793 -30
=======================================
- Hits 6931 6908 -23
+ Misses 1892 1885 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Thank you for your patience @ker0x! |
@phansys You're welcome 😉! |
Replace call to
getReflectionProperty($field)->getValue($entity)
andgetReflectionProperty($field)->setValue($entity, $value)
withgetFieldValue()
andsetFieldValue()
methods which are available in both ORM 2.x and 3.xThis makes it possible to use the new
propertyAccessor
property introduced in ORM 3.4 and fallback toreflFields
with ORM < 3.4PR contain patch #2945 and also fix #2965