# |
Oct 16th 2019, 16:49 |
ssalvatori |
hello, hey any examples how to test a EventListener ? |
# |
Oct 16th 2019, 16:47 |
javier.villanueva |
Im testing with 10.000 and time to save its very up |
# |
Oct 16th 2019, 16:47 |
javier.villanueva |
I may not need lft and rght structure |
# |
Oct 16th 2019, 16:45 |
javier.villanueva |
ok |
# |
Oct 16th 2019, 16:44 |
admad |
MPTT is optimized for read |
# |
Oct 16th 2019, 16:44 |
admad |
it won't crash on finds but more like on saves :slightly_smiling_face: |
# |
Oct 16th 2019, 16:09 |
javier.villanueva |
ok i will make it |
# |
Oct 16th 2019, 16:09 |
ndm |
Finds shouldn't be an issue even with billions of records (assuming your DBMS can handle large amounts of data in general), writes on the other hand can be very expensive. Generate some test data and try it out. |
# |
Oct 16th 2019, 16:01 |
javier.villanueva |
really when I write finds is reorder |
# |
Oct 16th 2019, 15:47 |
javier.villanueva |
Im using the tree behaviour in a model, probably with 2 million of records, a person tell me that probably it will be crash in finds... any advice about it? |
# |
Oct 16th 2019, 14:00 |
paul_83uk |
ok useful to know thanks. |
# |
Oct 16th 2019, 13:58 |
admad |
gtg |
# |
Oct 16th 2019, 13:58 |
admad |
FYI it's the `ResponseEmitter` class with makes the `setcookie()` calls. So if you do upgrade to php 7.e then for now you can use your own reponse emitter class which overrides relevant method and pass your emitter instance to $server->emit() call in webroot/index.php |
# |
Oct 16th 2019, 13:58 |
paul_83uk |
haha love the pic! coookieeee!! |
# |
Oct 16th 2019, 13:58 |
paul_83uk |
ahhh ok! sorry hadn't realised that at all. no wonder CakePHP class isn't supporting it yet. |
# |
Oct 16th 2019, 13:57 |
admad |
https://ayesh.me/PHP-Samesite-cookies |
# |
Oct 16th 2019, 13:57 |
admad |
set you can't set `SameSite` option since php itself has no support for hit prior to 7.3 |
# |
Oct 16th 2019, 13:56 |
paul_83uk |
in production |
# |
Oct 16th 2019, 13:56 |
paul_83uk |
7.2.19 at the mo |
# |
Oct 16th 2019, 13:55 |
admad |
@paul_83uk are you using php 7.3? |
# |
Oct 16th 2019, 13:53 |
david |
is the ->translation() method the provided by the trait? |
# |
Oct 16th 2019, 13:51 |
david |
Mmm, I think I have made a mistake reading the docs |
# |
Oct 16th 2019, 13:48 |
admad |
just using the trait won't do anything, you have to use the method the trait provides :slightly_smiling_face: |
# |
Oct 16th 2019, 13:48 |
david |
the result of that pr() is the same using or not the TranslaitTrair |
# |
Oct 16th 2019, 13:47 |
david |
<?php pr($this->Variables->find('translations')->first()); ?> |
# |
Oct 16th 2019, 13:47 |
david |
I am using Translate behaviour. Documentation says that "Working with multiple translations can be done by using a special trait in your Entity class" (using TranslateTrait). I have an entity not using TranslateTrait, and I can't find any difference between using and not using it. |
# |
Oct 16th 2019, 13:42 |
paul_83uk |
Hi All, I'm using Cake\Http\Cookie to create all cookies for my site but I'm looking to set 'SameSite=Lax' as one of the configuration values (I have a PEN test coming up). This does not appear to be an option within the class. Is there a way around this or do I need to stop using the class for now? |
# |
Oct 16th 2019, 12:19 |
eax |
Good to know, thanks @dereuromark! :slightly_smiling_face: |
# |
Oct 16th 2019, 12:17 |
dereuromark |
dunno, but for us ulimit -n 65535 worked with larger code base. |
# |
Oct 16th 2019, 12:17 |
eax |
@dereuromark Ok, that’s the only solution? |
# |
Oct 16th 2019, 12:17 |
dereuromark |
set ulimit higher |
# |
Oct 16th 2019, 12:16 |
eax |
Hi folks! Just upgraded from Cake 3.7.6 to 3.8.5, and I am having some issues running my tests. Specifically, I get: failed to open stream: Too many open files in /home/sites/mysite/htdocs/vendor/composer/ClassLoader.php on line 412. This didn’t happen before the upgrade. Any ideas what I could be doing wrong? |
# |
Oct 16th 2019, 11:33 |
javier.villanueva |
yes ... im very nerd... last time with csv extension i had the same problem, and I forgot it |
# |
Oct 16th 2019, 11:32 |
admad |
hopefully learned an important lesson in debugging :slightly_smiling_face: |
# |
Oct 16th 2019, 11:32 |
javier.villanueva |
i forgot exclude this extension for the theme |
# |
Oct 16th 2019, 11:32 |
javier.villanueva |
solved... after hours... is the theme |
# |
Oct 16th 2019, 11:31 |
javier.villanueva |
ok |
# |
Oct 16th 2019, 10:10 |
javier.villanueva |
if someone has been able to install cakePdf in Cakephp 3.8 please notice me :S |
# |
Oct 16th 2019, 08:37 |
javier.villanueva |
cakepdf ignore my config.... :( always show a pdf viewer and return An error ocurred loading a pdf file |
# |
Oct 16th 2019, 08:34 |
admad |
try using expression instead of key => value in conditions |
# |
Oct 16th 2019, 08:23 |
scuadra |
I also tried the third param of where to be true |