-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Allowing Methods to be set or unset in ModelHooks #1198
Conversation
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.
Can of worms has been opened!
Can you add some tests maybe? 🤔
Added in some tests |
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, thank you!
@@ -749,7 +749,7 @@ public function setProperty($name, $type = null, $read = null, $write = null, $c | |||
} | |||
} | |||
|
|||
protected function setMethod($name, $type = '', $arguments = [], $comment = '') | |||
public function setMethod($name, $type = '', $arguments = [], $comment = '') |
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.
As with #945 (comment) , this will bring the same kind of breaking change.
So maybe in this case we should bump the major?
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.
I don't know, I think the impact is pretty small. The intended use case is not to provide an extensible package for all methods imho.
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.
Let's merge it, but wait for a release a bit, see #1198 (comment)
Summary
Expanding PR #945 to include support in ModelHooks to unset and set Methods.
This can be useful for defining class inheritance properly for the IDE.
Type of change
Checklist
composer fix-style