private function askAndSetNewPathValue($name)
    {
        $previous = $this->resolver->raw($name);
        $question = new Question('Enter new value for ' . $name, $previous);
        $question->setValidator(function ($value) use ($name, $previous) {
            $this->resolver->define($name, $value);
            // verify valid path.
            try {
                $this->resolver->resolve($name);
            } catch (\Exception $e) {
                $this->resolver->define($name, $previous); // revert path change
                throw $e;
            }
        });
        $this->io->askQuestionThenRemove($question);
    }
private function askAndSetNewPathValue($name)
    {
        $previous = $this->resolver->raw($name);
        $question = new Question('Enter new value for ' . $name, $previous);
        $question->setValidator(function ($value) use ($name, $previous) {
            $this->resolver->define($name, $value);
            // verify valid path.
            try {
                $this->resolver->resolve($name);
            } catch (\Exception $e) {
                $this->resolver->define($name, $previous); // revert path change
                throw $e;
            }
        });
        $this->io->askQuestionThenRemove($question);
    }
private function askAndSetNewPathValue ( $ name ) { $ previous = $ this -> resolver -> raw ( $ name ) ; $ question = new Question ( 'Enter new value for ' . $ name , $ previous ) ; $ question -> setValidator ( function ( $ value ) use ( $ name , $ previous ) { $ this -> resolver -> define ( $ name , $ value ) ; // verify valid path. try { $ this -> resolver -> resolve ( $ name ) ; } catch ( \ Exception $ e ) { $ this -> resolver -> define ( $ name , $ previous ) ; // revert path change throw $ e ; } } ) ; $ this -> io -> askQuestionThenRemove ( $ question ) ; }
Ask for the new value for the given path name and set it.

@param string $name
Ask for the new value for the given path name and set it .