# |
Jun 10th 2021, 17:37 |
tyler.adam.lazenby |
because I use a CI |
# |
Jun 10th 2021, 17:37 |
tyler.adam.lazenby |
ok, I get that, but I also am unit testing lol |
# |
Jun 10th 2021, 17:37 |
kevin.pfeifer |
in this case where you probably just return json data and want to check what is in a variable you can also just log the variable with `Log::write()` |
# |
Jun 10th 2021, 17:35 |
tyler.adam.lazenby |
I personally make heavy use of `debug()` and `dd()` |
# |
Jun 10th 2021, 17:34 |
tyler.adam.lazenby |
without having to pass that |
# |
Jun 10th 2021, 17:34 |
tyler.adam.lazenby |
I am basically trying to make an ajax command that will check if the page making the request is contact action called view, and then check to see what the ID of the viewed item is |
# |
Jun 10th 2021, 17:34 |
kevin.pfeifer |
but I know enough people who still prefer/löve `var_dump()` aka `pr()` |
# |
Jun 10th 2021, 17:34 |
tyler.adam.lazenby |
hahaha |
# |
Jun 10th 2021, 17:33 |
kevin.pfeifer |
I basically can't live without xdebug any more :) |
# |
Jun 10th 2021, 17:33 |
tyler.adam.lazenby |
exactly, like if for example I am making sure I am getting the referrer's parsed parameters |
# |
Jun 10th 2021, 17:28 |
kevin.pfeifer |
like when you are first creating the logic for that controller action? |
# |
Jun 10th 2021, 17:26 |
tyler.adam.lazenby |
when you are first going through creating a controller action, and want to make sure you are getting the right information passed, do you use unit testing (as opposed to just echoing it to the screen) or is there a more "standard" approach? |
# |
Jun 10th 2021, 13:52 |
philo.hamel |
see `colType` |
# |
Jun 10th 2021, 13:51 |
philo.hamel |
https://github.com/FriendsOfCake/search/tree/master/docs#like |
# |
Jun 10th 2021, 13:49 |
philo.hamel |
```->like('myfield', [ 'field' => 'myfield', 'colType' => ['myfield' => 'string'], ])``` |
# |
Jun 10th 2021, 13:47 |
philo.hamel |
that was easier in CakePHP 2, at least that's what I'm finding while migrating our application |
# |
Jun 10th 2021, 13:46 |
kevin.pfeifer |
sometimes its not possible to just jam everything into just one search input and you have to add more inputs to allow more precise searching |
# |
Jun 10th 2021, 13:42 |
kevin.pfeifer |
well I would guess you want to do something like that, right? ```'Users.myfield LIKE' => '%test%'``` where Users.myfield is a decimal but your search input is a string |
# |
Jun 10th 2021, 13:40 |
paolo.bragagni |
PS. we are only 3 that use this slack?? :( |
# |
Jun 10th 2021, 13:39 |
paolo.bragagni |
in friendsofcake search plugin which is the best way to manage errors (I mean Cannot convert value of type `string` to a decimal) |
# |
Jun 10th 2021, 13:11 |
kevin.pfeifer |
thanks for that explanation :) |
# |
Jun 10th 2021, 13:10 |
kevin.pfeifer |
i see |
# |
Jun 10th 2021, 13:04 |
admad |
@kevin.pfeifer @thomas078 There problem isn't with env variables but with the `.env` files. Env variables as per their belong in the environment not files. The `.env` files should only be used locally to emulate env vars. In production only **actual** env vars should be used. |
# |
Jun 10th 2021, 11:30 |
slackebot |
<jpramirez> |
# |
Jun 10th 2021, 09:34 |
thomas078 |
confusing |
# |
Jun 10th 2021, 09:34 |
thomas078 |
@kevin.pfeifer how i understand is that it is atleast a performance issue. .env variables should be set to local environment, not using that file |
# |
Jun 10th 2021, 09:30 |
kevin.pfeifer |
@thomas078 I am also curious about that `.env` topic because there is no warning about that in the cakephp 4 book https://book.cakephp.org/4/en/development/configuration.html#environment-variables |
# |
Jun 10th 2021, 09:09 |
kevin.pfeifer |
or whatever webserver you are using |
# |
Jun 10th 2021, 09:08 |
kevin.pfeifer |
See https://apache.tutorials24x7.com/blog/how-to-enable-tls-1-2-and-tls-1-3-in-apache-web-server for Apache or https://www.howtoforge.com/how-to-enable-tls-13-in-nginx/ for NGINX |
# |
Jun 10th 2021, 09:07 |
kevin.pfeifer |
CakePHP doesn’t care if you call it via HTTP or HTTPS and therefore it doesn’t care if its SSL3, TLS 1.1 or TLS 1.3 The encrypted HTTP traffic is handled by your webserver |
# |
Jun 10th 2021, 09:06 |
mocelle |
Cakephp 3.9 support allready tls1.3? |
# |
Jun 10th 2021, 09:04 |
kevin.pfeifer |
@mocelle that is decided by the settings of your webserver, not cakephp |
# |
Jun 10th 2021, 08:56 |
mocelle |
How to force Client to use tls1.3? |
# |
Jun 10th 2021, 08:50 |
thomas078 |
Enabling .env on cake 3.9. Now i read documentation and is says "It is HIGHLY discouraged to use a .env file in production, due to security risks * and decreased performance on each request..." I though that .env is the way to go? |
# |
Jun 10th 2021, 08:34 |
paolo.bragagni |
in friendsofcake search plugin which is the best way to manage errors (I mean Cannot convert value of type `string` to a decimal) |
# |
Jun 10th 2021, 03:51 |
admad |
There are other webservices for the same. |
# |
Jun 10th 2021, 03:50 |
admad |
For e.g. for local/intranet use there's Mailhog |
# |
Jun 10th 2021, 03:49 |
admad |
@kevin.pfeifer a better way would be to use a different transport config based on environment/debug mode and send them all to a "mail catcher". |
# |
Jun 9th 2021, 21:26 |
kevin.pfeifer |
Is it possible to “globally overwrite” all recipients of mails sent via a Mailer? I would like to add a config for a sort of “Email debug mode” where all mails are being sent to a defined mail. Or do I have to add that logic to all my “reusable mailer functions”? |
# |
Jun 9th 2021, 13:56 |
paolo.bragagni |
found sorry |
# |
Jun 9th 2021, 13:50 |
paolo.bragagni |
I get '*Cannot convert value of type `string` to integer'* |