Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Commit dc60245

Browse files
committed
Merge branch '2.7' into 2.8
Conflicts: composer.json
2 parents 9e1f2f1 + d5d931c commit dc60245

File tree

5 files changed

+130
-169
lines changed

5 files changed

+130
-169
lines changed

app/SymfonyRequirements.php

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function getTestMessage()
7777
}
7878

7979
/**
80-
* Returns the help text for resolving the problem
80+
* Returns the help text for resolving the problem.
8181
*
8282
* @return string The help text
8383
*/
@@ -119,10 +119,10 @@ class PhpIniRequirement extends Requirement
119119
*
120120
* @param string $cfgName The configuration name used for ini_get()
121121
* @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false,
122-
or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
122+
* or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
123123
* @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
124-
This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
125-
Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
124+
* This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
125+
* Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
126126
* @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived)
127127
* @param string|null $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived)
128128
* @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
@@ -221,10 +221,10 @@ public function addRecommendation($fulfilled, $testMessage, $helpHtml, $helpText
221221
*
222222
* @param string $cfgName The configuration name used for ini_get()
223223
* @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false,
224-
or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
224+
* or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
225225
* @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
226-
This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
227-
Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
226+
* This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
227+
* Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
228228
* @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived)
229229
* @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived)
230230
* @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
@@ -239,10 +239,10 @@ public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence =
239239
*
240240
* @param string $cfgName The configuration name used for ini_get()
241241
* @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false,
242-
or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
242+
* or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
243243
* @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
244-
This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
245-
Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
244+
* This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
245+
* Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
246246
* @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived)
247247
* @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived)
248248
* @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
@@ -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', '>='),

app/config/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ framework:
1818
form: ~
1919
csrf_protection: ~
2020
validation: { enable_annotations: true }
21+
#serializer: { enable_annotations: true }
2122
templating:
2223
engines: ['twig']
2324
#assets_version: SomeVersionScheme

app/config/config_prod.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ imports:
33

44
#framework:
55
# validation:
6-
# cache: apc
6+
# cache: validator.mapping.cache.apc
7+
# serializer:
8+
# cache: serializer.mapping.cache.apc
79

810
#doctrine:
911
# orm:

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44
"type": "project",
55
"description": "The \"Symfony Standard Edition\" distribution",
66
"autoload": {
7-
"psr-0": { "": "src/", "SymfonyStandard": "app/" }
7+
"psr-4": { "": "src/", "SymfonyStandard\\": "app/" }
88
},
99
"require": {
1010
"php": ">=5.3.3",
1111
"symfony/symfony": "2.8.x-dev",
1212
"doctrine/orm": "~2.2,>=2.2.3,<2.5",
1313
"doctrine/dbal": "<2.5",
1414
"doctrine/doctrine-bundle": "~1.4",
15-
"twig/extensions": "~1.0",
1615
"symfony/assetic-bundle": "~2.3",
1716
"symfony/swiftmailer-bundle": "~2.3",
1817
"symfony/monolog-bundle": "~2.4",

0 commit comments

Comments
 (0)