Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactored mailer module to 2.0 style #2849

Closed
wants to merge 31 commits into from
Closed

refactored mailer module to 2.0 style #2849

wants to merge 31 commits into from

Conversation

Guite
Copy link
Member

@Guite Guite commented Apr 19, 2016

Q A
Bug fix? no
New feature? yes (added more mail-sending events)
BC breaks? no
Deprecations? no
Fixed tickets -
Refs tickets #1753
License MIT
Changelog updated yes

Description

This PR updates the mailer module to new controller, Symfony forms, Twig, etc.

@Guite Guite added this to the 1.4.3 milestone Apr 19, 2016
*
* Please see the NOTICE file distributed with this source code for further
* information regarding copyright and licensing.
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*
* @return bool true if successful
*/
public function sendMessage($args)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public api should no longer user $args. please delineate each param.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one option here would be to create a Mail object (and companion interface) that can be type hinted into this method as an argument. Then the properties can be set and expected.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe Message instead of Mail - and maybe simply type hint Switmailer's Message? and force the creation of the message before utilizing the method? just thinking out loud.

@craigh
Copy link
Member

craigh commented Apr 19, 2016

just did a quick scan and added a few comments. will want to look more carefully later. good work so far. 👍

@craigh craigh mentioned this pull request Apr 19, 2016
25 tasks
@@ -24,10 +24,12 @@ class LinkContainer implements LinkContainerInterface
* @var Translator
*/
private $translator;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we need to decide here. I usually leave no space between property declarations. Otherwise we will keep 'fixing' each others code 😉 @cmfcmf @Guite others? opinions?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I keep the blank lines.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any way to make styleCI check this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't find a way.

@craigh
Copy link
Member

craigh commented Apr 20, 2016

apparently %swiftmailer% doesn't work on installation. 😞

@craigh
Copy link
Member

craigh commented Apr 20, 2016

@cmfcmf any suggestions for that problem?

@@ -87,8 +89,7 @@ private function getAdmin()
'text' => $this->translator->__('Create new block'),
'icon' => 'plus'
];
}
if ($this->permissionApi->hasPermission('ZikulaBlocksModule::', '::', ACCESS_ADD)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is removed because it was checked twice.

if ($this->permissionApi->hasPermission('ZikulaBlocksModule::', '::', ACCESS_ADD)) {
// A
}
if ($this->permissionApi->hasPermission('ZikulaBlocksModule::', '::', ACCESS_ADD)) {
// B
}

became

if ($this->permissionApi->hasPermission('ZikulaBlocksModule::', '::', ACCESS_ADD)) {
// A
// B
}

@Guite
Copy link
Member Author

Guite commented Apr 23, 2016

about %swiftmailer% not working on installation: probably app/config/dynamic/default.yml is not included when the system is installing?

@craigh
Copy link
Member

craigh commented Apr 23, 2016

It is supposed to happen here: https://github.com/zikula/core/blob/1.4/src/app/ZikulaKernel.php#L70

@cmfcmf we could really use your help here.

* @param $translator
* @param RouterInterface $router
* @param PermissionApi $permissionApi
* @param Translator $translator Translator service instance.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably TranslatorInterface

@Guite
Copy link
Member Author

Guite commented Apr 25, 2016

Closed in favor of #2866

@Guite Guite closed this Apr 25, 2016
@Guite Guite deleted the mailer branch April 25, 2016 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants