Codeception / module-yii2

Codeception module for Yii2 framework
MIT License
16 stars 36 forks source link

Remove hidden dependency on SwiftMailer #64

Closed SamMousa closed 2 years ago

SamMousa commented 2 years ago

While moving away from SwiftMailer, since it is deprecated, I discovered that the mailer mocking functionality currently has a dependency on yiisoft/yii2-swiftmailer.

We should remove this and implement a simple message object implementation for testing purposes.

edit: In the mean time, a workaround is to configure your messageClass explicitly.

developedsoftware commented 2 years ago

I was going to make a pull request for this but come accross this issue?

Have you made the required changes?

Its causing my tests to fail for issue https://github.com/yiisoft/yii2-app-basic/issues/263#issuecomment-1149712062

luke- commented 2 years ago

@developedsoftware See here: https://github.com/yiisoft/yii2-app-basic/pull/264/

developedsoftware commented 2 years ago

Awesome thanks pal!

developedsoftware commented 2 years ago

@luke- do you plan on updating this repo? Specifically these two files here? Or have you made your fix inside the basic app directly?

https://github.com/Codeception/module-yii2/search?q=swiftmailer

luke- commented 2 years ago

@developedsoftware No, I just recently had the same problem and therefore the quick PR for the Basic Template.

SamMousa commented 2 years ago

So this is still open for a PR if you want @developedsoftware. It needs to solve the dependency issue properly though, not by introducing a different dependency but by providing a minimal MessageInterface implementation that we can use.

developedsoftware commented 2 years ago

Understood.

developedsoftware commented 2 years ago

In the meantime the other PR should be accepted right ?

SamMousa commented 2 years ago

In the meantime the other PR should be accepted right ?

That's not for me to decide, I don't use the templates and am not familiar with their config!