Logs for #cakephp

Page 1 of 35,912, showing 100 records out of 3,591,168 total, starting on record 1, ending on 100

# At Username Text
# Today, 13:34 admad the intellisense plugin does caching
# Today, 13:33 flavius does vs code not have a caching mechanism?
# Today, 13:33 admad well if the java based monster works faster for you use that :slightly_smiling_face:
# Today, 13:32 flavius Eclipse
# Today, 13:32 admad @flavius "my other IDE" phpstorm?
# Today, 13:32 flavius File uploaded https://cakesf.slack.com/files/U75U0UMR9/FBUFG0LTS/image.png / https://slack-files.com/T053DPNCM-FBUFG0LTS-003cb2bc8f - it was for real deprecated, my IDE was showing it so i've fixed it with getRequest(), dereuromark then came along and updated it as a soft deprecation :slightly_smiling_face:
# Today, 13:31 admad child classes can use protected properties :slightly_smiling_face:
# Today, 13:31 admad "The property will become protected"
# Today, 13:31 flavius however, i believe there was one or two if not more releases with it being deprecated and my other IDE was going crazy so I've fixed that
# Today, 13:30 flavius https://github.com/cakephp/cakephp/blame/1f51a72d4b85ab98e0a1dcc195d50565c847724e/src/Controller/Controller.php#L128
# Today, 13:30 flavius ` * Deprecated 3.6.0: The property will become protected in 4.0.0. Use getRequest()/setRequest instead.` -- yeah, dereuro, you fixed that with a soft deprecation 3 months ago
# Today, 13:28 flavius File uploaded https://cakesf.slack.com/files/U75U0UMR9/FBV32722F/image.png / https://slack-files.com/T053DPNCM-FBV32722F-c33045996a - yeah, and i've disabled the native php typehinting as well
# Today, 13:28 admad @flavius have you installed the php intellisense plugin?
# Today, 13:27 dereuromark he might not have latest code, it is fixed there to a soft deprecation
# Today, 13:27 dereuromark for external use
# Today, 13:27 admad it's made protected instead of public, not deprecated
# Today, 13:27 dereuromark no
# Today, 13:27 flavius `$this->request` was deprecated
# Today, 13:26 styks1987 Their community page appears down too
# Today, 13:26 dereuromark inside controller you shouldnt need getRequest() :slightly_smiling_face:
# Today, 13:26 styks1987 Sorry this is off topic but I am at a loss where to find help on this. UPS test webservices appears to be down. I have no way to validate this outside of my connection. Does anyone know of a ups api status page?
# Today, 13:25 flavius where's @admad pinging doctor @admad :P
# Today, 13:24 flavius does VS code not cache anything?
# Today, 13:24 flavius and everything is on a SSD
# Today, 13:23 flavius 4 seconds of loading to be exact
# Today, 13:23 flavius you press ctrl + space and you're greeted with a "loading", how wonderful :P
# Today, 13:22 flavius this feels sluggish
# Today, 13:22 flavius my other IDE took it's sweet time to cache everything, sure i had to wait a bit to load the whole project but when it was ready everything was instant
# Today, 13:21 flavius maybe there's a setting somewhere, however i'm a newb :slightly_smiling_face:
# Today, 13:20 flavius and the loading is annoying me, it's not "instant" like i'm used to
# Today, 13:20 flavius so now that works after trying it a second time
# Today, 13:19 flavius File uploaded https://cakesf.slack.com/files/U75U0UMR9/FBUKW2QBT/image.png / https://slack-files.com/T053DPNCM-FBUKW2QBT-ba48a1b9b0
# Today, 13:17 dereuromark what code exist is still lacking? i am curious
# Today, 13:16 flavius even with dereuromark's IDE helper
# Today, 13:16 flavius @neon1024 so you haven't used it in any projects yet huh? im also trying it out but there's some code assist things that are lacking
# Today, 13:15 dereuromark I prefer components :slightly_smiling_face:
# Today, 13:15 flavius @dereuromark :slightly_smiling_face:
# Today, 13:15 flavius you can have private functions that are helpers for those actions however
# Today, 13:15 flavius public functions in controllers go to actions (URL)
# Today, 13:14 flavius >> is this right ? yep
# Today, 13:01 mr.mjsm File uploaded https://cakesf.slack.com/files/UBN7KUDRA/FBUKK0LGZ/-.php / https://slack-files.com/T053DPNCM-FBUKK0LGZ-9eaa362de6 - <@U75U0UMR9> ok i did it like this and it worked thanks. my question now. i wrote a method in my UserController to display the name. now i feel this is wrong, these type of method should be put in a helper. is this right ? so the controller should only have add edit delete index or actions that require a URL
# Today, 12:34 neon1024 @flavius I gave VS Code a bit of a try out, but I haven’t used it properly for a whole day yet
# Today, 12:33 dereuromark highstrike: dont tell them lies. tabs are superior. it is just that the psr people are 90s :slightly_smiling_face: and as such cake has to do that now.
# Today, 12:22 mr.mjsm thanks
# Today, 12:22 mr.mjsm ok i think i got it. will work on it
# Today, 12:22 flavius you write your function in your custom helper and you call that function from your templates
# Today, 12:21 mr.mjsm and i can call the function from my helper method ?
# Today, 12:20 flavius and then all your templates can access that function :slightly_smiling_face:
# Today, 12:20 flavius https://book.cakephp.org/3.0/en/views/helpers.html
# Today, 12:19 flavius just like `$this->Html` is HtmlHelper in the cake's core
# Today, 12:18 flavius then you are looking for a view helper
# Today, 12:18 mr.mjsm File uploaded https://cakesf.slack.com/files/UBN7KUDRA/FBW6UTTT9/-.php / https://slack-files.com/T053DPNCM-FBW6UTTT9-5977770f01 - i want to use something like this in my index ctp
# Today, 12:17 flavius you can however use `$this->set('variable_name', $variable)` to pass to the template the `$variable_name`
# Today, 12:16 flavius public functions in controller generally mean they are actions
# Today, 12:16 flavius you shouldn't add functions / methods in the template file
# Today, 12:15 mr.mjsm i have another question, can I use this method in my index ctp ?
# Today, 12:15 flavius lel
# Today, 12:14 mr.mjsm good point. come to our university, you will be distinguished prof. in the first week
# Today, 12:13 flavius because a tab could be a different number of columns depending on your environment, but a space is always one column :slightly_smiling_face:
# Today, 12:12 mr.mjsm isn't it better to use tabs for indentation ? that's what i was taught for python
# Today, 12:12 flavius for indentation
# Today, 12:12 mr.mjsm why ?
# Today, 12:12 flavius also don't use tabs, use spaces :slightly_smiling_face:
# Today, 12:11 flavius ``` public function displayName($id) { $this->loadModel('Users'); $user = $this->Users->get($id); echo $user->name; } ```
# Today, 12:11 flavius so you need to add `$this->loadModel('Users');` in that function to make it work
# Today, 12:10 flavius `$this->Users` means the model that is autoloaded with the controller because the controller has the same name
# Today, 12:09 mr.mjsm File uploaded https://cakesf.slack.com/files/UBN7KUDRA/FBV9PPDHT/-.php / https://slack-files.com/T053DPNCM-FBV9PPDHT-05cf54cc7d - this method in the UsersController, i want to use it in the ServersController, if i want to get the user name. I already have the user id. just want to use this method and echo the result
# Today, 12:05 mr.mjsm @flavius I need your help
# Today, 12:00 flavius @neon1024 did you start using vs code yet?
# Today, 11:31 portilloster @neon1024 Will try! Anyway the column type is not a string but a medium blob. I believe that creates anyway that problem.
# Today, 11:30 turkles of course all mine were 0 values, but you could replace that with an array of values you want too..
# Today, 11:30 neon1024 @portilloster Just create whatever folder you want, it doesn’t matter really. I put my type file there as that’s the folder they use in the core :0
# Today, 11:29 turkles if anyone is interested I ended up creating $defaults in my entity constructor: parent::__construct($properties,$options); foreach($defaults as $value) { if (!property_exists($this,$value) andand !isset($this->{$value})) $this->{$value}=0; }
# Today, 11:27 dereuromark i meant clementcrown
# Today, 11:26 portilloster @dereuromark Can you tell me which pluggin and how to install it?
# Today, 11:24 dereuromark you install the plugin as usual
# Today, 11:22 portilloster @neon1024 Thanks for reply! I´m trying to implement what you said but I miss the Database folder under src. I´m in cakephp 3.5. Is this normal? Do I need to create the path and the file?
# Today, 11:19 turkles yup I am still stuck on making a default entity. How can I populate some fields when I make a brand new entity, without having to put all those values in the newEntity()?
# Today, 11:16 clementcrown @dereuromark please do I just download the file and add it in my cakephp application ? i mean https://github.com/dereuromark/cakephp-tools/blob/master/src/Auth/MultiColumnAuthenticate.php
# Today, 11:02 neon1024 Afternoon @dereuromark :wave:
# Today, 11:01 neon1024 https://book.cakephp.org/3.0/en/controllers/components/authentication.html#creating-custom-authentication-objects
# Today, 11:01 neon1024 https://book.cakephp.org/3.0/en/controllers/components/authentication.html#customizing-find-query
# Today, 11:00 dereuromark usually a custom finder can be enough however. depends on the use case I guess.
# Today, 10:59 clementcrown thanks @dereuromark let me check out the article
# Today, 10:59 clementcrown thanks @neon1024 , please can you shed more light on this?
# Today, 10:58 dereuromark thats what I use.
# Today, 10:57 dereuromark Or use the existing multicolumn adapters, e.g. https://github.com/dereuromark/cakephp-tools/blob/master/src/Auth/MultiColumnAuthenticate.php
# Today, 10:56 neon1024 Yes, it’s possible. You could either customise your Auth finder, or write your own Authentication adapter
# Today, 10:55 clementcrown @abdualelah.mdy can I have users login to a cakephp application with email/Password or Matric Number/Password? , I have some users who will login with email and password, then I also have some other sets of users who would login with matric number and password, is this possible on a single cakephp installation and database? if yes, please explain.
# Today, 10:39 neon1024 @portilloster I would guess that you have not declared a custom data type for the `Foto` field, and as such it is being marshalled into a string, because your database column is a string type. You will probably want a File data type, to get the post array through the marshaller. https://github.com/davidyell/CakePHP3-Proffer/blob/master/src/Database/Type/FileType.php then set the data type `Type::map('proffer.file',
# Today, 10:39 slackebot '\Proffer\Database\Type\FileType');` you can find out more in the book https://book.cakephp.org/3.0/en/orm/database-basics.html#adding-custom-database-types
# Today, 10:35 mr.mjsm so I am in the server view page, I have the manager id, i want to output the manager name and link it to the manager view page. i have a customized method in the manager controller "displayName ($id)" which will return the name of the manager given the id. how can I use this method in the server view page ?
# Today, 10:15 portilloster File uploaded https://cakesf.slack.com/files/U9CUM170B/FBUCJD96U/-.php / https://slack-files.com/T053DPNCM-FBUCJD96U-975d477984
# Today, 10:14 portilloster Hi guys! I´m having problems trying to upload a image. I have a controller with a method where the user can edit some of his information, user picture included. When I debug the variable that contain the picture file I just get the name of the file 'name.extension' instead of the array file.
# Today, 10:07 fvanhest I’ll have to look within our own application. The $data property remains empty when it is injected in the controller. At the point that the an action (crud) is invoked, the property is filled.
# Today, 10:01 neon1024 But it will be set very early, yes, as it’ll be present in the Middleware :slightly_smiling_face:
# Today, 10:00 neon1024 Only if the deprecated class is still being used
# Today, 09:57 fvanhest @neon1024 Thanks. The $data property is set at https://github.com/cakephp/cakephp/blob/master/src/Http/ServerRequest.php#L361
# Today, 09:53 neon1024 ..and you can see the building the Request object
# Today, 09:53 neon1024 Which leads back here, https://github.com/cakephp/cakephp/blob/master/src/Http/Server.php#L85