Log message #3938617

# At Username Text
# Sep 27th 2016, 16:16 hmic you can just add the requirements to the composer.json and composer dump-autoload
# Sep 27th 2016, 16:16 hmic sure. if composer handles autoload
# Sep 27th 2016, 16:16 froodley we already bring cake2 in with composer, but i think that's not what you're talking about?
# Sep 27th 2016, 16:15 hmic i'd go this way. if you dont and need custom autoloading, you've got the solution already.
# Sep 27th 2016, 16:15 hmic and it solved the autoloading issues and dependencies at once
# Sep 27th 2016, 16:14 hmic and there is composer suppport for cake2 available, its not as good, but working
# Sep 27th 2016, 16:14 hmic cake3 uses composer (only)
# Sep 27th 2016, 16:14 froodley have to think about that
# Sep 27th 2016, 16:14 froodley interesting
# Sep 27th 2016, 16:10 hmic composer?
# Sep 27th 2016, 16:09 froodley that was the solution i'd come around to, just trying to be sure I'm not missing something built in to cake
# Sep 27th 2016, 16:08 froodley oh, you're talking about adding to spl_autoload_register then?
# Sep 27th 2016, 16:08 hmic check google for setting up the autoloader. its not a cake thing really
# Sep 27th 2016, 16:07 froodley @hmic I have looked for documentation in the cookbook and haven't found anything, can you elaborate please?
# Sep 27th 2016, 16:04 froodley add to spl_autoload_register?
# Sep 27th 2016, 16:03 hmic configure the autoloader accordingly
# Sep 27th 2016, 16:03 froodley how is this to be done correctly?
# Sep 27th 2016, 16:03 froodley question is about custom interfaces. Cake(2) autoloader does not find files in Lib, but adding App::use() or App::import() (or require_once, etc) to the top of the file to bring in the interface is prohibited under PSR2, effects and declarations in the same file
# Sep 27th 2016, 16:02 froodley howdy
# Sep 27th 2016, 16:01 hmic !tell froodley about ask
# Sep 27th 2016, 16:01 froodley anyone active?
# Sep 27th 2016, 15:42 ypnos you're welcome
# Sep 27th 2016, 15:41 prophet Wow. This is amazing. It works. Thank you so much sir. I see now that it needs the user_id to match the right user, I thought this is done by the order.
# Sep 27th 2016, 15:37 ypnos validate => false is not needed for the call to save()
# Sep 27th 2016, 15:36 ypnos that's it
# Sep 27th 2016, 15:36 ypnos second, you need to add <?= $this->Form->hidden("users.$i.id") ?>
# Sep 27th 2016, 15:35 ypnos so you don't have to initialize and increment $i
# Sep 27th 2016, 15:35 ypnos you can do foreach ($association->users as $i => $user)
# Sep 27th 2016, 15:35 ypnos yeah two comments
# Sep 27th 2016, 15:33 prophet http://pastebin.com/UWFSyyWE
# Sep 27th 2016, 15:33 prophet Here you can roughly see my code
# Sep 27th 2016, 15:29 ypnos you still have the mindset as if your join table is an entity by itsel
# Sep 27th 2016, 15:29 ypnos this is how cake sees it
# Sep 27th 2016, 15:29 ypnos in your mind, you need to see it as patching the user, passing joinData along (and situationally, you don't patch any of the user's fields)
# Sep 27th 2016, 15:28 ypnos do not provide any ids within the join data
# Sep 27th 2016, 15:28 ypnos you provide the id of the user next to the _joinData, on the same level
# Sep 27th 2016, 15:27 ypnos http://book.cakephp.org/3.0/en/orm/saving-data.html#saving-data-to-the-join-table
# Sep 27th 2016, 15:27 ypnos what you would need to do is like in the tags example
# Sep 27th 2016, 15:27 ypnos that doesn't make sense to me
# Sep 27th 2016, 15:27 prophet Next to 'rank' there are 3 hidden fields that I added, id, user_id, association_id
# Sep 27th 2016, 15:26 ypnos show us what you did