Skip to content

Commit d4b895c

Browse files
committed
Merge branch '2.3' into 2.4
* 2.3: fixed various inconsistencies reduced recursion when building DumperPrefixCollection renamed variables - making next change more readable removing dead code. [DomCrawler] Fixed filterXPath() chaining [DomCrawler] Fixed incorrect handling of image inputs Conflicts: src/Symfony/Component/DomCrawler/Crawler.php src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php src/Symfony/Component/Serializer/Tests/Normalizer/CustomNormalizerTest.php src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php
2 parents e1fb062 + 06b6ad0 commit d4b895c

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Normalizer/CustomNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function normalize($object, $format = null, array $context = array())
2929
*/
3030
public function denormalize($data, $class, $format = null, array $context = array())
3131
{
32-
$object = new $class;
32+
$object = new $class();
3333
$object->denormalize($this->serializer, $data, $format, $context);
3434

3535
return $object;

Tests/Encoder/JsonEncoderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected function setUp()
2525

2626
public function testEncodeScalar()
2727
{
28-
$obj = new \stdClass;
28+
$obj = new \stdClass();
2929
$obj->foo = "foo";
3030

3131
$expected = '{"foo":"foo"}';
@@ -68,7 +68,7 @@ protected function getJsonSource()
6868

6969
protected function getObject()
7070
{
71-
$obj = new \stdClass;
71+
$obj = new \stdClass();
7272
$obj->foo = 'foo';
7373
$obj->bar = array('a', 'b');
7474
$obj->baz = array('key' => 'val', 'key2' => 'val', 'A B' => 'bar', 'item' => array(array('title' => 'title1'), array('title' => 'title2')), 'Barry' => array('FooBar' => array('Baz' => 'Ed', '@id' => 1)));

Tests/Normalizer/CustomNormalizerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function testDeserialize()
4646
public function testSupportsNormalization()
4747
{
4848
$this->assertTrue($this->normalizer->supportsNormalization(new ScalarDummy()));
49-
$this->assertFalse($this->normalizer->supportsNormalization(new \stdClass));
49+
$this->assertFalse($this->normalizer->supportsNormalization(new \stdClass()));
5050
}
5151

5252
public function testSupportsDenormalization()

Tests/SerializerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class SerializerTest extends \PHPUnit_Framework_TestCase
2828
public function testNormalizeNoMatch()
2929
{
3030
$this->serializer = new Serializer(array($this->getMock('Symfony\Component\Serializer\Normalizer\CustomNormalizer')));
31-
$this->serializer->normalize(new \stdClass, 'xml');
31+
$this->serializer->normalize(new \stdClass(), 'xml');
3232
}
3333

3434
public function testNormalizeTraversable()
@@ -51,7 +51,7 @@ public function testNormalizeGivesPriorityToInterfaceOverTraversable()
5151
public function testNormalizeOnDenormalizer()
5252
{
5353
$this->serializer = new Serializer(array(new TestDenormalizer()), array());
54-
$this->assertTrue($this->serializer->normalize(new \stdClass, 'json'));
54+
$this->assertTrue($this->serializer->normalize(new \stdClass(), 'json'));
5555
}
5656

5757
/**

0 commit comments

Comments
 (0)