# |
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. |
# |
Jan 2nd 2020, 09:02 |
dereuromark |
@luizcmarin You can make a PR here :) Thats the easiest way to get changes in. |
# |
Jan 2nd 2020, 08:29 |
pieceof |
happy 2020 :confetti_ball: |
# |
Jan 2nd 2020, 08:27 |
tobse |
Happy new year! |
# |
Jan 2nd 2020, 08:17 |
jotpe |
Good morning and a happy new year :tada: All the best for 2020! |
# |
Jan 2nd 2020, 06:54 |
alexdd55976 |
happy new year and good morning |
# |
Jan 2nd 2020, 01:07 |
challgren |
or 2.0.0-beta |
# |
Jan 2nd 2020, 01:06 |
challgren |
@luizcmarin theres a dev-cake-4.x branch that you can use |
# |
Jan 2nd 2020, 00:33 |
luizcmarin |
@admad in https://github.com/UseMuffin/Orderly change public function initialize(array $config) to public function initialize(array $config): void and it works cool in 4.0. thank you |
# |
Jan 1st 2020, 22:07 |
challgren |
Stems from https://sandbox.dereuromark.de/pages/best-practices |
# |
Jan 1st 2020, 22:07 |
peppejaripappalardo |
thx @challgren |
# |
Jan 1st 2020, 21:55 |
challgren |
The app_local.php overrides the app.php vars |
# |
Jan 1st 2020, 21:54 |
peppejaripappalardo |
thx to all :) |
# |
Jan 1st 2020, 21:54 |
peppejaripappalardo |
i dont understand : |
# |
Jan 1st 2020, 21:54 |
peppejaripappalardo |
hello everyone, in cake 4, the database config, works only with app_local.php? |
# |
Jan 1st 2020, 20:56 |
ndm |
no problem |
# |
Jan 1st 2020, 20:55 |
Rob73 |
Works now, thanks again :) |
# |
Jan 1st 2020, 20:55 |
Rob73 |
that's embarrassing '=D |
# |
Jan 1st 2020, 20:53 |
ndm |
`zh_CN` vs `zh_CH`? |
# |
Jan 1st 2020, 20:52 |
Rob73 |
src/Locale/zh_CN/default.po |
# |
Jan 1st 2020, 20:51 |
ndm |
what's the path of your translation file? |
# |
Jan 1st 2020, 20:48 |
Rob73 |
en_GB worked just now but zh_CH didin't |
# |
Jan 1st 2020, 20:47 |
ndm |
maybe your translation files are in the wrong place |
# |
Jan 1st 2020, 20:46 |
Rob73 |
for some reason it won't work. |
# |
Jan 1st 2020, 20:41 |
ndm |
That looks OK, yes, assuming the relevant `msgstr` entries exist. Translations are being cached, try clearing `tmp/cache/persistent`. |
# |
Jan 1st 2020, 20:39 |
Rob73 |
Time format changes as you can see |
# |
Jan 1st 2020, 20:38 |
Rob73 |
I mean, generally that should work when the language is changed I have en_GB and zh_CH but the text wont change to chinese |
# |
Jan 1st 2020, 20:37 |
ndm |
Not sure what you mean by "correct"? |
# |
Jan 1st 2020, 20:34 |
Rob73 |
this is the correct method right ? |
# |
Jan 1st 2020, 20:34 |
Rob73 |
<?php echo __("Greetings governor {0} !", [$this->request->getSession()->read('Auth.User.username')]); ?> |
# |
Jan 1st 2020, 20:33 |
Rob73 |
msgid "Greetings governor {0} !" |
# |
Jan 1st 2020, 20:33 |
Rob73 |
one more question real quick. |
# |
Jan 1st 2020, 20:32 |
ndm |
you're welcome |
# |
Jan 1st 2020, 20:32 |
Rob73 |
this is very useful :) Thanks again :D |