Skip to content
This repository was archived by the owner on Feb 6, 2022. It is now read-only.

Prevent Swfitmailer service from loading on every request #5

Merged
merged 1 commit into from
Apr 19, 2012

Conversation

evillemez
Copy link
Contributor

Can be pulled once symfony/symfony#3557 has been merged

@stof
Copy link
Member

stof commented Apr 15, 2012

you should allow any ContainerInterface (to support the case where someone does not use an introspectable container) and replace the check by if (if $container instanceof IntrospectableContainer && !$container->initialized('mailer')) { IMO

@stof
Copy link
Member

stof commented Apr 15, 2012

and btw, you forgot to add a use statement for the IntrospectableContainer

@evillemez
Copy link
Contributor Author

Good point, updated accordingly to make IntrospectableContainerInterface optional.

@@ -34,6 +35,10 @@ public function __construct(ContainerInterface $container, $autoStart = false)

public function onKernelTerminate(PostResponseEvent $event)
{
if($container instanceof IntrospectableContainerInterface && !$container->initialized('mailer')) {
Copy link
Member

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

@evillemez
Copy link
Contributor Author

Thanks... Symfony2 CS hasn't become habit yet.

@stof
Copy link
Member

stof commented Apr 15, 2012

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)

@evillemez
Copy link
Contributor Author

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.

@fabpot
Copy link
Member

fabpot commented Apr 19, 2012

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
@evillemez
Copy link
Contributor Author

Squashed. Anytime, it was my pleasure. Thank you and everyone else for feedback and support!

stof added a commit that referenced this pull request Apr 19, 2012
Prevent Swfitmailer service from loading on every request
@stof stof merged commit 203e58a into symfony:master Apr 19, 2012
@stof
Copy link
Member

stof commented Apr 19, 2012

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants