src/Defaulter.php
static function gaeutilJson($project_directory, $app_engine_project, $gaeutil_defaults = []) {
        $config_dir_location = Conf::getConfFolderPath($project_directory);
        $gaeutil_json_location = Conf::getGaeUtilJsonPath($project_directory);
        Files::ensureDirectory($config_dir_location);
        $gaeutil_json_content = Files::getJson($gaeutil_json_location, []);
        foreach ($gaeutil_defaults as $key => $val) {
            $gaeutil_json_content[$key] = $val;
        }
        /**
         * Just create a new key.
         */
        $project_key_name = $gaeutil_json_content[Secrets::CONF_PROJECT_KEY_NAME];
        $project_key_parts = Secrets::reverseKmsKey($project_key_name);
        list($project, $location, $keyRing) = array_values($project_key_parts);
        $gaeutil_json_content[Secrets::CONF_PROJECT_KEY_NAME] = Secrets::getKeyName($project, $location, $keyRing, $app_engine_project);
        // Write to disk
        if (Files::putJson($gaeutil_json_location, $gaeutil_json_content)) {
            Util::cmdline("Updated gaeutil.json $project_directory");
        }
    }
static function gaeutilJson($project_directory, $app_engine_project, $gaeutil_defaults = []) {
        $config_dir_location = Conf::getConfFolderPath($project_directory);
        $gaeutil_json_location = Conf::getGaeUtilJsonPath($project_directory);
        Files::ensureDirectory($config_dir_location);
        $gaeutil_json_content = Files::getJson($gaeutil_json_location, []);
        foreach ($gaeutil_defaults as $key => $val) {
            $gaeutil_json_content[$key] = $val;
        }
        /**
         * Just create a new key.
         */
        $project_key_name = $gaeutil_json_content[Secrets::CONF_PROJECT_KEY_NAME];
        $project_key_parts = Secrets::reverseKmsKey($project_key_name);
        list($project, $location, $keyRing) = array_values($project_key_parts);
        $gaeutil_json_content[Secrets::CONF_PROJECT_KEY_NAME] = Secrets::getKeyName($project, $location, $keyRing, $app_engine_project);
        // Write to disk
        if (Files::putJson($gaeutil_json_location, $gaeutil_json_content)) {
            Util::cmdline("Updated gaeutil.json $project_directory");
        }
    }
static function gaeutilJson ( $ project_directory , $ app_engine_project , $ gaeutil_defaults = [ ] ) { $ config_dir_location = Conf :: getConfFolderPath ( $ project_directory ) ; $ gaeutil_json_location = Conf :: getGaeUtilJsonPath ( $ project_directory ) ; Files :: ensureDirectory ( $ config_dir_location ) ; $ gaeutil_json_content = Files :: getJson ( $ gaeutil_json_location , [ ] ) ; foreach ( $ gaeutil_defaults as $ key => $ val ) { $ gaeutil_json_content [ $ key ] = $ val ; } /**
         * Just create a new key.
         */ $ project_key_name = $ gaeutil_json_content [ Secrets :: CONF_PROJECT_KEY_NAME ] ; $ project_key_parts = Secrets :: reverseKmsKey ( $ project_key_name ) ; list ( $ project , $ location , $ keyRing ) = array_values ( $ project_key_parts ) ; $ gaeutil_json_content [ Secrets :: CONF_PROJECT_KEY_NAME ] = Secrets :: getKeyName ( $ project , $ location , $ keyRing , $ app_engine_project ) ; // Write to disk if ( Files :: putJson ( $ gaeutil_json_location , $ gaeutil_json_content ) ) { Util :: cmdline ( "Updated gaeutil.json $project_directory" ) ; } }
Fixing gaeutil.json
Fixing gaeutil . json