# |
Jul 12th 2017, 15:53 |
ericadeefox |
ok here now I will see if `PHP_SESSION_NONE` throws me the same exceptions. we'll see...... |
# |
Jul 12th 2017, 15:52 |
jeremyharris |
jlroberts cake doesn’t make use of that composer option |
# |
Jul 12th 2017, 15:52 |
ericadeefox |
I don't manually load it, no |
# |
Jul 12th 2017, 15:52 |
jeremyharris |
@ericadeefox is the facebook SDK being loaded early somehow? in setUp, or something |
# |
Jul 12th 2017, 15:51 |
jlroberts |
fuck |
# |
Jul 12th 2017, 15:51 |
jlroberts |
it appears that its not being autoloaded and i dont want to say |
# |
Jul 12th 2017, 15:51 |
jlroberts |
soooo |
# |
Jul 12th 2017, 15:51 |
jlroberts |
nope, wrong, not was what he was saying |
# |
Jul 12th 2017, 15:51 |
jlroberts |
ohhh i just figured out what Mark Story was saying |
# |
Jul 12th 2017, 15:51 |
jlroberts |
and that is in composer.json |
# |
Jul 12th 2017, 15:50 |
jlroberts |
https://github.com/cakephp/cakephp/blob/master/composer.json |
# |
Jul 12th 2017, 15:50 |
jlroberts |
https://getcomposer.org/doc/04-schema.md#files |
# |
Jul 12th 2017, 15:50 |
ericadeefox |
it's worth noting again that using `session_start()` at the top of my first integration test prevents the plugin from throwing these exceptions. but also prevents my `$this->session()` setters from doing anything |
# |
Jul 12th 2017, 15:50 |
jlroberts |
https://stackoverflow.com/questions/24171078/composer-psr-how-to-autoload-functions |
# |
Jul 12th 2017, 15:50 |
jlroberts |
ok so, composer says, autoload functions.php like so |
# |
Jul 12th 2017, 15:49 |
ericadeefox |
https://github.com/facebook/php-graph-sdk/blob/4.0-dev/src/Facebook/FacebookRedirectLoginHelper.php head on over to ln 250 for storeState() and 270 for loadState() |
# |
Jul 12th 2017, 15:49 |
jarard01 |
jeremyharris, thanks that worked, I was using one of the other examples below |
# |
Jul 12th 2017, 15:48 |
jeremyharris |
I wonder what FB’s definition of active is here |
# |
Jul 12th 2017, 15:47 |
jeremyharris |
it’s active, you checked it in the controller |
# |
Jul 12th 2017, 15:47 |
jeremyharris |
@ericadeefox interesting. can you give me a link to the SDK, specifically where that exception is thrown? |
# |
Jul 12th 2017, 15:46 |
jeremyharris |
you need to use the “on” key |
# |
Jul 12th 2017, 15:46 |
jeremyharris |
jarard01 conditional validation here: https://book.cakephp.org/3.0/en/core-libraries/validation.html#conditional-validation |
# |
Jul 12th 2017, 15:46 |
ericadeefox |
means my session isn't active during these integration tests, which I knew, but I'm not sure what to do about it. |
# |
Jul 12th 2017, 15:46 |
jeremyharris |
jarard01 sorry the link is this: https://book.cakephp.org/3.0/en/core-libraries/validation.html#custom-validation-rules |
# |
Jul 12th 2017, 15:46 |
jarard01 |
but it still is |
# |
Jul 12th 2017, 15:45 |
jarard01 |
i tried retuning 'false' so that to test, the validation shouldn't ever be called |
# |
Jul 12th 2017, 15:45 |
ericadeefox |
oh, forgive me, it's a FacebookSDKException thrown: `Session not active, could not store state.` |
# |
Jul 12th 2017, 15:45 |
jeremyharris |
or you can always debug($context) to see exactly what it’s getting |
# |
Jul 12th 2017, 15:45 |
jeremyharris |
jarard01 then it’s probably not right :P have you checked the docs? they show what is in $context: https://book.cakephp.org/3.0/en/core-libraries/validation.html |
# |
Jul 12th 2017, 15:45 |
ericadeefox |
FacebookSDKException, it is. |
# |
Jul 12th 2017, 15:44 |
jarard01 |
jeremy no |
# |
Jul 12th 2017, 15:44 |
ericadeefox |
`Session not active, could not load state.` |
# |
Jul 12th 2017, 15:44 |
jeremyharris |
jarard01 does it work? |
# |
Jul 12th 2017, 15:44 |
ericadeefox |
let me go grab it for you... |
# |
Jul 12th 2017, 15:43 |
jeremyharris |
@ericadeefox I wonder if we’re looking at the right thing. do you know exactly what exception is being thrown by FB |
# |
Jul 12th 2017, 15:43 |
jarard01 |
does this look like a correct conditional validation rule: https://gist.github.com/spacebiscuit/ad07583634b8d732ad532e7f429477f3 |
# |
Jul 12th 2017, 15:43 |
ericadeefox |
returns `true` |
# |
Jul 12th 2017, 15:42 |
ericadeefox |
uhhhh |
# |
Jul 12th 2017, 15:41 |
ericadeefox |
oh, in the _controller_? my bad lol |
# |
Jul 12th 2017, 15:41 |
jeremyharris |
in the controller? |
# |
Jul 12th 2017, 15:41 |
ericadeefox |
it's gonna throw me an error saying that `$request` doesn't exist. |