-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactor swiftmailer to symfony mailer #10
base: master
Are you sure you want to change the base?
Refactor swiftmailer to symfony mailer #10
Conversation
Kira kira ini mau di evaluate kapan yak? |
1 similar comment
Kira kira ini mau di evaluate kapan yak? |
Guys sepertinya ini akan obsolete ketika tidak di implementasikan |
* @return \Illuminate\Auth\Reminders\RemindableInterface | ||
* | ||
* @throws \UnexpectedValueException | ||
*/ | ||
public function getUser(array $credentials) | ||
{ |
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.
@AlexzPurewoko ada pertimbangan tertentu kenapa return value-nya jadi nullable dan throw-nya dihapus?
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.
@AlexzPurewoko kenapa perlu dibuat V2
?
@@ -13,7 +13,8 @@ | |||
"illuminate/log": "4.2.*", | |||
"illuminate/support": "4.2.*", | |||
"illuminate/view": "4.2.*", | |||
"swiftmailer/swiftmailer": "~5.1" | |||
"swiftmailer/swiftmailer": "~5.1", |
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.
@AlexzPurewoko switftmailer-nya ngga sekalian dihapus aja?
// If the given view is an array with numeric keys, we will just assume that | ||
// both a "pretty" and "plain" view were provided, so we will return this | ||
// array as is, since must should contain both views with numeric keys. | ||
if (is_array($view) && isset($view[0])) | ||
{ | ||
return $view; | ||
return [$view[0], $view[1] ?? null]; |
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.
@AlexzPurewoko kenapa perlu mengecek masing-masing element? Kalau melihat deskripsi di atas, lebih masuk akal mengembalikan $view
langsung.
elseif (is_string($callback)) | ||
else | ||
{ | ||
return $this->container[$callback]->mail($message); | ||
} | ||
|
||
throw new \InvalidArgumentException("Callback is not valid."); |
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.
@AlexzPurewoko kenapa exception ini dihapus?
@@ -31,6 +31,7 @@ | |||
"symfony/finder": "~6.4", | |||
"symfony/http-foundation": "~6.4", | |||
"symfony/http-kernel": "~6.4", | |||
"symfony/mailer": "^6.4", |
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.
@AlexzPurewoko swiftmailer di list ini juga perlu dihapus.
public function sender(string $address, ?string $name = null): self | ||
{ | ||
$this->swift->setSender($address, $name); | ||
$this->message->sender(new Address($address, $name)); |
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.
@AlexzPurewoko parameter $name
di constructor Address
ngga nullable, jadi ini perlu diberi pengaman seperti di method from
di atas.
Problem Statement
Swiftmailer is no longer maintained and they recommend us to use [Symfony Mailer](https://symfony.com/doc/current/mailer.html).
[The end of Swiftmailer (Symfony Blog)](https://symfony.com/blog/the-end-of-swiftmailer)
Plan & Todos
symfony/mailer
6.0. Versi 9.x laravel dipakai karena lebih dekat implementasinya ke 4.2, menghindari adanya beberapa major change pada versi selanjutnya.