public static function doAppEngineCheck() { if (Environment::onDevAppServer()) { // turn on error reporting and debugging Debug::enable(E_ERROR | E_PARSE); // fix Dev AppServer XML-loading bug Environment::fixXmlFileLoaderBug(); } if (self::onAppEngine() || self::onDevAppServer()) { self::checkBucketName(); } }
public function __construct($environment = null, $debug = null) { // determine the environment / debug configuration based on whether or not this is running // in App Engine's Dev App Server, or in production if (is_null($debug)) { $debug = Environment::onDevAppServer(); } if (is_null($environment)) { $environment = $debug ? 'prod' : 'dev'; } parent::__construct($environment, $debug); // Symfony console requires timezone to be set manually. if (!ini_get('date.timezone')) { date_default_timezone_set('UTC'); } // Enable optimistic caching for GCS. $options = ['gs' => ['enable_optimsitic_cache' => true]]; stream_context_set_default($options); $this->gcsBucketName = getenv('GCS_BUCKET_NAME'); }