protected function shouldExitCommand(OutputInterface $output) { if ($this->memoryMax > 0 && memory_get_peak_usage(true) >= $this->memoryMax) { $this->writeln($output, 'Memory max of ' . $this->memoryMax . ' bytes exideed'); return true; } return false; }