Open bhaidar opened 3 years ago
For some reason, the variable appYaml
is always null, although there is an app.yaml
file at the root of the app.
Actually, this is a bug in GenFileCommands.php file
protected function envsFromAppYaml()
{
$ret = array_key_exists('env_variables', $this->appYaml)
? $this->appYaml['env_variables']
: [];
$removedEnvVars = [];
foreach (self::REMOVED_ENV_VARS as $k) {
if (array_key_exists($k, $ret)) {
$removedEnvVars[] = $k;
}
}
if (count($removedEnvVars) > 0) {
throw new RemovedEnvVarException(
"There are environment variables which are no more"
. "supported. Remove the following keys in "
. "'env_variables': "
. implode(" ", $removedEnvVars)
);
}
return $ret;
}
If we leave the app.yaml file with a section like this:
env_variables:
Then $ret
is null. There is no checking for null, it's being used right away inside array_key_exists()
.
Hello, I have a Laravel PHP app with the following:
runtime_config: document_root: public whitelist_functions: proc_open automatic_scaling: min_num_instances: 1 max_num_instances: 1 resources: cpu: 1 memory_gb: 0.5 disk_size_gb: 10 env_variables:
See substitution variables for Google Cloud Build Trigger
steps:
When the Cloud Build Trigger runs, I get the following error: