public function __construct()
 {
     parent::__construct();
     $phpVersion = phpversion();
     $gdVersion = defined('GD_VERSION') ? GD_VERSION : null;
     $curlVersion = function_exists('curl_version') ? curl_version() : null;
     $icuVersion = Intl::getIcuVersion();
     $this->addOroRequirement(version_compare($phpVersion, self::REQUIRED_PHP_VERSION, '>='), sprintf('PHP version must be at least %s (%s installed)', self::REQUIRED_PHP_VERSION, $phpVersion), sprintf('You are running PHP version "<strong>%s</strong>", but Oro needs at least PHP "<strong>%s</strong>" to run.' . 'Before using Oro, upgrade your PHP installation, preferably to the latest version.', $phpVersion, self::REQUIRED_PHP_VERSION), sprintf('Install PHP %s or newer (installed version is %s)', self::REQUIRED_PHP_VERSION, $phpVersion));
     $this->addOroRequirement(null !== $gdVersion && version_compare($gdVersion, self::REQUIRED_GD_VERSION, '>='), 'GD extension must be at least ' . self::REQUIRED_GD_VERSION, 'Install and enable the <strong>GD</strong> extension at least ' . self::REQUIRED_GD_VERSION . ' version');
     $this->addOroRequirement(null !== $curlVersion && version_compare($curlVersion['version'], self::REQUIRED_CURL_VERSION, '>='), 'cURL extension must be at least ' . self::REQUIRED_CURL_VERSION, 'Install and enable the <strong>cURL</strong> extension at least ' . self::REQUIRED_CURL_VERSION . ' version');
     $this->addOroRequirement(function_exists('mcrypt_encrypt'), 'mcrypt_encrypt() should be available', 'Install and enable the <strong>Mcrypt</strong> extension.');
     $this->addOroRequirement(class_exists('Locale'), 'intl extension should be available', 'Install and enable the <strong>intl</strong> extension.');
     $this->addOroRequirement(null !== $icuVersion && version_compare($icuVersion, self::REQUIRED_ICU_VERSION, '>='), 'icu library must be at least ' . self::REQUIRED_ICU_VERSION, 'Install and enable the <strong>icu</strong> library at least ' . self::REQUIRED_ICU_VERSION . ' version');
     $this->addRecommendation(class_exists('SoapClient'), 'SOAP extension should be installed (API calls)', 'Install and enable the <strong>SOAP</strong> extension.');
     // Windows specific checks
     if (defined('PHP_WINDOWS_VERSION_BUILD')) {
         $this->addRecommendation(function_exists('finfo_open'), 'finfo_open() should be available', 'Install and enable the <strong>Fileinfo</strong> extension.');
         $this->addRecommendation(class_exists('COM'), 'COM extension should be installed', 'Install and enable the <strong>COM</strong> extension.');
     }
     // Unix specific checks
     // if (!defined('PHP_WINDOWS_VERSION_BUILD')) {
     //     $this->addRequirement(
     //         $this->checkFileNameLength(),
     //         'Cache folder should not be inside encrypted directory',
     //         'Move <strong>app/cache</strong> folder outside encrypted directory.'
     //     );
     // }
     // Web installer specific checks
     if ('cli' !== PHP_SAPI) {
         $output = $this->checkCliRequirements();
         $requirement = new CliRequirement(!$output, 'Requirements validation for PHP CLI', 'If you have multiple PHP versions installed, you need to configure ORO_PHP_PATH variable with PHP binary path used by web server');
         $requirement->setOutput($output);
         $this->add($requirement);
     }
     $baseDir = realpath(__DIR__ . '/..');
     $mem = $this->getBytes(ini_get('memory_limit'));
     $this->addPhpIniRequirement('memory_limit', function ($cfgValue) use($mem) {
         return $mem >= 512 * 1024 * 1024 || -1 == $mem;
     }, false, 'memory_limit should be at least 512M', 'Set the "<strong>memory_limit</strong>" setting in php.ini<a href="#phpini">*</a> to at least "512M".');
     $jsEngine = RequireJSConfiguration::getDefaultJsEngine();
     $this->addRecommendation($jsEngine ? true : false, $jsEngine ? "A JS Engine ({$jsEngine}) is installed" : 'JSEngine such as NodeJS should be installed', 'Install <strong>JSEngine</strong>.');
     $this->addOroRequirement(is_writable($baseDir . '/web/uploads'), 'web/uploads/ directory must be writable', 'Change the permissions of the "<strong>web/uploads/</strong>" directory so that the web server can write into it.');
     $this->addOroRequirement(is_writable($baseDir . '/web/media'), 'web/media/ directory must be writable', 'Change the permissions of the "<strong>web/media/</strong>" directory so that the web server can write into it.');
     $this->addOroRequirement(is_writable($baseDir . '/web/bundles'), 'web/bundles/ directory must be writable', 'Change the permissions of the "<strong>web/bundles/</strong>" directory so that the web server can write into it.');
     $this->addOroRequirement(is_writable($baseDir . '/app/attachment'), 'app/attachment/ directory must be writable', 'Change the permissions of the "<strong>app/attachment/</strong>" directory so that the web server can write into it.');
     if (is_dir($baseDir . '/web/js')) {
         $this->addOroRequirement(is_writable($baseDir . '/web/js'), 'web/js directory must be writable', 'Change the permissions of the "<strong>web/js</strong>" directory so that the web server can write into it.');
     }
     if (is_dir($baseDir . '/web/css')) {
         $this->addOroRequirement(is_writable($baseDir . '/web/css'), 'web/css directory must be writable', 'Change the permissions of the "<strong>web/css</strong>" directory so that the web server can write into it.');
     }
     if (!is_dir($baseDir . '/web/css') || !is_dir($baseDir . '/web/js')) {
         $this->addOroRequirement(is_writable($baseDir . '/web'), 'web directory must be writable', 'Change the permissions of the "<strong>web</strong>" directory so that the web server can write into it.');
     }
     if (is_file($baseDir . '/app/config/parameters.yml')) {
         $this->addOroRequirement(is_writable($baseDir . '/app/config/parameters.yml'), 'app/config/parameters.yml file must be writable', 'Change the permissions of the "<strong>app/config/parameters.yml</strong>" file so that the web server can write into it.');
     }
 }