Skip to content
This repository was archived by the owner on Nov 14, 2019. It is now read-only.

Commit 94a1f98

Browse files
committed
Simplified the new feature a bit
1 parent d58812a commit 94a1f98

File tree

1 file changed

+2
-29
lines changed

1 file changed

+2
-29
lines changed

src/Symfony/Installer/NewCommand.php

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
7070
aborted:
7171

7272
$output->writeln('');
73-
$output->writeln('<error>Aborting download and cleaning up temporary directories.</error>');
73+
$output->writeln('<error>Aborting download and cleaning up temporary directories.</>');
7474

7575
$this->cleanUp();
7676

@@ -105,11 +105,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
105105
*/
106106
protected function checkSymfonyVersionIsInstallable()
107107
{
108-
// Available at the moment of installing Symfony with this installer.
109108
// 'latest' is a special version name that refers to the latest stable version
110109
// 'lts' is a special version name that refers to the current long term support version
111-
// 'dev' is a special version name that refers to the current development version
112-
if (in_array($this->version, array('latest', 'lts', 'dev'))) {
110+
if (in_array($this->version, array('latest', 'lts'))) {
113111
return $this;
114112
}
115113

@@ -176,31 +174,6 @@ protected function checkSymfonyVersionIsInstallable()
176174
return $this;
177175
}
178176

179-
/**
180-
* @param InputInterface $input
181-
* @param OutputInterface $output
182-
*
183-
* @return NewCommand
184-
*
185-
* @throws AbortException If the user wants to stop the download process in case of dev/BETA versions
186-
*/
187-
protected function askUserConfirmation(InputInterface $input, OutputInterface $output)
188-
{
189-
if (preg_match('/^(\d\.\d)(\.\d{1,2})?-(dev|BETA)\d*$/', $this->version)) {
190-
$helper = $this->getHelper('question');
191-
$question = new ConfirmationQuestion(
192-
sprintf('<question>You are trying to install an unstable version (%s). Do you confirm this action? [y/n]</question>', $this->version),
193-
false
194-
);
195-
196-
if (!$helper->ask($input, $output, $question)) {
197-
throw new AbortException();
198-
}
199-
}
200-
201-
return $this;
202-
}
203-
204177
/**
205178
* Removes all the temporary files and directories created to
206179
* download the project and removes Symfony-related files that don't make

0 commit comments

Comments
 (0)