public function __construct(TranslatorInterface $translator, $root, $cacheDir, $logDir)
 {
     parent::__construct($translator->trans('sylius.filesystem', array(), 'requirements'));
     $exists = $translator->trans('sylius.filesystem.exists', array(), 'requirements');
     $notExists = $translator->trans('sylius.filesystem.not_exists', array(), 'requirements');
     $writable = $translator->trans('sylius.filesystem.writable', array(), 'requirements');
     $notWritable = $translator->trans('sylius.filesystem.not_writable', array(), 'requirements');
     $this->add(new Requirement($translator->trans('sylius.filesystem.vendors', array(), 'requirements'), $status = is_dir($root . '/../vendor'), $exists, $status ? $exists : $notExists))->add(new Requirement($translator->trans('sylius.filesystem.cache', array(), 'requirements'), $status = is_writable($cacheDir), $translator->trans('sylius.filesystem.writable', array(), 'requirements'), $status ? $translator->trans('sylius.filesystem.writable', array(), 'requirements') : $translator->trans('sylius.filesystem.not_writable', array(), 'requirements'), true, $translator->trans('sylius.filesystem.cache.help', array('%path%' => $cacheDir), 'requirements')))->add(new Requirement($translator->trans('sylius.filesystem.logs', array(), 'requirements'), $status = is_writable($logDir), $writable, $status ? $writable : $notWritable, true, $translator->trans('sylius.filesystem.logs.help', array('%path%' => $logDir), 'requirements')))->add(new Requirement($translator->trans('sylius.filesystem.parameters', array(), 'requirements'), $status = is_writable($root . '/config/parameters.yml'), $writable, $status ? $writable : $notWritable, true, $translator->trans('sylius.filesystem.parameters.help', array('%path%' => $root . '/config/parameters.yml'), 'requirements')));
 }
 public function __construct(TranslatorInterface $translator)
 {
     parent::__construct($translator->trans('sylius.settings', array(), 'requirements'));
     $on = $translator->trans('sylius.settings.on', array(), 'requirements');
     $off = $translator->trans('sylius.settings.off', array(), 'requirements');
     $this->add(new Requirement($translator->trans('sylius.settings.version', array(), 'requirements'), version_compare(phpversion(), self::REQUIRED_PHP_VERSION, '>='), '>=' . self::REQUIRED_PHP_VERSION, phpversion()))->add(new Requirement($translator->trans('sylius.settings.version_recommanded', array(), 'requirements'), version_compare(phpversion(), self::RECOMMENDED_PHP_VERSION, '>='), '>=' . self::RECOMMENDED_PHP_VERSION, phpversion(), false))->add(new Requirement($translator->trans('sylius.settings.timezone', array(), 'requirements'), $this->isOn('date.timezone'), $translator->trans('sylius.settings.any', array(), 'requirements'), ini_get('date.timezone')));
     if (version_compare(phpversion(), self::REQUIRED_PHP_VERSION, '>=')) {
         $this->add(new Requirement($translator->trans('sylius.settings.timezone_deprecated', array(), 'requirements'), in_array(date_default_timezone_get(), DateTimeZone::listIdentifiers()), $translator->trans('sylius.settings.non_deprecated', array(), 'requirements'), date_default_timezone_get(), true, $translator->trans('sylius.settings.timezone_deprecated.help', array('%timezone%' => date_default_timezone_get()), 'requirements')));
     }
     $this->add(new Requirement($translator->trans('sylius.settings.detect_unicode', array(), 'requirements'), !$this->isOn('detect_unicode'), $on, ini_get('detect_unicode'), false))->add(new Requirement($translator->trans('sylius.settings.detect_unicode', array(), 'requirements'), !$this->isOn('detect_unicode'), $on, ini_get('detect_unicode'), false))->add(new Requirement($translator->trans('sylius.settings.short_open_tag', array(), 'requirements'), !$this->isOn('short_open_tag'), $off, ini_get('short_open_tag'), false))->add(new Requirement($translator->trans('sylius.settings.magic_quotes_gpc', array(), 'requirements'), !$this->isOn('magic_quotes_gpc'), $off, ini_get('magic_quotes_gpc'), false))->add(new Requirement($translator->trans('sylius.settings.register_globals', array(), 'requirements'), !$this->isOn('register_globals'), $off, ini_get('register_globals'), false))->add(new Requirement($translator->trans('sylius.settings.session.auto_start', array(), 'requirements'), !$this->isOn('session.auto_start'), $off, ini_get('session.auto_start'), false));
 }
 public function __construct(TranslatorInterface $translator)
 {
     parent::__construct($translator->trans('sylius.extensions.header', [], 'requirements'));
     $this->add(new Requirement($translator->trans('sylius.extensions.json_encode', [], 'requirements'), function_exists('json_encode'), true, $translator->trans('sylius.extensions.help', ['%extension%' => 'JSON'], 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.session_start', [], 'requirements'), function_exists('session_start'), true, $translator->trans('sylius.extensions.help', ['%extension%' => 'session'], 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.ctype', [], 'requirements'), function_exists('ctype_alpha'), true, $translator->trans('sylius.extensions.help', ['%extension%' => 'ctype'], 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.token_get_all', [], 'requirements'), function_exists('token_get_all'), true, $translator->trans('sylius.extensions.help', ['%extension%' => 'JSON'], 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.simplexml_import_dom', [], 'requirements'), function_exists('simplexml_import_dom'), true, $translator->trans('sylius.extensions.help', ['%extension%' => 'SimpleXML'], 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.apc', [], 'requirements'), !(function_exists('apc_store') && ini_get('apc.enabled')) || version_compare(phpversion('apc'), '3.0.17', '>='), true, $translator->trans('sylius.extensions.help', ['%extension%' => 'APC (>=3.0.17)'], 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.pcre', [], 'requirements'), defined('PCRE_VERSION') ? (double) PCRE_VERSION > 8.0 : false, true, $translator->trans('sylius.extensions.help', ['%extension%' => 'PCRE (>=8.0)'], 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.php_xml', [], 'requirements'), class_exists(\DomDocument::class), false, $translator->trans('sylius.extensions.help', ['%extension%' => 'PHP-XML'], 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.mbstring', [], 'requirements'), function_exists('mb_strlen'), false, $translator->trans('sylius.extensions.help', ['%extension%' => 'mbstring'], 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.iconv', [], 'requirements'), function_exists('iconv'), false, $translator->trans('sylius.extensions.help', ['%extension%' => 'iconv'], 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.exif', [], 'requirements'), function_exists('exif_read_data'), true, $translator->trans('sylius.extensions.help', ['%extension%' => 'exif'], 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.intl', [], 'requirements'), extension_loaded('intl'), true, $translator->trans('sylius.extensions.help', ['%extension%' => 'intl'], 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.fileinfo', [], 'requirements'), extension_loaded('fileinfo'), true, $translator->trans('sylius.extensions.help', ['%extension%' => 'fileinfo'], 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.accelerator.header', [], 'requirements'), !empty(ini_get('opcache.enable')), false, $translator->trans('sylius.extensions.accelerator.help', [], 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.pdo', [], 'requirements'), class_exists('PDO'), false, $translator->trans('sylius.extensions.help', ['%extension%' => 'PDO'], 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.gd', [], 'requirements'), defined('GD_VERSION'), true, $translator->trans('sylius.extensions.help', ['%extension%' => 'gd'], 'requirements')));
     if (extension_loaded('intl')) {
         if (defined('INTL_ICU_VERSION')) {
             $version = INTL_ICU_VERSION;
         } else {
             $reflector = new ReflectionExtension('intl');
             ob_start();
             $reflector->info();
             $output = strip_tags(ob_get_clean());
             preg_match('/^ICU version +(?:=> )?(.*)$/m', $output, $matches);
             $version = $matches[1];
         }
         $this->add(new Requirement($translator->trans('sylius.extensions.icu', [], 'requirements'), version_compare($version, '4.0', '>='), false, $translator->trans('sylius.extensions.help', ['%extension%' => 'ICU (>=4.0)'], 'requirements')));
     }
 }
 public function __construct(TranslatorInterface $translator)
 {
     parent::__construct($translator->trans('sylius.extensions', array(), 'requirements'));
     $on = $translator->trans('sylius.extensions.on', array(), 'requirements');
     $off = $translator->trans('sylius.extensions.off', array(), 'requirements');
     $pcreVersion = defined('PCRE_VERSION') ? (double) PCRE_VERSION : null;
     $this->add(new Requirement($translator->trans('sylius.extensions.json_encode', array(), 'requirements'), $status = function_exists('json_encode'), $on, $status ? $on : $off, true, $translator->trans('sylius.extensions.help', array('%extension%' => 'JSON'), 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.session_start', array(), 'requirements'), $status = function_exists('session_start'), $on, $status ? $on : $off, true, $translator->trans('sylius.extensions.help', array('%extension%' => 'session'), 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.ctype', array(), 'requirements'), $status = function_exists('ctype_alpha'), $on, $status ? $on : $off, true, $translator->trans('sylius.extensions.help', array('%extension%' => 'ctype'), 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.token_get_all', array(), 'requirements'), $status = function_exists('token_get_all'), $on, $status ? $on : $off, true, $translator->trans('sylius.extensions.help', array('%extension%' => 'JSON'), 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.simplexml_import_dom', array(), 'requirements'), $status = function_exists('simplexml_import_dom'), $on, $status ? $on : $off, true, $translator->trans('sylius.extensions.help', array('%extension%' => 'SimpleXML'), 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.apc', array(), 'requirements'), !(function_exists('apc_store') && ini_get('apc.enabled')) || version_compare(phpversion('apc'), '3.0.17', '>='), '>=3.0.17', phpversion('apc'), true, $translator->trans('sylius.extensions.help', array('%extension%' => 'APC (>=3.0.17)'), 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.pcre', array(), 'requirements'), null !== $pcreVersion && $pcreVersion > 8.0, '>=8.0', $pcreVersion, true, $translator->trans('sylius.extensions.help', array('%extension%' => 'PCRE (>=8.0)'), 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.php_xml', array(), 'requirements'), $status = class_exists(\DomDocument::class), $on, $status ? $on : $off, false, $translator->trans('sylius.extensions.help', array('%extension%' => 'PHP-XML'), 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.mbstring', array(), 'requirements'), $status = function_exists('mb_strlen'), $on, $status ? $on : $off, false, $translator->trans('sylius.extensions.help', array('%extension%' => 'mbstring'), 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.iconv', array(), 'requirements'), $status = function_exists('iconv'), $on, $status ? $on : $off, false, $translator->trans('sylius.extensions.help', array('%extension%' => 'iconv'), 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.exif', array(), 'requirements'), $status = function_exists('exif_read_data'), $on, $status ? $on : $off, true, $translator->trans('sylius.extensions.help', array('%extension%' => 'exif'), 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.intl', array(), 'requirements'), $status = extension_loaded('intl'), $on, $status ? $on : $off, true, $translator->trans('sylius.extensions.help', array('%extension%' => 'intl'), 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.fileinfo', array(), 'requirements'), $status = extension_loaded('fileinfo'), $on, $status ? $on : $off, true, $translator->trans('sylius.extensions.help', array('%extension%' => 'fileinfo'), 'requirements')));
     if (extension_loaded('intl')) {
         if (defined('INTL_ICU_VERSION')) {
             $version = INTL_ICU_VERSION;
         } else {
             $reflector = new ReflectionExtension('intl');
             ob_start();
             $reflector->info();
             $output = strip_tags(ob_get_clean());
             preg_match('/^ICU version +(?:=> )?(.*)$/m', $output, $matches);
             $version = $matches[1];
         }
         $this->add(new Requirement($translator->trans('sylius.extensions.icu', array(), 'requirements'), version_compare($version, '4.0', '>='), '4.0', $version, false, $translator->trans('sylius.extensions.help', array('%extension%' => 'ICU (>=4.0)'), 'requirements')));
     }
     $status = function_exists('apc_store') && ini_get('apc.enabled') || function_exists('eaccelerator_put') && ini_get('eaccelerator.enable') || function_exists('xcache_set') || function_exists('zend_optimizer_version');
     $this->add(new Requirement($translator->trans('sylius.extensions.accelerator', array(), 'requirements'), $status, $on, $status ? $on : $off, false, $translator->trans('sylius.extensions.accelerator.help', array(), 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.pdo', array(), 'requirements'), $status = class_exists('PDO'), $on, $status ? $on : $off, false, $translator->trans('sylius.extensions.help', array('%extension%' => 'PDO'), 'requirements')))->add(new Requirement($translator->trans('sylius.extensions.gd', array(), 'requirements'), $status = defined('GD_VERSION'), $on, $status ? $on : $off, true, $translator->trans('sylius.extensions.help', array('%extension%' => 'gd'), 'requirements')));
 }
 public function __construct(TranslatorInterface $translator, $root, $cacheDir, $logDir)
 {
     parent::__construct($translator->trans('sylius.filesystem.header', [], 'requirements'));
     $this->add(new Requirement($translator->trans('sylius.filesystem.vendors', [], 'requirements'), is_dir($root . '/../vendor')))->add(new Requirement($translator->trans('sylius.filesystem.cache.header', [], 'requirements'), is_writable($cacheDir), true, $translator->trans('sylius.filesystem.cache.help', ['%path%' => $cacheDir], 'requirements')))->add(new Requirement($translator->trans('sylius.filesystem.logs.header', [], 'requirements'), is_writable($logDir), true, $translator->trans('sylius.filesystem.logs.help', ['%path%' => $logDir], 'requirements')))->add(new Requirement($translator->trans('sylius.filesystem.parameters.header', [], 'requirements'), is_writable($root . '/config/parameters.yml'), true, $translator->trans('sylius.filesystem.parameters.help', ['%path%' => $root . '/config/parameters.yml'], 'requirements')));
 }
 public function __construct(TranslatorInterface $translator)
 {
     parent::__construct($translator->trans('sylius.settings.header', [], 'requirements'));
     $this->add(new Requirement($translator->trans('sylius.settings.timezone', [], 'requirements'), $this->isOn('date.timezone'), true))->add(new Requirement($translator->trans('sylius.settings.version_recommended', [], 'requirements'), version_compare(phpversion(), self::RECOMMENDED_PHP_VERSION, '>='), false))->add(new Requirement($translator->trans('sylius.settings.detect_unicode', [], 'requirements'), !$this->isOn('detect_unicode'), false))->add(new Requirement($translator->trans('sylius.settings.session.auto_start', [], 'requirements'), !$this->isOn('session.auto_start'), false));
 }