Hello!
Loving Bedrock!
Can I set Jetpack’s debug mode in .env or does it have to be done in development.php? I’ve tried setting:
JETPACK_DEV_DEBUG=true
in .env but the setting will not take.
Thank you!
Hello!
Loving Bedrock!
Can I set Jetpack’s debug mode in .env or does it have to be done in development.php? I’ve tried setting:
JETPACK_DEV_DEBUG=true
in .env but the setting will not take.
Thank you!
Environment variables are not the same as PHP constants. It’s a pretty easy mistake to make though, and sometimes I do still forget that they’re not the same.
Notice the actual PHP constants are mostly here: https://github.com/roots/bedrock/blob/master/config/application.php#L42-L47
So you can set JETPACK_DEV_DEBUG
there as well with a sensible default if you’d like.
I think the issue here is that you want have define( 'JETPACK_DEV_DEBUG', true);
to be set in dev, but not in production so putting it in the application.php file isn’t ideal since its version controlled. To make it Jetpack compatible you could extend the .env file with something like:
JETPACK_DEV_DEBUG=true
and then in your application.php add:
define( 'JETPACK_DEV_DEBUG', get_env('JETPACK_DEV_DEBUG'));
Don’t know if Roots cares about having Jetpack support, but some of the features are nice (monitor, protect, vaultpress, markdown, etc)
I’ll probably extend this to a lot of my projects, so if there is any interest maybe I’ll submit a PR.
That’s why there are environment specific configs. Put it in https://github.com/roots/bedrock/blob/master/config/environments/development.php
Nice, I just started testing out the whole Roots ecosystem because of Trellis so I don’t have it all down yet. You guys are doing great work! Especially love Trellis.