Closed SebSept closed 2 years ago
Yes, it's the same for fop:environment:debug We should add an issue, I forgot. And yes, we could maybe refactorize, but that's maybe not possible.
Call another command isn't something we should encourage. It's better to have a (shared) service.
Ok LGTM! 👍
issue created #225
(new \PrestaShop\PrestaShop\Adapter\Debug\DebugMode())->enable()
is supposed to return an int but it can also returnnull
. I didn't search why but that's a fact.To reproduce the problem, install PrestaShop with docker and can reproduce the issue. https://github.com/PrestaShop/docker/blob/master/base/config_files/defines_custom.inc.php Without docker, you can try with this setup (not tested) : when a defines_custom.inc.php file is present and the environment variable PS_DEV_MODE is set.
I also found that
(new \PrestaShop\PrestaShop\Adapter\Debug\DebugMode())->isDebugModeEnabled()
return an wrong value when using PS_DEV_MODE env variable. Define _PS_DEVMODE in config.inc.php to false and set PS_DEV_MODE=1, having adefines_custom.inc.php
file. In this case, the shop runs in debug mode, but(new \PrestaShop\PrestaShop\Adapter\Debug\DebugMode())->isDebugModeEnabled()
will return false. This behavior can be considered as a bug. I'll open an issue on PrestaShop.