setDescription("Checks environment");
return $this;
}
/**
* {@inheritdoc}
*/
protected function doExecute(InputInterface $input, OutputInterface $output)
{
$ret = parent::doExecute($input, $output);
foreach ($this->container['phraseanet.appbox']->get_databoxes() as $databox) {
$output->writeln("\nDatabox ".$databox->get_viewname()." fields configuration\n");
foreach ($databox->get_meta_structure() as $field) {
if ($field->get_original_source() !== $field->get_tag()->getTagname()) {
$status = ' WARNING ';
$info = sprintf(" (Described as '%s', this source does not seem to exist)", $field->get_original_source());
} else {
$status = ' OK ';
$info = '';
}
$output->writeln($status.$databox->get_viewname() . "::".$field->get_name().$info);
}
$output->writeln("\n");
}
$output->writeln("\nCache configuration\n");
$cache = str_replace('Alchemy\\Phrasea\\Cache\\', '', get_class($this->container['cache']));
$opCodeCache = str_replace('Alchemy\\Phrasea\\Cache\\', '', get_class($this->container['opcode-cache']));
if ('ArrayCache' === $cache) {
$output->writeln(' WARNING Current cache configuration uses ArrayCache (Or cache server is unreachable). Please check your cache configuration to use a cache server.');
} else {
$output->writeln(' OK Current cache configuration uses '. $cache .'');
}
if ('ArrayCache' === $opCodeCache) {
$output->writeln(' WARNING Current opcode cache configuration uses ArrayCache. Please check your cache configuration to use an opcode cache.');
} else {
$output->writeln(' OK Current opcode cache configuration uses '. $opCodeCache .'');
}
return $ret;
}
}