-
Notifications
You must be signed in to change notification settings - Fork 824
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
Rename DataObject method name #10637
Rename DataObject method name #10637
Conversation
31df80e
to
c9e203a
Compare
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.
We should not be renaming this method because of the failure on a totally unrelated module - that won't stop the same issue happening again on a different module
Instead we should be using is_callable() as mentioned here
Using this approach, some "setProperty" methods in another classes fail Unit tests. Initially I implemented this approach, but after testing I think better to rename method and open issue to fix problem with private methods. |
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.
In ViewableData::__set() it should be is_callable([$this, $method])
, not is_callable($this, $method)
;
c9e203a
to
9761cef
Compare
Just using |
0f722f5
to
cad30c1
Compare
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.
There probably should be a unit test to cover this edge case.
Are we happy with the magic setter accessing protected method?
@emteknetnz said that we should check that method is NOT private. Public or protected are fine. |
cad30c1
to
da5a902
Compare
DONE. New test case was added. |
da5a902
to
638ebcc
Compare
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.
LGTM
Issue