protected function execute(InputInterface $input, OutputInterface $output) { $dir = __DIR__ . '/../../../../'; $projectHome = realpath($dir); $output->writeln($projectHome); $finder = new \Symfony\Component\Finder\Finder(); $finder->in($projectHome . '/Tekstove'); $finder->name('*.php'); $finder->path('/\\/Base\\//')->path('/\\/Map\\//'); $this->handleFinder($finder, $output, $projectHome); $finderNewFiles = new \Symfony\Component\Finder\Finder(); $finderNewFiles->in($projectHome . '/Tekstove'); $finderNewFiles->name('*.php'); $this->handleFinder($finderNewFiles, $output, $projectHome, false); $fs = new \Symfony\Component\Filesystem\Filesystem(); $fs->remove($projectHome . '/Tekstove'); $output->writeln('<info>Command result.</info>'); }