Log message #4220750

# At Username Text
# Jan 2nd 2020, 14:38 scuadra Hello and happy new year! I have a question about using wkhtmltopdf with CakePDF. I have an html table with multiple rows (30-40) which not fits on one page and goes to pages 2 and 3. In those pages the table rows are tied to the top of the page without any margin and I can't find a way to change this. So my question is how to set some margin to the top of the pages?
# Jan 2nd 2020, 14:37 alexdd55976 i did not specificly activate it.. so no idea how to disable it
# Jan 2nd 2020, 14:36 alexdd55976 how can i get rid of the `Missing CSRF token body`message?
# Jan 2nd 2020, 14:24 neothermic it was a very handy upgrade to the docblock for ClassRegistry::init in 2.x :)
# Jan 2nd 2020, 14:22 dereuromark sure, if applicable
# Jan 2nd 2020, 14:16 neothermic @dereuromark one thing that also helps is if you're returning something that at least has a base type, indicate so in the docblock rather than just object
# Jan 2nd 2020, 13:58 dereuromark I wonder if php8 will have typehints in place, and also moves away from false and uses null as empty type...
# Jan 2nd 2020, 13:57 dereuromark and wonder why you didnt notice this before
# Jan 2nd 2020, 13:57 dereuromark I see :) Yeah, you will get this when trying to make phpstan level 5+ pass
# Jan 2nd 2020, 13:56 tibor.hajos Sorry, I meant _return types_ by types. Let me rephrase that as "I never noticed the wrong return types"
# Jan 2nd 2020, 13:38 dereuromark that is actually just unnecessary noise around the actual topic/bug.
# Jan 2nd 2020, 13:38 dereuromark those are not the point :)
# Jan 2nd 2020, 13:37 tibor.hajos Funny, I never noticed the missing <p> and the wrong types. Well spotted! I'll keep a look out for them
# Jan 2nd 2020, 13:28 dereuromark Hey guys, we should make more such PRs: https://github.com/JetBrains/phpstorm-stubs/pull/728 For those that use PHPStorm, at least, there are probably a lot more outdated/wrong docblocks. Makes local dev harder as the IDE cannot help us with "catching" missing types if they are not properly defined on the docblock. Feel free to help out with more PRs.
# Jan 2nd 2020, 12:42 willem Hi Guys, I am mailing with Cakephp 3 and adding an attachment. Normally the attachment is also visible in the mail body (see left), but on the right it is only visible in the dropdown. Both mails are sent using the same code. Only the mail layout is different. What could cause this issue? anybody?
# Jan 2nd 2020, 12:06 alexdd55976 but i don't like it, because its not where i expect it to be
# Jan 2nd 2020, 12:06 alexdd55976 ok, this works
# Jan 2nd 2020, 12:05 alexdd55976 @admad thanks i will try
# Jan 2nd 2020, 11:45 admad $this->layout = 'login' in your index.ctp/php
# Jan 2nd 2020, 11:45 admad @alexdd55976 you probably have some other code running lateron which resets the layout. One way to just side step the issue is set layout in the view file itself
# Jan 2nd 2020, 10:35 alexdd55976 any ideas on that? files are existent in their folder
# Jan 2nd 2020, 10:30 alexdd55976 i so this ```$this->viewBuilder()->setLayout('login');``` in my index action. sadly, the layout it not used. is there anything i have to do additionally to that line?
# Jan 2nd 2020, 10:05 dereuromark Which allows me to add a few more typehints already in advance.
# Jan 2nd 2020, 10:04 dereuromark I use Cake3 already with 7.2+
# Jan 2nd 2020, 10:04 neothermic (our older project is still on 2.x... and that... that... needs effort)
# Jan 2nd 2020, 10:04 dereuromark Good for you :) But many plugins wont be ready for a while.
# Jan 2nd 2020, 10:04 neothermic Once we hit 7.x I sorta want to push this new project into 4.x as soon as possible; it doesn't do much so it should be a simple upgrade
# Jan 2nd 2020, 10:04 dereuromark I do that with my large apps, 3.next + shim plugin => 4.0 + shim plugin => minimum of diff.
# Jan 2nd 2020, 10:03 dereuromark and you could also further pause it by going 3.next and further make the window to upgrade smaller (since 3.next gets backported stuff). the smaller the difference, the easier the jump.
# Jan 2nd 2020, 10:03 dereuromark you already get all the 3.x bugfixes and improvements while waiting for the big jump
# Jan 2nd 2020, 10:02 dereuromark do
# Jan 2nd 2020, 10:01 neothermic I either need more coffee for that, or it needs more adjectives :P
# Jan 2nd 2020, 10:00 dereuromark @neothermic It could be smoother to it this way.
# Jan 2nd 2020, 10:00 javier.villanueva morning all and happy new year!
# Jan 2nd 2020, 09:57 neothermic For planning, if I have a cakephp 3.3 project (don't kill me, it needs to run on 5.5 still ¬_¬) and I want to go to 4.x (for when we finally upgrade to 7.x), is the recommended way to go to 3.8 and fix all deprecations, then go to 4.x?
# Jan 2nd 2020, 09:49 slackebot servermock, with default null 2. I did the the following to test my code in ResponseEmitterTest:: ```$response = (new Response()) ->withAddedHeader('Set-Cookie', 'google=not=nice;Path=/accounts; HttpOnly; samesite=Strict')``` Now sameSite keeps coming out as ```'path' => '/accounts; samesite=Strict',``` I have no idea why this is. If anyone could help me out, I'd be grateful
# Jan 2nd 2020, 09:49 slackebot https://stackoverflow.com/questions/39750906/php-setcookie-samesite-strictF $path .= '; samesite=' . $sameSite; } setcookie( $cookie['name'], $cookie['value'], $cookie['expire'], $path, $cookie['domain'], $cookie['secure'], $cookie['httpOnly'] ); continue; }``` As for tests, I've done the following: 1. Added sameSite to
# Jan 2nd 2020, 09:49 slackebot stackoverflow suggestion in the comment ```foreach ($cookies as $cookie) { if (is_array($cookie)) { $path = $cookie['path']; $sameSite = array_key_exists('sameSite', $cookie) ? $cookie['sameSite'] : null; if ($sameSite !== null) { // A hack is needed to properly handle all samesite values in PHP < 7.3. // This will break in PHP 7.3. //
# Jan 2nd 2020, 09:49 tibor.hajos Hello, First of all, happy new year! I am in need of some help. I've been breaking my head over the samesite cookie backport for some hours now, and I'm stuck. If I understand everything correctly, this has been temporarily (PHP < 7.3) done with a hack, because setcookie() does not offer full support of all possible values. In my code, I've implemented it this way in `ResponseEmitter->emitCookies()`, and put everyting in $path, per the
# Jan 2nd 2020, 09:05 dereuromark :) oh
# Jan 2nd 2020, 09:05 admad there's nothing to PR, he used the wrong release.