10000 Merge branch '3.2' · symfony/symfony@55a34b7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 55a34b7

Browse files
Merge branch '3.2'
* 3.2: Add HEADER_FORWARDED to setTrustedHeaderName docs Fix phpDoc typo [FrameworkBundle][Console] JsonDescriptor: Respect original output Remove dead code Enable dump() in autoload-dev add missing functional Serializer test case
2 parents 0b57d17 + 4fd9148 commit 55a34b7

File tree

12 files changed

+18
-52
lines changed

12 files changed

+18
-52
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@
121121
"**/Tests/"
122122
]
123123
},
124+
"autoload-dev": {
125+
"files": [ "src/Symfony/Component/VarDumper/Resources/functions/dump.php" ]
126+
},
124127
"minimum-stability": "dev",
125128
"extra": {
126129
"branch-alias": {

src/Symfony/Bridge/Doctrine/Form/DoctrineOrmExtension.php

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,20 @@
1414
use Doctrine\Common\Persistence\ManagerRegistry;
1515
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
1616
use Symfony\Component\Form\AbstractExtension;
17-
use Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator;
18-
use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface;
19-
use Symfony\Component\Form\ChoiceList\Factory\DefaultChoiceListFactory;
20-
use Symfony\Component\Form\ChoiceList\Factory\PropertyAccessDecorator;
21-
use Symfony\Component\PropertyAccess\PropertyAccess;
22-
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
2317

2418
class DoctrineOrmExtension extends AbstractExtension
2519
{
2620
protected $registry;
2721

28-
/**
29-
* @var PropertyAccessorInterface
30-
*/
31-
private $propertyAccessor;
32-
33-
/**
34-
* @var ChoiceListFactoryInterface
35-
*/
36-
private $choiceListFactory;
37-
38-
public function __construct(ManagerRegistry $registry, PropertyAccessorInterface $propertyAccessor = null, ChoiceListFactoryInterface $choiceListFactory = null)
22+
public function __construct(ManagerRegistry $registry)
3923
{
4024
$this->registry = $registry;
41-
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();
42-
$this->choiceListFactory = $choiceListFactory ?: new CachingFactoryDecorator(new PropertyAccessDecorator(new DefaultChoiceListFactory(), $this->propertyAccessor));
4325
}
4426

4527
protected function loadTypes()
4628
{
4729
return array(
48-
new EntityType($this->registry, $this->propertyAccessor, $this->choiceListFactory),
30+
new EntityType($this->registry),
4931
);
5032
}
5133

src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
"file": null,
1111
"factory_class": "Full\\Qualified\\FactoryClass",
1212
"factory_method": "get",
13-
"tags": [
14-
15-
],
13+
"tags": [],
1614
"autowire": false
1715
}
1816
},

src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
"file": null,
1111
"factory_class": "Full\\Qualified\\FactoryClass",
1212
"factory_method": "get",
13-
"tags": [
14-
15-
],
13+
"tags": [],
1614
"autowire": false
1715
},
1816
"definition_2": {
@@ -41,9 +39,7 @@
4139
},
4240
{
4341
"name": "tag2",
44-
"parameters": [
45-
46-
]
42+
"parameters": []
4743
}
4844
],
4945
"calls": [

src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@
2626
},
2727
{
2828
"name": "tag2",
29-
"parameters": [
30-
31-
]
29+
"parameters": []
3230
}
3331
],
3432
"calls": [
@@ -37,10 +35,6 @@
3735
"autowire": false
3836
}
3937
},
40-
"aliases": [
41-
42-
],
43-
"services": [
44-
45-
]
38+
"aliases": [],
39+
"services": []
4640
}

src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
"file": null,
99
"factory_class": "Full\\Qualified\\FactoryClass",
1010
"factory_method": "get",
11-
"tags": [
12-
13-
],
11+
"tags": [],
1412
"autowire": false
1513
}

src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@
2424
},
2525
{
2626
"name": "tag2",
27-
"parameters": [
28-
29-
]
27+
"parameters": []
3028
}
3129
],
3230
"calls": [

src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
"scheme": "http|https",
77
"method": "PUT|POST",
88
"class": "Symfony\\Component\\Routing\\Route",
9-
"defaults": [
10-
11-
],
9+
"defaults": [],
1210
"requirements": "NO CUSTOM",
1311
"options": {
1412
"compiler_class": "Symfony\\Component\\Routing\\RouteCompiler",

src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727
"scheme": "http|https",
2828
"method": "PUT|POST",
2929
"class": "Symfony\\Component\\Routing\\Route",
30-
"defaults": [
31-
32-
],
30+
"defaults": [],
3331
"requirements": "NO CUSTOM",
3432
"options": {
3533
"compiler_class": "Symfony\\Component\\Routing\\RouteCompiler",

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/PropertyInfoTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function testPhpDocPriority()
2020
static::bootKernel(array('test_case' => 'Serializer'));
2121
$container = static::$kernel->getContainer();
2222

23-
$this->assertEquals(array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_INT))), $container->get('property_info')->getTypes(Dummy::class, 'codes'));
23+
$this->assertEquals(array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_INT))), $container->get('property_info')->getTypes('Symfony\Bundle\FrameworkBundle\Tests\Functional\Dummy', 'codes'));
2424
}
2525
}
2626

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,7 @@ public static function getTrustedHosts()
600600
* * Request::HEADER_CLIENT_HOST: defaults to X-Forwarded-Host (see getHost())
601601
* * Request::HEADER_CLIENT_PORT: defaults to X-Forwarded-Port (see getPort())
602602
* * Request::HEADER_CLIENT_PROTO: defaults to X-Forwarded-Proto (see getScheme() and isSecure())
603+
* * Request::HEADER_FORWARDED: defaults to Forwarded (see RFC 7239)
603604
*
604605
* Setting an empty value allows to disable the trusted header for the given key.
605606
*

src/Symfony/Component/PropertyAccess/PropertyAccess.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static function createPropertyAccessor()
3131
/**
3232
* Creates a property accessor builder.
3333
*
34-
* @return PropertyAccessor
34+
* @return PropertyAccessorBuilder
3535
*/
3636
public static function createPropertyAccessorBuilder()
3737
{

0 commit comments

Comments
 (0)
0