Log message #4222195

# At Username Text
# Jan 13th 2020, 16:31 neon1024 192.168.1.12 or whatever it is
# Jan 13th 2020, 16:31 Human_G33k but it s work in local
# Jan 13th 2020, 16:31 neon1024 ..and then access is using the machines lan ip
# Jan 13th 2020, 16:30 Human_G33k it says database driver is wrong
# Jan 13th 2020, 16:30 neon1024 You would need to expose the database to the network
# Jan 13th 2020, 16:30 Human_G33k but not from the lan
# Jan 13th 2020, 16:30 Human_G33k local work with 127
# Jan 13th 2020, 16:30 Human_G33k the conf in local or app not work
# Jan 13th 2020, 16:29 ndm Basically, yes. You'd most likely use `allowEmptyString()`, as most of the time request data is actually a string, as validation happens before marshalling. If you have an API, and therefore parse raw data into request data, you might have a problem, as @dereuromark pointed out, as you'd likely receive integers as actual integers.
# Jan 13th 2020, 16:29 Human_G33k how can i set up config (database) for local network with embed dev php server ?
# Jan 13th 2020, 16:25 phantomwatson Oh, cool. So essentially for a nullable integer field, I just need `allowEmptyArbitrary()` :)
# Jan 13th 2020, 16:24 ndm fyi, all `allowEmpty*` methods do allow `null`
# Jan 13th 2020, 16:23 phantomwatson So you'd recommend adding `allowEmptyString()` and having the value saved as `'field' => $value ?? ''`? It feels hacky, but it's ultimately just six more characters, so not a huge deviation from what I was originally doing.
# Jan 13th 2020, 16:20 dereuromark the API is an issue for sure these days. I keep the old ones with deprecations silenced for usability.
# Jan 13th 2020, 16:20 dereuromark mainly the "As request data is all strings" only being partially the case, even thow most of the time. @neon1024 is still right about the approach.
# Jan 13th 2020, 16:19 dereuromark Nah, I was just adding a remark :) All good.
# Jan 13th 2020, 16:18 neon1024 I’ve kept the deprecation errors :zipper_mouth_face:
# Jan 13th 2020, 16:18 phantomwatson Whoops, didn't mean to open up a can of works. :)
# Jan 13th 2020, 16:18 neon1024 I’ll hand over to @dereuromark he’ll have a much better idea of it than I will 8)
# Jan 13th 2020, 16:17 dereuromark which is not even true, some can come in via API, and will not be strings. I pointed out before this should have been allowEmptyScalar() if anything.
# Jan 13th 2020, 16:17 neon1024 So you might want allowEmptyString and isNumeric
# Jan 13th 2020, 16:17 neon1024 As request data is all strings, perhaps it’s just allow string
# Jan 13th 2020, 16:17 neon1024 https://api.cakephp.org/3.8/class-Cake.Validation.Validator.html#_allowEmptyString
# Jan 13th 2020, 16:17 neon1024 Man, I hate the validation now
# Jan 13th 2020, 16:16 neon1024 Ah, just a missing method
# Jan 13th 2020, 16:16 phantomwatson In the Validator class?
# Jan 13th 2020, 16:16 neon1024 It’s in 3.x
# Jan 13th 2020, 16:16 phantomwatson Is `allowEmptyInteger()` something in CakePHP 4? I'm not seeing it in 3.
# Jan 13th 2020, 16:15 phantomwatson I don't think there's anything wrong with the methods that I mentioned.
# Jan 13th 2020, 16:14 neon1024 The test cases might shed some light
# Jan 13th 2020, 16:14 neon1024 I don’t think it enforces a type when not empty, although the method name would lead me to think it would
# Jan 13th 2020, 16:14 neon1024 As for the question, I think allowEmptyInteger with boolean controls empty
# Jan 13th 2020, 16:13 neon1024 For most of the reasons you’ve pointed out
# Jan 13th 2020, 16:13 neon1024 The API is garbage now
# Jan 13th 2020, 16:13 neon1024 Validation? Nope. :hankey: :fire:
# Jan 13th 2020, 16:12 slackebot types. `->requirePresence('fieldname', false)` would cover the condition of the field not being present in the data array, but I want to avoid tripping any validation errors if it _is_ present and `null`. Anyone have any advice?
# Jan 13th 2020, 16:12 phantomwatson I'm somehow forgetting a basic validation thing for CakePHP 3. If a field is a nullable integer field, does `$validator->integer('fieldname')` cover that, or is an `->allowEmptyFoo()` rule also necessary? With `allowEmpty()` being deprecated, I forget what the equivalent is of "allow null values". `Validation::isInteger()` looks like it would fail for `null`, but the `allowEmptyFoo()` methods seem to all expect empty values of non-null
# Jan 13th 2020, 16:09 dereuromark keep the side effects minimal.
# Jan 13th 2020, 16:09 dereuromark then isolate it to the controllers and actions.
# Jan 13th 2020, 16:08 ckjksl Partially our fault. We never got samples of truly large entities during our coding process (and we still don't). The entities the users are trying to duplicate are fairly involving. I'm not saying we can't split it up and defer it to background tasks, but right now, the users just need more memory while we work on and test a long term fix.
# Jan 13th 2020, 16:04 dereuromark the question for me would be: why is the memory needed and couldnt this be async/deferred to background tasks? you usually also face other issues here as side effects, e.g. nginx repsonse time limit etc.