From dc3d653e109bff63fb972b4c088eab758a45119b Mon Sep 17 00:00:00 2001 From: Mehmet Korkmaz Date: Sun, 2 Dec 2018 01:35:12 +0300 Subject: [PATCH] errors fixed --- src/Cache/ClearRouteDispatcherData.php | 6 ++---- src/Cache/ClearViewData.php | 2 +- src/Server/ServerRun.php | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Cache/ClearRouteDispatcherData.php b/src/Cache/ClearRouteDispatcherData.php index 0c0d78e..3112859 100644 --- a/src/Cache/ClearRouteDispatcherData.php +++ b/src/Cache/ClearRouteDispatcherData.php @@ -7,7 +7,6 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Exception\InvalidArgumentException; -use function dirname; class ClearRouteDispatcherData extends Command { @@ -27,9 +26,8 @@ protected function configure() : void */ protected function execute(InputInterface $input, OutputInterface $output) : void { - $folder = dirname('cache'); - $files = glob($folder . '/*fastroute.cache'); - $output->writeln('FastRoute cache files under ' . $folder . ' will be deleted.'); + $files = glob( './cache/*fastroute.cache'); + $output->writeln('FastRoute cache files under ./cache will be deleted.'); foreach ($files as $file) { $unlinkResult = file_exists($file) ? (unlink($file) === true) ? 'deleted.' : 'could\'t deleted' diff --git a/src/Cache/ClearViewData.php b/src/Cache/ClearViewData.php index 295d70b..996321b 100644 --- a/src/Cache/ClearViewData.php +++ b/src/Cache/ClearViewData.php @@ -14,7 +14,7 @@ class ClearViewData extends Command public function __construct(array $config, ?string $name = null) { - $this->config = $config; + $this->config = $config['view']; parent::__construct($name); } diff --git a/src/Server/ServerRun.php b/src/Server/ServerRun.php index 46775d4..a709feb 100644 --- a/src/Server/ServerRun.php +++ b/src/Server/ServerRun.php @@ -3,7 +3,7 @@ namespace Selami\Command\Server; -use Selami\Console\Command as SelamiCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -14,7 +14,7 @@ use Symfony\Component\Process\Exception\RuntimeException; use Symfony\Component\Process\Exception\InvalidArgumentException as ProcessInvalidArgumentException; -class ServerRun extends SelamiCommand +class ServerRun extends Command { /** * @inheritdoc