Log message #4223453

# At Username Text
# Jan 23rd 2020, 01:39 dereuromark I found out the same. Could also have been a dto^^
# Jan 23rd 2020, 00:25 luizcmarin @wizardfix https://api.cakephp.org/3.8/class-Cake.Validation.Validator.html#_sameAs ?
# Jan 22nd 2020, 23:44 challgren So question with custom transports? I was under the understanding `Transport::send()`could return an array with anything in the array but in the CakePHP 4.0.2 code its typehinted with `@psalm-return array{headers: string, message: string}`
# Jan 22nd 2020, 23:26 wizardfix @luizcmarin https://api.cakephp.org/3.7/class-Cake.Validation.Validator.html#_uploadedFile
# Jan 22nd 2020, 23:24 slackebot compares two fields but can't find it now. :) Looking at Stack Ovf etc. I find all sorts of ways of achieving this, many of which look pretty hacky. So I'm just looking for some advice on which way to go with this please... :thinking_face:
# Jan 22nd 2020, 23:24 wizardfix *Validation question: using Cake 3.8* I need to validate a User entity by comparing `password` and `confirm_password` fields and checking the password contains one of a list of non-alphanumeric characters. So I have been trying to find a `Cake\Validation\Validator` method that compares two fields, and a method that checks a string. I guess I need to write a custom validator for the latter, but I'm sure I found a method recently that
# Jan 22nd 2020, 22:52 ndm It's a PHP thing, scalar values are integers, floats, booleans and string
# Jan 22nd 2020, 22:51 luizcmarin @ndm 'scalar' cake === 'string' ?
# Jan 22nd 2020, 22:49 slackebot and then use application rules on the actual field, to validate the path where the file has been stored, at least that's for solutions where the path is being figured in the saving stage.
# Jan 22nd 2020, 22:49 ndm You are validating the `foto1` field as a scalar, which fails because the uploaded file object isn't a scalar value. I'm not familiar with that plugin, but it seems that it you have to care about handling the upload kinda yourself: https://github.com/josbeir/cakephp-filesystem#simple-upload-example Generally to avoid such problems with uploads, people usually use a separate field for the upload, one wich will have actual upload validation rules,
# Jan 22nd 2020, 22:44 luizcmarin Perhaps some more information will help. I'm trying to use https://github.com/josbeir/cakephp-filesystem to make uoploads of images. But it's hard ...
# Jan 22nd 2020, 22:39 luizcmarin does anyone know anything about this type of error?
# Jan 22nd 2020, 22:13 luizcmarin I have a type => 'File' field for uploading an image. It is mysql, varchar (255). I am now getting the "Object of class Laminas \ Diactoros \ UploadedFile error could not be converted to string." What type should be used in the database? I installed the plugin https://github.com/josbeir/cakephp-filesystem.
# Jan 22nd 2020, 20:24 challgren Install the suggestions if your going to use them such as storing them in a cloud provider
# Jan 22nd 2020, 20:23 luizcmarin @challgren install suggests ?
# Jan 22nd 2020, 20:21 luizcmarin I hope it is easy to use...
# Jan 22nd 2020, 20:19 challgren `composer require josbeir/cakephp-filesystem`
# Jan 22nd 2020, 20:19 challgren Yes release 2.0.1
# Jan 22nd 2020, 20:18 luizcmarin https://github.com/josbeir/cakephp-filesystem :+1: I will follow here. Right?
# Jan 22nd 2020, 20:17 luizcmarin :man-facepalming:
# Jan 22nd 2020, 20:17 luizcmarin I didn't translate your message correctly ...
# Jan 22nd 2020, 20:17 challgren Only the plugins with :strawberry: are cake 4 comp
# Jan 22nd 2020, 20:16 challgren https://cakesf.slack.com/archives/C053DPNGT/p1579654134254800
# Jan 22nd 2020, 20:15 luizcmarin @challgren
# Jan 22nd 2020, 20:15 luizcmarin and there is only this 'master'
# Jan 22nd 2020, 20:15 luizcmarin yea. I followed your link and got this
# Jan 22nd 2020, 20:13 challgren The friendsofcake/awesome list has good plugins that are cake 4 ready
# Jan 22nd 2020, 20:12 luizcmarin ops moment
# Jan 22nd 2020, 20:12 challgren @luizcmarin why are you using a 3 plugin with cake 4?
# Jan 22nd 2020, 20:10 luizcmarin I will change this to start
# Jan 22nd 2020, 20:09 luizcmarin https://github.com/Xety/Cake3-Upload
# Jan 22nd 2020, 20:09 ricksaccous are you using a plugin or writing file handling on your own?
# Jan 22nd 2020, 20:09 ricksaccous make sure you can reference it
# Jan 22nd 2020, 20:08 ricksaccous @luizcmarin generally you want to store the name of the file (maybe filesize/mimetype) and then move the file into a local directory
# Jan 22nd 2020, 20:07 luizcmarin I'm trying to upload my first files. The fields are varchar (255) (mysql). It returns the image error. As I said, it is my first test and I do not know how to solve this type of error. Please, any guidance?
# Jan 22nd 2020, 19:48 FredSavagely Oh, looks like you might be right: https://github.com/cakephp/authentication/blob/master/src/View/Helper/IdentityHelper.php
# Jan 22nd 2020, 19:46 ndm Views have access to the request via `$this->request` too
# Jan 22nd 2020, 19:43 ricksaccous you might as well do that, i think they had an identity helper
# Jan 22nd 2020, 19:42 FredSavagely Like, assign the response of `$this->request->getAttribute('identity')` to the view?
# Jan 22nd 2020, 19:42 FredSavagely Do I just need to assign the identity to the view and then use that to check?
# Jan 22nd 2020, 19:41 ricksaccous they have that but if it doesn't have what you want then you should figure out a way to handle it on your own