ouzo icon indicating copy to clipboard operation
ouzo copied to clipboard

Config lazy loading causes trouble using Config in consoles

Open danon opened this issue 9 years ago • 0 comments

putenv('environment=prod');
define('ROOT_PATH', realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR);
require 'vendor/autoload.php';
Files::loadIfExists(Path::join(ROOT_PATH, 'config', 'routes.php'));

$app = new Application();
// ...
$app->add(new RefreshTagsCommand());
// ...
$app->run();

Config::registerConfig in RefreshTagsCommand won't register config.

danon avatar Feb 01 '16 14:02 danon