Even if i prefer approach 1-2, using closures would be useful to
declare optional services :
public function showAction(Closure $mailer) {
[...]
if ($foo) {
[...]
$mailer()->send($mail);
}
}
but maybe this solution is harder to test ?
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
To unsubscribe from this group, send email to
symfony-devs+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.