X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app%2FSymfonyRequirements.php;h=28b0dcdbfcd82a6265fa39f57325fbf46747ce09;hb=386cd24663f9b6384372ef4f78a7f3100f06057d;hp=caabe407b1c057419c2e4dae3ed0a2e23f663753;hpb=2878416f8b4d94fb5e64c2fa61861526a7654d3d;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/SymfonyRequirements.php b/app/SymfonyRequirements.php index caabe407..28b0dcdb 100644 --- a/app/SymfonyRequirements.php +++ b/app/SymfonyRequirements.php @@ -446,6 +446,12 @@ class SymfonyRequirements extends RequirementCollection ); } + $this->addRequirement( + function_exists('iconv'), + 'iconv() must be available', + 'Install and enable the iconv extension.' + ); + $this->addRequirement( function_exists('json_encode'), 'json_encode() must be available', @@ -546,10 +552,10 @@ class SymfonyRequirements extends RequirementCollection require_once __DIR__.'/../vendor/autoload.php'; try { - $r = new \ReflectionClass('Sensio\Bundle\DistributionBundle\SensioDistributionBundle'); + $r = new ReflectionClass('Sensio\Bundle\DistributionBundle\SensioDistributionBundle'); $contents = file_get_contents(dirname($r->getFileName()).'/Resources/skeleton/app/SymfonyRequirements.php'); - } catch (\ReflectionException $e) { + } catch (ReflectionException $e) { $contents = ''; } $this->addRecommendation( @@ -638,20 +644,20 @@ class SymfonyRequirements extends RequirementCollection } $this->addRecommendation( - class_exists('Locale'), + extension_loaded('intl'), 'intl extension should be available', 'Install and enable the intl extension (used for validators).' ); - if (class_exists('Collator')) { + if (extension_loaded('intl')) { + // in some WAMP server installations, new Collator() returns null $this->addRecommendation( null !== new Collator('fr_FR'), 'intl extension should be correctly configured', 'The intl extension does not behave properly. This problem is typical on PHP 5.3.X x64 WIN builds.' ); - } - if (class_exists('Locale')) { + // check for compatible ICU versions (only done when you have the intl extension) if (defined('INTL_ICU_VERSION')) { $version = INTL_ICU_VERSION; } else { @@ -670,6 +676,14 @@ class SymfonyRequirements extends RequirementCollection 'intl ICU version should be at least 4+', 'Upgrade your intl extension with a newer ICU version (4+).' ); + + $this->addPhpIniRecommendation( + 'intl.error_level', + create_function('$cfgValue', 'return (int) $cfgValue === 0;'), + true, + 'intl.error_level should be 0 in php.ini', + 'Set "intl.error_level" to "0" in php.ini* to inhibit the messages when an error occurs in ICU functions.' + ); } $accelerator =