> Hopefully, with the new architecture of Symfony 2, it will be easier to
> make an independent plugin, but for now, I think this is much safer to
> keep it the way it is.

For peoples who are looking for a workaround, I have a very simple one.

Create a class that extends sfFactoryConfigHandler and overwrite the method
execute() to exclude things you don't want.

In my case, at line 44, I remove the entire mailer factory :

$factories = array('view_cache_manager', 'logger', 'i18n', 'controller',
'request', 'response', 'routing', 'storage', 'user', 'view_cache',
/*'mailer' // not for me, thanks */);

In your application config folder, add a file call core_complier.yml add
overwrite the default factory handler like this:

config/factories.yml:
  class:    myFactoryConfigHandler

Clear the cache and it's fine, I don't include anything about sfMailer
anymore.


NB: I should remove just the line that include Swift librairy but I have my
own mailer system with database logs and tasks.


I really appreciate the way symfony let us extend everything...


Loops



2009/11/18 Thomas Rabaix <[email protected]>

> So the event dispatcher cannot be used to create a swift mailer core plugin
> ? This is weird, both sfContext and sfComponent include and event when the
> method does not exist... And from the code sf1.3 allows to create dynamic
> factories [1]. Look like all elements are here to create an independant
> plugin...
>
> I might miss something too ;)
>
> [1]
> http://trac.symfony-project.org/browser/branches/1.3/lib/util/sfContext.class.php#L574
>
>
> On Wed, Nov 18, 2009 at 1:31 PM, Fabien Potencier <
> [email protected]> wrote:
>
>>
>> Jamie Learmonth wrote:
>> > Hi,
>> >
>> >     What really bothers me is that, from my point of vue, it should be a
>> >     plugin (as main external library like Propel and Doctrine), and not
>> >     comes from the symfony core, because in the current situation,
>> >     nobody can disable this library (that is a bad thing) without
>> >     changing the core of symfony (that is never a good idea).
>> >
>> >
>> > I agree that it does go against the philosophy which was adopted by
>> > symfony since 1.1 to decouple components from the framework, but with
>> > 1.4 around the corner this may be prove to be a really big change at
>> > this stage.
>> >
>> > But, if the core team agree with the argument I am sure they can pull
>> > something out the bag.
>>
>> I started the Swift Mailer integration as a core plugin but changed my
>> mind due to the current constraints of the architecture of symfony 1.X.
>>
>> Hopefully, with the new architecture of Symfony 2, it will be easier to
>> make an independent plugin, but for now, I think this is much safer to
>> keep it the way it is.
>>
>> Fabien
>>
>> >
>> > Jamie
>> >
>> >
>> > --
>> >
>> > 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]<symfony-devs%[email protected]>
>> .
>> > For more options, visit this group at
>> > http://groups.google.com/group/symfony-devs?hl=.
>>
>> --
>>
>> 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]<symfony-devs%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/symfony-devs?hl=.
>>
>>
>>
>
>
> --
> Thomas Rabaix
> http://rabaix.net
>
> --
> 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]<symfony-devs%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=.
>

--

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=.


Reply via email to