-
-
Notifications
You must be signed in to change notification settings - Fork 154
Prevent Swfitmailer service from loading on every request #5
Conversation
you should allow any ContainerInterface (to support the case where someone does not use an introspectable container) and replace the check by |
and btw, you forgot to add a use statement for the IntrospectableContainer |
Good point, updated accordingly to make |
@@ -34,6 +35,10 @@ public function __construct(ContainerInterface $container, $autoStart = false) | |||
|
|||
public function onKernelTerminate(PostResponseEvent $event) | |||
{ | |||
if($container instanceof IntrospectableContainerInterface && !$container->initialized('mailer')) { |
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.
missing space after the if
Thanks... Symfony2 CS hasn't become habit yet. |
Thanks a lot. This PR is ready to be merged as soon as @fabpot merges the PR in symfony (merging it before would not break anything as the instanceof check would simply return false but it feels wrong) |
No prob. Thanks for looking it over. I agree, it would feel odd to merge it before and have it referencing things that don't technically exist yet. |
Can you squash your commits before I merge? Btw, thanks for your work on that. |
…enderListener to prevent the mailer service from loading on every request
Squashed. Anytime, it was my pleasure. Thank you and everyone else for feedback and support! |
Prevent Swfitmailer service from loading on every request
Thanks |
Can be pulled once symfony/symfony#3557 has been merged