Skip to content

Commit 2b9a962

Browse files
committed
Merge branch '2.3' into 2.6
* 2.3: Fix small coding style [2.3] Static Code Analysis for Components [Form] fixed phpdoc CS: Convert double quotes to single quotes Fixed MongoODM entity loader. Improved loading behavior of entities and documents by reusing entity loader. [Validator] added Japanese translation for unmatched charset (id: 80) [DependencyInjection] Highest precedence for user parameters [Translation][MoFileLoader] fixed load empty translation. bumped Symfony version to 2.3.27 updated VERSION for 2.3.26 update CONTRIBUTORS for 2.3.26 updated CHANGELOG for 2.3.26 Conflicts: src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php src/Symfony/Bundle/TwigBundle/Command/LintCommand.php src/Symfony/Component/Config/Definition/ReferenceDumper.php src/Symfony/Component/Debug/ExceptionHandler.php src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php src/Symfony/Component/Filesystem/Filesystem.php src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php src/Symfony/Component/HttpKernel/Kernel.php src/Symfony/Component/Serializer/Encoder/XmlEncoder.php src/Symfony/Component/Translation/PluralizationRules.php src/Symfony/Component/Validator/Constraints/IssnValidator.php src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf src/Symfony/Component/Yaml/Tests/InlineTest.php
2 parents a49245b + ee2a9d6 commit 2b9a962

File tree

6 files changed

+13
-14
lines changed

6 files changed

+13
-14
lines changed

Compiler/MergeExtensionConfigurationPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ public function process(ContainerBuilder $container)
5555
$extension->load($config, $tmpContainer);
5656

5757
$container->merge($tmpContainer);
58+
$container->getParameterBag()->add($parameters);
5859
}
5960

6061
$container->addDefinitions($definitions);
6162
$container->addAliases($aliases);
62-
$container->getParameterBag()->add($parameters);
6363
}
6464
}

Dumper/GraphvizDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ private function findNodes()
180180
foreach ($container->getServiceIds() as $id) {
181181
$service = $container->get($id);
182182

183-
if (in_array($id, array_keys($container->getAliases()))) {
183+
if (array_key_exists($id, $container->getAliases())) {
184184
continue;
185185
}
186186

Dumper/PhpDumper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ private function addService($id, $definition)
560560
if ($definition->isSynthetic()) {
561561
$return[] = '@throws RuntimeException always since this service is expected to be injected dynamically';
562562
} elseif ($class = $definition->getClass()) {
563-
$return[] = sprintf("@return %s A %s instance.", 0 === strpos($class, '%') ? 'object' : "\\".$class, $class);
563+
$return[] = sprintf('@return %s A %s instance.', 0 === strpos($class, '%') ? 'object' : "\\".$class, $class);
564564
} elseif ($definition->getFactory()) {
565565
$factory = $definition->getFactory();
566566
if (is_string($factory)) {
@@ -1334,7 +1334,7 @@ private function dumpValue($value, $interpolate = true)
13341334
} elseif (null !== $value->getFactoryService()) {
13351335
$service = $this->dumpValue($value->getFactoryService());
13361336

1337-
return sprintf("%s->%s(%s)", 0 === strpos($service, '$') ? sprintf('$this->get(%s)', $service) : $this->getServiceCall($value->getFactoryService()), $value->getFactoryMethod(), implode(', ', $arguments));
1337+
return sprintf('%s->%s(%s)', 0 === strpos($service, '$') ? sprintf('$this->get(%s)', $service) : $this->getServiceCall($value->getFactoryService()), $value->getFactoryMethod(), implode(', ', $arguments));
13381338
} else {
13391339
throw new RuntimeException('Cannot dump definitions which have factory method without factory service or factory class.');
13401340
}

Tests/Compiler/MergeExtensionConfigurationPassTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
43
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
54

65
use Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass;

Tests/Dumper/PhpDumperTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public function testDumpOptimizationString()
4848
'.' => 'dot as a key',
4949
'.\'\'.' => 'concatenation as a key',
5050
'\'\'.' => 'concatenation from the start key',
51-
'optimize concatenation' => "string1%some_string%string2",
52-
'optimize concatenation with empty string' => "string1%empty_value%string2",
51+
'optimize concatenation' => 'string1%some_string%string2',
52+
'optimize concatenation with empty string' => 'string1%empty_value%string2',
5353
'optimize concatenation from the start' => '%empty_value%start',
5454
'optimize concatenation at the end' => 'end%empty_value%',
5555
));

Tests/Loader/XmlFileLoaderTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -260,31 +260,31 @@ public function testParsesTags()
260260

261261
public function testConvertDomElementToArray()
262262
{
263-
$doc = new \DOMDocument("1.0");
263+
$doc = new \DOMDocument('1.0');
264264
$doc->loadXML('<foo>bar</foo>');
265265
$this->assertEquals('bar', XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
266266

267-
$doc = new \DOMDocument("1.0");
267+
$doc = new \DOMDocument('1.0');
268268
$doc->loadXML('<foo foo="bar" />');
269269
$this->assertEquals(array('foo' => 'bar'), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
270270

271-
$doc = new \DOMDocument("1.0");
271+
$doc = new \DOMDocument('1.0');
272272
$doc->loadXML('<foo><foo>bar</foo></foo>');
273273
$this->assertEquals(array('foo' => 'bar'), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
274274

275-
$doc = new \DOMDocument("1.0");
275+
$doc = new \DOMDocument('1.0');
276276
$doc->loadXML('<foo><foo>bar<foo>bar</foo></foo></foo>');
277277
$this->assertEquals(array('foo' => array('value' => 'bar', 'foo' => 'bar')), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
278278

279-
$doc = new \DOMDocument("1.0");
279+
$doc = new \DOMDocument('1.0');
280280
$doc->loadXML('<foo><foo></foo></foo>');
281281
$this->assertEquals(array('foo' => null), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
282282

283-
$doc = new \DOMDocument("1.0");
283+
$doc = new \DOMDocument('1.0');
284284
$doc->loadXML('<foo><foo><!-- foo --></foo></foo>');
285285
$this->assertEquals(array('foo' => null), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
286286

287-
$doc = new \DOMDocument("1.0");
287+
$doc = new \DOMDocument('1.0');
288288
$doc->loadXML('<foo><foo foo="bar"/><foo foo="bar"/></foo>');
289289
$this->assertEquals(array('foo' => array(array('foo' => 'bar'), array('foo' => 'bar'))), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
290290
}

0 commit comments

Comments
 (0)