public static function populateEnvironment(Event $event)
    {
        $url = getenv('CLEARDB_DATABASE_URL');

        if ($url) {
            $url = parse_url($url);
            putenv("SYMFONY_DATABASE_HOST={$url['host']}");
            putenv("SYMFONY_DATABASE_USER={$url['user']}");
            putenv("SYMFONY_DATABASE_PASSWORD={$url['pass']}");

            $db = substr($url['path'], 1);
            putenv("SYMFONY_DATABASE_NAME={$db}");
            putenv("SYMFONY_PROD_LOG_PATH=php://stderr");

            $io = $event->getIO();
            $io->write('CLEARDB_DATABASE_URL=' . getenv('CLEARDB_DATABASE_URL'));
            $io->write('SYMFONY_PROD_LOG_PATH=' . getenv('SYMFONY_PROD_LOG_PATH'));
        }
    }