Symfony\Installer\NewCommand::updateParameters PHP Method

updateParameters() protected method

Updates the Symfony parameters.yml file to replace default configuration values with better generated values.
protected updateParameters ( )
    protected function updateParameters()
    {
        $filename = $this->projectDir . '/app/config/parameters.yml';
        if (!is_writable($filename)) {
            if ($this->output->isVerbose()) {
                $this->output->writeln(sprintf(" <comment>[WARNING]</comment> The value of the <info>secret</info> configuration option cannot be updated because\n" . " the <comment>%s</comment> file is not writable.\n", $filename));
            }
            return $this;
        }
        $ret = str_replace('ThisTokenIsNotSoSecretChangeIt', $this->generateRandomSecret(), file_get_contents($filename));
        file_put_contents($filename, $ret);
        return $this;
    }