8000 Merge branch '4.1' into 4.2 · symfony/symfony@adbdec8 · GitHub
[go: up one dir, main page]

Skip to content

Commit adbdec8

Browse files
Merge branch '4.1' into 4.2
* 4.1: [Routing] dont redirect routes with greedy trailing vars with no explicit slash skip native serialize among child and parent serializable objects [Routing] backport tests from 4.1 [MonologBridge] Remove unused local variable Remove unreachable code Add PackageNameTest to ConfigurationTest also add in the changelog the corresponding entry to this PR Support use of hyphen in asset package name Remove gendered pronouns Replace gender by eye color in tests [Security] dont do nested calls to serialize()
2 parents 6b611d5 + 05071a4 commit adbdec8

File tree

31 files changed

+183
-105
lines changed

31 files changed

+183
-105
lines changed

src/Symfony/Bridge/Monolog/Handler/FingersCrossed/HttpCodeActivationStrategy.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ public function isHandlerActivated(array $record)
6060
continue;
6161
}
6262

63-
$urlBlacklist = null;
6463
if (\count($exclusion['urls'])) {
6564
return !preg_match('{('.implode('|', $exclusion['urls']).')}i', $request->getPathInfo());
6665
}

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,7 @@ private function addAssetsSection(ArrayNodeDefinition $rootNode)
648648
->fixXmlConfig('package')
649649
->children()
650650
->arrayNode('packages')
651+
->normalizeKeys(false)
651652
->useAttributeAsKey('name')
652653
->prototype('array')
653654
->fixXmlConfig('base_url')

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,35 @@ public function testAssetsCanBeEnabled()
102102
$this->assertEquals($defaultConfig, $config['assets']);
103103
}
104104

105+
/**
106+
* @dataProvider provideValidAssetsPackageNameConfigurationTests
107+
*/
108+
public function testValidAssetsPackageNameConfiguration($packageName)
109+
{
110+
$processor = new Processor();
111+
$configuration = new Configuration(true);
112+
$config = $processor->processConfiguration($configuration, [
113+
[
114+
'assets' => [
115+
'packages' => [
116+
$packageName => [],
117+
],
118+
],
119+
],
120+
]);
121+
122+
$this->assertArrayHasKey($packageName, $config['assets']['packages']);
123+
}
124+
125+
public function provideValidAssetsPackageNameConfigurationTests()
126+
{
127+
return [
128+
['foobar'],
129+
['foo-bar'],
130+
['foo_bar'],
131+
];
132+
}
133+
105134
/**
106135
* @dataProvider provideInvalidAssetConfigurationTests
107136
*/

src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Serialization/Author.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
class Author
66
{
7-
public $gender;
7+
public $eyeColor;
88
}

src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Serialization/Person.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
class Person
66
{
7-
public $gender;
7+
public $eyeColor;
88
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Serialization\Author:
22
attributes:
3-
gender:
3+
eyeColor:
44
groups: ['group1', 'group2']

src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Serialization/Resources/person.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
http://symfony.com/schema/dic/serializer-mapping/serializer-mapping-1.0.xsd"
66
>
77
<class name="Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Serialization\Person">
8-
<attribute name="gender">
8+
<attribute name="eyeColor">
99
<group>group1</group>
1010
<group>group2</group>
1111
</attribute>

src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Author.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
class Author
66
{
7-
public $gender;
7+
public $eyeColor;
88
}

src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Person.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
class Person
66
{
7-
public $gender;
7+
public $eyeColor;
88
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Validation\Author:
22
properties:
3-
gender:
4-
- Choice: { choices: [male, female, other], message: Choose a valid gender. }
3+
eyeColor:
4+
- Choice: { choices: [brown, green, blue], message: Choose a valid eye color. }

0 commit comments

Comments
 (0)
0