-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Added Template::____call() for BC #38
Conversation
*/ | ||
public function __call($name, $args) | ||
{ | ||
trigger_error('Invoking filters on Template object outside of template file is deprecated, use your filter directly.', E_USER_DEPRECATED); |
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.
Something like …use getLatte()->invokeFilter()
is better, isn't?
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.
Is it?
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.
What is „use your filter directly“?
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.
Filters are usualy shortcuts for existing functions/methods. If this is deprecated, spaghetti like getLatte()->invokeFilter()
is definitely a no-go and it's better to directly use that function/method, that the filter is an alias for.
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.
But it is lie, it is not deprecated, i.e. invokeFilter is not deprecated.
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 believe using the filter directly is better than spaghetti. If you don't like the formulation, write here how you want it and I will change it.
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.
You said „I know it's not a best practise, but often I would use the template object helpers in presenter or control.“ :-)
I belive that E_DEPRECATED message should explaind, how to quickly fix it.
20625fb
to
a5e76f7
Compare
a5e76f7
to
91f5644
Compare
merged f6e5a09 |
Related #37