Log message #4053143

# At Username Text
# Jul 17th 2017, 21:24 phantomwatson Hey @ericadeefox, new office policy: We say "beer that variable" instead of "pass it by reference" from now on.
# Jul 17th 2017, 21:22 jeremyharris forgive my randomness
# Jul 17th 2017, 21:22 jeremyharris :)
# Jul 17th 2017, 21:22 phantomwatson Oh. Took me a second. :slightly_smiling_face:
# Jul 17th 2017, 21:20 jeremyharris https://media.giphy.com/media/3ohzdK68ZHg7d7QvYc/giphy.gif
# Jul 17th 2017, 21:20 jeremyharris got it, thanks. you pointed me in the right direction, the arrays in the keyed array need to be PBRd
# Jul 17th 2017, 21:19 jeremyharris ah!
# Jul 17th 2017, 21:19 jeremyharris with call_user_func_array it just doesn’t touch the keyed array
# Jul 17th 2017, 21:18 phantomwatson Hm... `and` might need to be assigned to a specific variable for it to work. Have you tried to run that code?
# Jul 17th 2017, 21:17 jeremyharris works great if I do something like `synchronizeSeries($labels, $series1, $series2)` but I want to pass an unknown amount of args
# Jul 17th 2017, 21:16 jeremyharris here’s what I’m working with: https://gist.github.com/jeremyharris/3bfd5a9f244519da05c121414da99313
# Jul 17th 2017, 21:16 jeremyharris does anyone know if it’s possible to use pass by ref on a arrays in an array?
# Jul 17th 2017, 21:15 ericadeefox ohh I'm sorry @savant, a PR on a third-party _plugin_ not core
# Jul 17th 2017, 21:13 savant what pull request? something maintained in the cake core/by a core dev?
# Jul 17th 2017, 21:11 jeremyharris good to hear! that’s a slayed dragon worth a drink :beer:
# Jul 17th 2017, 21:10 ericadeefox my pull request still hasn't been responded to btw, but the updates to the plugin work fine. :muscle::skin-tone-4:
# Jul 17th 2017, 21:10 jeremyharris if your local machine knows you, wouldn’t it let the tests pass, if not just to be nice
# Jul 17th 2017, 21:09 ericadeefox what's your secret? maybe it's cos Travis doesn't know me personally and my local machine does ;)
# Jul 17th 2017, 21:09 jeremyharris that’s the flip of what I usually get :slightly_smiling_face:
# Jul 17th 2017, 21:08 ericadeefox passes in Travis, fails in local testing... ahh what a familiar frustration :slightly_smiling_face:
# Jul 17th 2017, 20:54 jeremyharris I don’t know how tied it is to symfony. If it’s tied to specific components, then finding a more generic library might be better
# Jul 17th 2017, 20:53 joop is it possible to use it or just plugins which is written for core PHP?
# Jul 17th 2017, 20:53 joop i found some which is written for symphony
# Jul 17th 2017, 20:52 jeremyharris you can also search packagist for a library, it should be able to integrate with cake just fine
# Jul 17th 2017, 20:51 jeremyharris there is not, but there are some plugins out there if I recall
# Jul 17th 2017, 20:50 joop do you know if is there a built in possibility to implement finite state machine in cakephp?
# Jul 17th 2017, 20:50 jeremyharris hi!
# Jul 17th 2017, 20:50 joop hello
# Jul 17th 2017, 19:04 gglow thx
# Jul 17th 2017, 19:04 hmic +1
# Jul 17th 2017, 19:04 gglow -1,0,1 was my initial thought so must be the simplest
# Jul 17th 2017, 19:04 phantomwatson Yeah, I'd go with using -1, 0, and 1, personally. Though you could use a custom accessor to recast it to true, false, and null if there's some appeal to doing that.
# Jul 17th 2017, 19:04 gglow I'll use the integer, with a bit array/ contants
# Jul 17th 2017, 19:03 gglow also, if the value is false and needs to be changed to null, that would be an issue as it would need to save
# Jul 17th 2017, 19:03 hmic only on save phantomwatson! on load you would get a casted false back!
# Jul 17th 2017, 19:02 hmic there is way less room for error on the int approach
# Jul 17th 2017, 19:02 phantomwatson So if the field isn't to be changed to true or false, then just take `field => null` out of the data array when you're saving and it will remain null.
# Jul 17th 2017, 19:02 hmic phantomwatson: still would php convert the null to boolean false
# Jul 17th 2017, 19:01 phantomwatson But if you're going for a nullable boolean field, maybe setting the default value to `null` and preventing that field from being included in the call to `save()` if it should stay null would work, too.
# Jul 17th 2017, 19:01 hmic did so too before
# Jul 17th 2017, 19:00 gglow great info, thanks