-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[5.next] Macroable Trait #18889
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
base: 5.next
Are you sure you want to change the base?
[5.next] Macroable Trait #18889
Conversation
|
||
if (!is_callable($macro)) { | ||
throw new BadMethodCallException(sprintf( | ||
'Macro for method %s is not callable.', |
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.
'Macro for method %s is not callable.', | |
'Macro for method `%s()` is not callable.', |
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.
Ok
afa00cb
to
611ab71
Compare
d34d31a
to
23f034c
Compare
{ | ||
return 'privateStaticValue'; | ||
} | ||
}; |
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.
Shouldn't we also call clearMacros()
here as it looks like we may leak global state in tests here.
use BadMethodCallException; | ||
use Closure; | ||
|
||
trait MacroableInstanceTrait |
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.
It would be good to have test coverage on this trait as well.
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.
Ok
#18843