@@ -542,11 +542,22 @@ function_exists('simplexml_import_dom'),
542
542
543
543
/* optional recommendations follow */
544
544
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
+ }
550
561
551
562
$ this ->addRecommendation (
552
563
version_compare ($ installedPhpVersion , '5.3.4 ' , '>= ' ),
@@ -632,15 +643,15 @@ class_exists('Locale'),
632
643
'Install and enable the <strong>intl</strong> extension (used for validators). '
633
644
);
634
645
635
- if (class_exists ('Collator ' )) {
646
+ if (extension_loaded ('intl ' )) {
647
+ // in some WAMP server installations, new Collator() returns null
636
648
$ this ->addRecommendation (
637
649
null !== new Collator ('fr_FR ' ),
638
650
'intl extension should be correctly configured ' ,
639
651
'The intl extension does not behave properly. This problem is typical on PHP 5.3.X x64 WIN builds. '
640
652
);
641
- }
642
653
643
- if ( class_exists ( ' Locale ' )) {
654
+ // check for compatible ICU versions (only done when you have the intl extension)
644
655
if (defined ('INTL_ICU_VERSION ' )) {
645
656
$ version = INTL_ICU_VERSION ;
646
657
} else {
@@ -659,6 +670,14 @@ class_exists('Locale'),
659
670
'intl ICU version should be at least 4+ ' ,
660
671
'Upgrade your <strong>intl</strong> extension with a newer ICU version (4+). '
661
672
);
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
+ );
662
681
}
663
682
664
683
$ accelerator =
0 commit comments