# |
Dec 25th 2019, 16:58 |
ndm |
Totally different question, why do the CakePHP docs try to bamboozle poor meth users? |
# |
Dec 25th 2019, 16:49 |
challgren |
Figured this was gonna be an easy switch but seems like a bit got shuffled around |
# |
Dec 25th 2019, 16:49 |
challgren |
Ahh ok that makes sense. Just trying to learn the new methodology |
# |
Dec 25th 2019, 16:48 |
admad |
A trait which you use in your mailer |
# |
Dec 25th 2019, 16:46 |
challgren |
Ok so heres a question, the mailgun plugin has a couple convience functions that allow setting headers but without the all X-Mailgun-* wheres the best way to implement that now in the Message class or Mailer class? |
# |
Dec 25th 2019, 16:36 |
ndm |
no problem |
# |
Dec 25th 2019, 16:36 |
admad |
@ndm thanks for the doc update |
# |
Dec 25th 2019, 16:32 |
challgren |
But the exception makes more sense now to figure out how to semver a release back to prerelease and add the beta tag |
# |
Dec 25th 2019, 16:30 |
challgren |
No try { in https://book.cakephp.org/4/en/core-libraries/email.html |
# |
Dec 25th 2019, 16:30 |
ndm |
I thought I've seen an example in docs that wrapped the `Email::send()` call in `try ... catch`, but I can find it, so maybe that's just my imagination |
# |
Dec 25th 2019, 16:28 |
challgren |
Ok so I got some work on the mailgun plugin to fix things up |
# |
Dec 25th 2019, 16:26 |
ndm |
Failures in transports should be indicated by throwing exceptions |
# |
Dec 25th 2019, 16:25 |
challgren |
Im not sure honestly, but my question is since it returns an array and it looks like it always has headers and messages how does one detect a failure |
# |
Dec 25th 2019, 16:25 |
ndm |
Wasn't it always `array`, or least for quite some time? I don't remember |
# |
Dec 25th 2019, 16:22 |
challgren |
Yeah, before it returned mixed but now its array |
# |
Dec 25th 2019, 16:22 |
ndm |
Not sure what exactly you mean by "_it_"? The transport? |
# |
Dec 25th 2019, 16:18 |
challgren |
But it no longer returns false on failure :( |
# |
Dec 25th 2019, 16:18 |
challgren |
Ok @ndm you got something with replacing the transport |
# |
Dec 25th 2019, 15:56 |
ndm |
gn8 |
# |
Dec 25th 2019, 15:55 |
ndm |
Just sprinkle some more swapping magic on top :) |
# |
Dec 25th 2019, 15:54 |
challgren |
I'll try later though, it's bedtime |
# |
Dec 25th 2019, 15:53 |
challgren |
It's used during testing, it's magically swapped out in testing |
# |
Dec 25th 2019, 15:52 |
ndm |
How so? Where do you use that? |
# |
Dec 25th 2019, 15:50 |
challgren |
@ndm using a different transport would kill DebugTransport |
# |
Dec 25th 2019, 15:48 |
challgren |
I give up for today |
# |
Dec 25th 2019, 15:43 |
ndm |
Not anymore now though... until the next build that is |
# |
Dec 25th 2019, 15:41 |
ndm |
Sure, the change is totally fine, it's just that the docs still say `_csrfToken` ;) |
# |
Dec 25th 2019, 15:39 |
admad |
@ndm The reason for the change is getAttribute() is a method of the psr interface while getParam() is cake specific, so static analyzers get sad if you use the latter in middlewares methods as they have the argument typehinted to ServerRequestInterface |
# |
Dec 25th 2019, 15:38 |
challgren |
Debug kit is being a POS hmmm may have to try that |
# |
Dec 25th 2019, 15:35 |
ndm |
How about using a dummy/mock transport instead? |
# |
Dec 25th 2019, 15:31 |
challgren |
Grrrr Im starting to not like Cake 4 |
# |
Dec 25th 2019, 15:20 |
ndm |
OK then, first of all, .NET MVVM Framworks... their documentations are so absolutely terrible, I could even forgive @admad about the `_csrfToken` mistake :) |
# |
Dec 25th 2019, 15:13 |
challgren |
_waits at the end of the line_ |
# |
Dec 25th 2019, 15:12 |
ndm |
@challgren You'll have to line up in the back, I've got a lot of problems with all sorts of people! |
# |
Dec 25th 2019, 15:09 |
slackebot |
<challgren> |
# |
Dec 25th 2019, 15:08 |
challgren |
To simulate a failure |
# |
Dec 25th 2019, 15:08 |
challgren |
@ndm I have a bunch of grievances! |
# |
Dec 25th 2019, 15:08 |
admad |
Why do you even need to mock a mailer? |
# |
Dec 25th 2019, 15:08 |
challgren |
Wanted to discuss that issue from a baker perspective, but we can chat later |
# |
Dec 25th 2019, 15:07 |
admad |
@challgren am now, on mobile |
# |
Dec 25th 2019, 15:07 |
ndm |
Sounds like I need to get my Festivus pole |