Skip to content

Commit

Permalink
Revert "Fix EZP-24025: Make sure to clear cache on install"
Browse files Browse the repository at this point in the history
This reverts commit cc65c19.
  • Loading branch information
andrerom committed Feb 24, 2015
1 parent 69d6584 commit 2cb7748
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 27 deletions.
Expand Up @@ -13,7 +13,6 @@
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface;

class InstallPlatformCommand extends Command
{
Expand All @@ -23,12 +22,6 @@ class InstallPlatformCommand extends Command
/** @var \Symfony\Component\Console\Output\OutputInterface */
private $output;

/** @var \Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface */
private $cacheClearer;

/** @var string */
private $cacheDir;

/** @var \EzSystems\PlatformInstallerBundle\Installer\Installer[] */
private $installers = array();

Expand All @@ -38,12 +31,10 @@ class InstallPlatformCommand extends Command
const EXIT_UNKNOWN_INSTALL_TYPE = 6;
const EXIT_MISSING_PERMISSIONS = 7;

public function __construct( Connection $db, array $installers, CacheClearerInterface $cacheClearer, $cacheDir )
public function __construct( Connection $db, array $installers )
{
$this->db = $db;
$this->installers = $installers;
$this->cacheClearer = $cacheClearer;
$this->cacheDir = $cacheDir;
parent::__construct();
}

Expand Down Expand Up @@ -78,7 +69,6 @@ protected function execute( InputInterface $input, OutputInterface $output )
$installer->importSchema();
$installer->importData();
$installer->importBinaries();
$this->cacheClear( $output );
}

private function checkPermissions()
Expand Down Expand Up @@ -145,17 +135,6 @@ private function checkDatabase()
}
}

private function cacheClear( OutputInterface $output )
{
if ( !is_writable( $this->cacheDir ) )
{
throw new \RuntimeException( sprintf( 'Unable to write in the "%s" directory', $this->cacheDir ) );
}

$output->writeln( sprintf( 'Clearing cache for directory <info>%s</info>', $this->cacheDir ) );
$this->cacheClearer->clear( $this->cacheDir );
}

/**
* @param $type
*
Expand Down
Expand Up @@ -17,10 +17,6 @@ services:

ezplatform.installer.install_command:
class: %ezplatform.installer.install_command.class%
arguments:
- @database_connection
- []
- @cache_clearer
- $kernel.cache_dir
arguments: [ @database_connection, [] ]
tags:
- { name: console.command }

0 comments on commit 2cb7748

Please sign in to comment.