Skip to content

Commit

Permalink
Updated Composer dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
webmozart committed Jun 3, 2015
1 parent 7a36e61 commit 4da4824
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 47 deletions.
35 changes: 27 additions & 8 deletions app/SymfonyRequirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -542,11 +542,22 @@ function_exists('simplexml_import_dom'),

/* optional recommendations follow */

$this->addRecommendation(
file_get_contents(__FILE__) === file_get_contents(__DIR__.'/../vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/skeleton/app/SymfonyRequirements.php'),
'Requirements file should be up-to-date',
'Your requirements file is outdated. Run composer install and re-check your configuration.'
);
if (file_exists(__DIR__.'/../vendor/composer')) {
require_once __DIR__.'/../vendor/autoload.php';

try {
$r = new \ReflectionClass('Sensio\Bundle\DistributionBundle\SensioDistributionBundle');

$contents = file_get_contents(dirname($r->getFileName()).'/Resources/skeleton/app/SymfonyRequirements.php');
} catch (\ReflectionException $e) {
$contents = '';
}
$this->addRecommendation(
file_get_contents(__FILE__) === $contents,
'Requirements file should be up-to-date',
'Your requirements file is outdated. Run composer install and re-check your configuration.'
);
}

$this->addRecommendation(
version_compare($installedPhpVersion, '5.3.4', '>='),
Expand Down Expand Up @@ -632,15 +643,15 @@ class_exists('Locale'),
'Install and enable the <strong>intl</strong> 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 {
Expand All @@ -659,6 +670,14 @@ class_exists('Locale'),
'intl ICU version should be at least 4+',
'Upgrade your <strong>intl</strong> 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 "<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.'
);
}

$accelerator =
Expand Down
67 changes: 30 additions & 37 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions puli.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"installer": "composer"
},
"incenteev/composer-parameter-handler": {
"install-path": "vendor/incenteev/composer-parameter-handler/Incenteev/ParameterHandler",
"install-path": "vendor/incenteev/composer-parameter-handler",
"installer": "composer"
},
"jdorn/sql-formatter": {
Expand Down Expand Up @@ -123,7 +123,7 @@
"installer": "composer"
},
"sensio/framework-extra-bundle": {
"install-path": "vendor/sensio/framework-extra-bundle/Sensio/Bundle/FrameworkExtraBundle",
"install-path": "vendor/sensio/framework-extra-bundle",
"installer": "composer"
},
"sensio/generator-bundle": {
Expand Down

0 comments on commit 4da4824

Please sign in to comment.