@@ -542,11 +542,22 @@ function_exists('simplexml_import_dom'),
542542
543543 /* optional recommendations follow */
544544
545- $ this ->addRecommendation (
546- file_get_contents (__FILE__ ) === file_get_contents (__DIR__ .'/../vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/skeleton/app/SymfonyRequirements.php ' ),
547- 'Requirements file should be up-to-date ' ,
548- 'Your requirements file is outdated. Run composer install and re-check your configuration. '
549- );
545+ if (file_exists (__DIR__ .'/../vendor/composer ' )) {
546+ require_once __DIR__ .'/../vendor/autoload.php ' ;
547+
548+ try {
549+ $ r = new \ReflectionClass ('Sensio\Bundle\DistributionBundle\SensioDistributionBundle ' );
550+
551+ $ contents = file_get_contents (dirname ($ r ->getFileName ()).'/Resources/skeleton/app/SymfonyRequirements.php ' );
552+ } catch (\ReflectionException $ e ) {
553+ $ contents = '' ;
554+ }
555+ $ this ->addRecommendation (
556+ file_get_contents (__FILE__ ) === $ contents ,
557+ 'Requirements file should be up-to-date ' ,
558+ 'Your requirements file is outdated. Run composer install and re-check your configuration. '
559+ );
560+ }
550561
551562 $ this ->addRecommendation (
552563 version_compare ($ installedPhpVersion , '5.3.4 ' , '>= ' ),
@@ -632,15 +643,15 @@ class_exists('Locale'),
632643 'Install and enable the <strong>intl</strong> extension (used for validators). '
633644 );
634645
635- if (class_exists ('Collator ' )) {
646+ if (extension_loaded ('intl ' )) {
647+ // in some WAMP server installations, new Collator() returns null
636648 $ this ->addRecommendation (
637649 null !== new Collator ('fr_FR ' ),
638650 'intl extension should be correctly configured ' ,
639651 'The intl extension does not behave properly. This problem is typical on PHP 5.3.X x64 WIN builds. '
640652 );
641- }
642653
643- if ( class_exists ( ' Locale ' )) {
654+ // check for compatible ICU versions (only done when you have the intl extension)
644655 if (defined ('INTL_ICU_VERSION ' )) {
645656 $ version = INTL_ICU_VERSION ;
646657 } else {
@@ -659,6 +670,14 @@ class_exists('Locale'),
659670 'intl ICU version should be at least 4+ ' ,
660671 'Upgrade your <strong>intl</strong> extension with a newer ICU version (4+). '
661672 );
673+
674+ $ this ->addPhpIniRecommendation (
675+ 'intl.error_level ' ,
676+ create_function ('$cfgValue ' , 'return (int) $cfgValue === 0; ' ),
677+ true ,
678+ 'intl.error_level should be 0 in php.ini ' ,
679+ 'Set "<strong>intl.error_level</strong>" to "<strong>0</strong>" in php.ini<a href="#phpini">*</a> to inhibit the messages when an error occurs in ICU functions. '
680+ );
662681 }
663682
664683 $ accelerator =
0 commit comments