diff --git a/scripts/migrate-szuru1.php b/scripts/migrate-szuru1.php index 66816a43..f4fa7a42 100644 --- a/scripts/migrate-szuru1.php +++ b/scripts/migrate-szuru1.php @@ -55,11 +55,16 @@ function removeRecursively($dir) abstract class Task { + private $warnings = []; + public function execute() { echo $this->getDescription() . '...'; $this->run(); echo PHP_EOL; + + foreach ($this->warnings as $message) + echo 'Warning: ' . $message . PHP_EOL; } protected function progress() @@ -67,6 +72,11 @@ abstract class Task echo '.'; } + protected function warn($message) + { + $this->warnings[] = $message; + } + protected function withProgress($source, $callback, $chunkSize = 666, callable $callbackLoopRunner = null) { if ($source instanceof \Traversable)