Log message #4119942

# At Username Text
# Feb 26th 2018, 17:41 angelxmoreno greetings bakers! I looked at the docs and the code but I am unable to clearly see why I am unable to properly add to my collection: ``` $collection = new \Cake\Collection\Collection(['jack']); $collection->append(['jill']); $collection->append(['up'=>'hill']); var_dump($collection->toList()); array(1) { [0] => string(4) "jack" } ```
# Feb 26th 2018, 17:04 savant heh
# Feb 26th 2018, 16:45 neon1024 LISTER: And you haven’t done it yet?! RIMMER: Tomorrow. It’s on tomorrow’s daily goal list. Item 34, right after “Learn Portugese.”
# Feb 26th 2018, 16:45 neon1024 Well, to quote Red Dwarf
# Feb 26th 2018, 16:40 savant still blog
# Feb 26th 2018, 16:40 savant lol
# Feb 26th 2018, 16:38 neon1024 It could just be that the tests are hard to write because I have written bad code of course
# Feb 26th 2018, 16:34 savant documentation is focused, while blogging is free form
# Feb 26th 2018, 16:34 savant not really
# Feb 26th 2018, 16:34 neon1024 Perhaps I can submit an article on it to Cake, as I recall @megan looking for writers
# Feb 26th 2018, 16:33 neon1024 But then we drift back towards the bakery and mired in the admin timesink
# Feb 26th 2018, 16:33 neon1024 I worry that spreading knowledge of the framework across lots of small blogs will dilute the potency of the documentation
# Feb 26th 2018, 16:32 savant im sure others are having the same issues as you :slightly_smiling_face:
# Feb 26th 2018, 16:32 savant what would help is if you blogged about things you found frustrating and then simple solutions people provide
# Feb 26th 2018, 16:32 neon1024 I would like to really spend a bit of time showing a test which mocks some of the bits I think are difficult, and then I can submit that. Which I think would be more helpful :slightly_smiling_face:
# Feb 26th 2018, 16:32 savant thats fine
# Feb 26th 2018, 16:31 neon1024 Why is why I’m a little hesitant, as usually in these situations, at least, historically. I get frustrated by something, submit an issue and @admad closes it with a simple solution which I’ve either missed, or didn’t implement
# Feb 26th 2018, 16:29 savant i’m pretty sure I do that to test the upload behavior
# Feb 26th 2018, 16:29 neon1024 Or passing the table class an instance of the test connection
# Feb 26th 2018, 16:29 neon1024 As you can’t really mock a Table class without mocking a connection and schema
# Feb 26th 2018, 16:27 neon1024 I should write some tests really to demonstrate it
# Feb 26th 2018, 16:27 neon1024 I thought I’d submitted an issue about it a long time back, but I can’t seem to find it
# Feb 26th 2018, 16:26 neon1024 Mocking a Table class is kinda tough
# Feb 26th 2018, 16:26 neon1024 Not really
# Feb 26th 2018, 16:25 savant Do you have specific examples of stuff you’re trying to do that seems hard?
# Feb 26th 2018, 16:24 neon1024 I just always seem to find myself in a rabbit hole of mocks
# Feb 26th 2018, 16:24 neon1024 I don’t know enough about mocks, or the ORM to be able to suggest what is wrong
# Feb 26th 2018, 16:24 neon1024 The main one is the coupled nature of Entity and Table, alongside Connection and Schema
# Feb 26th 2018, 16:23 savant hard to fix what we dont know is broken
# Feb 26th 2018, 16:23 savant which parts? and have you filed issues so we can fix individual things?
# Feb 26th 2018, 16:23 savant Fair enough. I do something similar with my calico CMS, though i do some back-asswards stuff there since applying validation rules “twice” in a sense
# Feb 26th 2018, 16:23 neon1024 I find not being able to mock the various parts of the ORM quite frustrating
# Feb 26th 2018, 15:44 admad Another thing, they don't use cryptographically safe / non guess able tokens as recommended by oauth2 standard
# Feb 26th 2018, 15:41 steinkel thanks, interesting points there
# Feb 26th 2018, 15:37 admad @steinkel https://github.com/hybridauth/hybridauth/issues/904
# Feb 26th 2018, 15:35 admad @steinkel https://github.com/ADmad/cakephp-social-auth/issues/29
# Feb 26th 2018, 15:01 daniel_ i will use javascript
# Feb 26th 2018, 14:36 watermark daniel_: I second neon, javascript is probably best for that. I can think of ways that it would be possible using only cake, but it seems harder to do it that way
# Feb 26th 2018, 14:33 steinkel hey @admad any reason you are switching from https://github.com/ADmad/CakePHP-HybridAuth to https://github.com/ADmad/cakephp-social-auth ?
# Feb 26th 2018, 14:08 neon1024 I use javascript for that personally
# Feb 26th 2018, 13:45 daniel_ hello, someone knows what's the best practice in cakephp for doing multiple fieldsets with "add more" button?