# |
Jul 12th 2017, 15:58 |
jlroberts |
so, composer runs this, "post-install-cmd": "App\\Console\\Installer::postInstall", |
# |
Jul 12th 2017, 15:58 |
jeremyharris |
again, cake isn’t bootstrapped at that point, so those convenience constants don’t exist yet |
# |
Jul 12th 2017, 15:58 |
jlroberts |
so, do I load the bootstrap.php maybe from Installer.php? |
# |
Jul 12th 2017, 15:58 |
jlroberts |
i did that with functions.php and it immediately threw an APP undefined |
# |
Jul 12th 2017, 15:57 |
jeremyharris |
require /path/to/file |
# |
Jul 12th 2017, 15:57 |
jlroberts |
lol =] |
# |
Jul 12th 2017, 15:57 |
jlroberts |
ok,so MarkStory says composer doesnt autoload the CakePHP files, and I have to do it myself, so, how do I do that |
# |
Jul 12th 2017, 15:57 |
jlroberts |
=] |
# |
Jul 12th 2017, 15:56 |
jeremyharris |
I think you’re making this way too complicated for yourself :slightly_smiling_face: |
# |
Jul 12th 2017, 15:56 |
jlroberts |
brb stack trace research |
# |
Jul 12th 2017, 15:56 |
jlroberts |
fuck |
# |
Jul 12th 2017, 15:56 |
jlroberts |
god what I would do for an autoloader stack trace right now |
# |
Jul 12th 2017, 15:56 |
jlroberts |
I need a break man, this doesnt make to much sense to me, if it autoloads classes, then it should autoload the functions.php |
# |
Jul 12th 2017, 15:55 |
jlroberts |
jeremyharris: ok, and thats only when composer runs the php files? |
# |
Jul 12th 2017, 15:53 |
ericadeefox |
now, see, no exceptions with `PHP_SESSION_NONE`. so the sessions are enabled. |
# |
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 |