Log message #4179047

# At Username Text
# Mar 9th 2019, 11:43 chunu hello
# Mar 8th 2019, 19:12 mdotobie gotcha @admad, so I went back to my original strategy of only running the format validation rules if there is data present, I even abstracted it away to a method called `hasContent`
# Mar 8th 2019, 18:33 admad @mdotobie it's not cause notEmpty() is a special validation method not a validation rule
# Mar 8th 2019, 16:20 mdotobie https://cakesf.slack.com/archives/C053DPNGT/p1552003829368200
# Mar 8th 2019, 16:20 mdotobie Referencing this code. Is there a way to include the `last` key on the `allowEmpty` and `notBlank` validation methods. I don’t want the user to see the errors related to incorrect formats until they have corrected the error about missing value.
# Mar 8th 2019, 16:16 mike271 db session engine*
# Mar 8th 2019, 16:16 mike271 I see this is the default for the db handler in cake
# Mar 8th 2019, 16:16 mike271 http://php.net/manual/en/session.configuration.php#ini.session.serialize-handler
# Mar 8th 2019, 16:15 mike271 Is there a special reason to use 'php' instead of 'php_serialize' for session handling? I cannot find much information about it.
# Mar 8th 2019, 16:13 sdevore Mostly when I am doing model changes or large imports of data. I do have one place where I use a queue to update some counters after some common operations, mainly because I use the counters to speed up some report queries
# Mar 8th 2019, 15:58 itmpls only after batch imports..
# Mar 8th 2019, 15:58 itmpls you run it just once when needed?
# Mar 8th 2019, 15:56 itmpls interesting
# Mar 8th 2019, 13:32 dereuromark with deferred Script output yes
# Mar 8th 2019, 13:28 grossolive4 Hi everyone, Can postLink be used in Form?
# Mar 8th 2019, 11:41 neon1024 Rather than `boolean` :) :rubberduck:
# Mar 8th 2019, 11:41 neon1024 `'line_rental_included' => ['type' => 'integer', 'length' => 1, 'null' => false],`
# Mar 8th 2019, 11:37 neon1024 It’s a plugin!
# Mar 8th 2019, 11:36 neon1024 Worth downgrading to 3.6?
# Mar 8th 2019, 11:36 neon1024 I have a question, I’ve checked out a project, done `composer install`, went to run the tests and am seeing `InvalidArgumentException: Cannot convert value of type `boolean` to integer` which seems to be related to a Fixture. I’m guessing that it might be related to the marshaller, but I’m unsure why this would be happening unless Cake has changed something, this is running 3.7.4
# Mar 8th 2019, 11:35 neon1024 These are the questions I ask myself before implementing caching
# Mar 8th 2019, 11:35 neon1024 Is the query slow? How much data is there? How often is it run? Do you need caching? Are you pre-optimizing?
# Mar 8th 2019, 11:34 neon1024 I guess you might mean the query params are year and user, not that you want to cache a years worth of query data?
# Mar 8th 2019, 11:33 neon1024 I think so
# Mar 8th 2019, 11:19 willem is it? why? i get transactions for different years for different companies/users. so i want to cache those results per user/year. is that strange?
# Mar 8th 2019, 10:49 neon1024 If ‘queries’ means database queries, then this is a very strange and confusing use-case to me
# Mar 8th 2019, 10:49 neon1024 > I want to cache multiple queries per year, per user
# Mar 8th 2019, 09:49 willem i cannot use groups, because that would invalidate for all users in the group
# Mar 8th 2019, 09:48 willem anynbody know a solution for this. I want to cache multiple queries per year, per user. so i can create cache keys containing a year and a slug for example. But now i need to invalidate all keys for a specific slug. is there a solution for this? ``` 'query:data:transactions:2018:slug' 'query:data:transactions:2019:slug' 'query:data:transactions:2018:slug2' ```
# Mar 8th 2019, 09:12 voycey Basically if we just wanted to cakeify some internal functions provided by mysql?
# Mar 8th 2019, 09:11 voycey Question: Is there a shortcut for creating a cake adapter for internal mysql functions?
# Mar 8th 2019, 09:11 voycey (evening for me!)
# Mar 8th 2019, 09:11 voycey ^morning!
# Mar 8th 2019, 09:05 neon1024 Morning everyone
# Mar 8th 2019, 05:18 mdotobie Thanks for having a look @admad. I have the trim methods because I didn’t want the format validations to run. But I completely forgot I could set the ‘last’ option
# Mar 8th 2019, 04:10 admad @mdotobie what you have shown is fine. Just the trimming in methods which check format is redundant
# Mar 8th 2019, 02:58 sdevore I use this https://gist.github.com/hmic/f38b409bb483de8d5b85bec1e0334abe trait on models and then just use $this->ModelIBatchedUp->updateCounterCache(); from the controller
# Mar 8th 2019, 00:10 mdotobie Here’s my code for context
# Mar 8th 2019, 00:09 slackebot1 the proper combination. Do I absolutely have to have both in this scenario. I don’t mind a future refactor but I just want to get my head around how it works.
# Mar 8th 2019, 00:09 slackebot1 entries and trigger my customer message if it is. It triggers my custom message if the field has white space but no actual text, however, it shows the default `This field cannot be left empty` be empty if it has no value at all. This seemed to suggest I needed to also have the `allowEmpty()` validator rule as well (I’m using allowEmpty() with the `on` attribute set to `false` since the documentation states that the use of `notEmpty` is deprecated).
# Mar 8th 2019, 00:09 mdotobie I’m trying to make sure I understand the use of `allowEmpty()` and and `notBlank()` when creating a validator. I have a postal code field that validates US or Canadian formatted zip codes. I have the `regex` rules working fine, but I can’t seem to make it work as expected with the `allowEmpty()` and `notBlank`, my thought process says that I should just be able to use `notBlank()` alone. This should guard against no input or all white s