Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 677e6a5

Browse filesBrowse files
committed
Updated the demo application to Symfony 2.7
1 parent b891e4c commit 677e6a5
Copy full SHA for 677e6a5

File tree

Expand file treeCollapse file tree

7 files changed

+146
-123
lines changed
Filter options
Expand file treeCollapse file tree

7 files changed

+146
-123
lines changed

‎app/SymfonyRequirements.php

Copy file name to clipboardExpand all lines: app/SymfonyRequirements.php
+27-8Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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 =

‎composer.json

Copy file name to clipboardExpand all lines: composer.json
+9-9Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
"require": {
1010
"php" : ">=5.3.3",
1111
"ext-pdo_sqlite" : "*",
12-
"doctrine/doctrine-bundle" : "~1.2",
12+
"doctrine/doctrine-bundle" : "~1.5",
1313
"doctrine/doctrine-fixtures-bundle" : "~2.2",
14-
"doctrine/orm" : "~2.2,>=2.2.3",
14+
"doctrine/orm" : "~2.5",
1515
"erusev/parsedown" : "~1.5",
16-
"incenteev/composer-parameter-handler" : "~2.0",
16+
"incenteev/composer-parameter-handler" : "~2.1",
1717
"ircmaxell/password-compat" : "~1.0",
18-
"leafo/scssphp" : "~0.1.",
18+
"leafo/scssphp" : "~0.1.5",
1919
"patchwork/jsqueeze" : "~1.0",
20-
"sensio/distribution-bundle" : "~3.0.12",
20+
"sensio/distribution-bundle" : "~3.0.28",
2121
"sensio/framework-extra-bundle" : "~3.0",
22-
"symfony/assetic-bundle" : "~2.3",
23-
"symfony/monolog-bundle" : "~2.4",
22+
"symfony/assetic-bundle" : "~2.6",
23+
"symfony/monolog-bundle" : "~2.7",
2424
"symfony/swiftmailer-bundle" : "~2.3",
25-
"symfony/symfony" : "~2.6",
26-
"twig/extensions" : "~1.0"
25+
"symfony/symfony" : "~2.7",
26+
"twig/extensions" : "~1.2"
2727
},
2828
"require-dev": {
2929
"sensio/generator-bundle": "~2.3"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.