File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 1010
1111use Symfony \Component \Console \Input \InputInterface ;
1212use Symfony \Component \Console \Output \OutputInterface ;
13+ use Symfony \Component \Console \Question \ConfirmationQuestion ;
1314
1415class ResetCommand extends ConsoleCommand
1516{
@@ -24,6 +25,14 @@ protected function configure()
2425
2526 protected function execute (InputInterface $ input , OutputInterface $ output )
2627 {
28+ $ helper = $ this ->getHelper ('question ' );
29+ $ question = new ConfirmationQuestion ('This will ERASE all of data in your data. Continue with this action? (y/N) ' , false );
30+
31+ if (!$ helper ->ask ($ input , $ output , $ question )) {
32+ $ output ->writeln ('Aborted. ' );
33+ return ;
34+ }
35+
2736 parent ::execute ($ input , $ output );
2837 $ this ->migration ->prepareEnvironment ();
2938 $ this ->migration ->reset ($ this ->upTo );
You can’t perform that action at this time.
0 commit comments