-
Notifications
You must be signed in to change notification settings - Fork 97
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
Fix use of MagicField with phpType on a proxy class without magic __get method #405
Fix use of MagicField with phpType on a proxy class without magic __get method #405
Conversation
789a2ee
to
7b91997
Compare
7b91997
to
1289ccf
Compare
7b91997
to
2c4ffd3
Compare
Codecov Report
@@ Coverage Diff @@
## master #405 +/- ##
============================================
- Coverage 98.30% 98.25% -0.05%
- Complexity 1578 1580 +2
============================================
Files 147 147
Lines 4241 4246 +5
============================================
+ Hits 4169 4172 +3
- Misses 72 74 +2
Continue to review full report at Codecov.
|
This probably needs to be handled some other way. Currently, as it's written, if there isn't a Can you please outline your proxy class example here? |
It is like in test, just a proxy class with MagicField with phpType.
|
Okay, so after reviewing a bit more, I think I see what you're doing here. This is an extended type class, right? It's not exactly a "proxy class"? Assuming I'm understanding your intent properly, I don't have an issue with getting a proper fix for this use case. However, the current implementation is quite bad. Firstly, nested if statements are a big red flag. But more importantly, the The submitted code hacks something into place that happens to work for your use case. We need something that works with the existing logic. |
No, according to documentation,
Existing logic contains a bug, pull request fixes it. Try to comment changes in Instead of fake __get we can change |
@michael-vostrikov thanks for the clarity. Regarding the changes, my comments remain the same. The existing logic may not work in this case, which I understand. However, your changes are a hack, and not a good one. The changes need to be worked into the existing logic in a better way, as I described. |
ce68ba4
to
a6a4cd7
Compare
Found a way how to get source class and magic __get method in it. |
431181d
to
7bd4aa6
Compare
@michael-vostrikov this is much better! Can we find a more appropriate method name for |
7bd4aa6
to
975706f
Compare
975706f
to
b30e721
Compare
I did it a little wrong, |
This looks great @michael-vostrikov. Thanks for the PR and the follow-up work on it! |
Closes #404