Skip to content

Commit 09806f1

Browse files
committed
Merge branch '2.4' into 2.5
* 2.4: fixed CS [Process] fixed some volatile tests [HttpKernel] fixed a volatile test [HttpFoundation] fixed some volatile tests [Tests] PHPUnit Optimizations Use getPathname() instead of string casting to get BinaryFileReponse file path Conflicts: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.php src/Symfony/Component/ClassLoader/Tests/ApcUniversalClassLoaderTest.php src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php src/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php src/Symfony/Component/Process/Tests/AbstractProcessTest.php src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php src/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php src/Symfony/Component/Validator/Constraints/ChoiceValidator.php src/Symfony/Component/Validator/Constraints/CollectionValidator.php src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php src/Symfony/Component/Validator/Tests/ValidationVisitorTest.php src/Symfony/Component/Yaml/Parser.php
2 parents 998aab8 + 37178a9 commit 09806f1

23 files changed

+38
-43
lines changed

Command/TranslationUpdateCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ protected function configure()
5959
new InputOption(
6060
'clean', null, InputOption::VALUE_NONE,
6161
'Should clean not found messages'
62-
)
62+
),
6363
))
6464
->setDescription('Updates the translation file')
6565
->setHelp(<<<EOF

Console/Descriptor/MarkdownDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ protected function describeContainerAlias(Alias $alias, array $options = array()
212212
*/
213213
protected function describeContainerParameter($parameter, array $options = array())
214214
{
215-
$this->write(isset($options['parameter']) ? sprintf("%s\n%s\n\n%s", $options['parameter'], str_repeat('=', strlen($options['parameter'])), $this->formatParameter($parameter)): $parameter);
215+
$this->write(isset($options['parameter']) ? sprintf("%s\n%s\n\n%s", $options['parameter'], str_repeat('=', strlen($options['parameter'])), $this->formatParameter($parameter)) : $parameter);
216216
}
217217

218218
private function formatRouterConfig(array $array)

Routing/Router.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ private function resolveParameters(RouteCollection $collection)
9090
}
9191

9292
foreach ($route->getRequirements() as $name => $value) {
93-
$route->setRequirement($name, $this->resolve($value));
93+
$route->setRequirement($name, $this->resolve($value));
9494
}
9595

9696
$route->setPath($this->resolve($route->getPath()));
@@ -138,7 +138,7 @@ private function resolve($value)
138138
}
139139

140140
throw new RuntimeException(sprintf(
141-
'The container parameter "%s", used in the route configuration value "%s", ' .
141+
'The container parameter "%s", used in the route configuration value "%s", '.
142142
'must be a string or numeric, but it is of type %s.',
143143
$match[1],
144144
$value,

Tests/CacheWarmer/TemplateFinderTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,4 @@ function ($template) { return $template->getLogicalName(); },
5353
$this->assertContains('::this.is.a.template.format.engine', $templates);
5454
$this->assertContains('::resource.format.engine', $templates);
5555
}
56-
5756
}

Tests/Console/Descriptor/AbstractDescriptorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ private function getContainerBuilderDescriptionTestData(array $objects)
135135
'services' => array('show_private' => true),
136136
'public' => array('show_private' => false),
137137
'tag1' => array('show_private' => true, 'tag' => 'tag1'),
138-
'tags' => array('group_by' => 'tags', 'show_private' => true)
138+
'tags' => array('group_by' => 'tags', 'show_private' => true),
139139
);
140140

141141
$data = array();

Tests/Console/Descriptor/ObjectsProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static function getContainerParameter()
7272
$builder->setParameter('database_name', 'symfony');
7373

7474
return array(
75-
'parameter' => $builder
75+
'parameter' => $builder,
7676
);
7777
}
7878

Tests/Controller/RedirectControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function testRoute($permanent, $ignoreAttributes, $expectedCode, $expecte
6060
'route' => $route,
6161
'permanent' => $permanent,
6262
'additional-parameter' => 'value',
63-
'ignoreAttributes' => $ignoreAttributes
63+
'ignoreAttributes' => $ignoreAttributes,
6464
),
6565
);
6666

Tests/DependencyInjection/Compiler/AddCacheWarmerPassTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function testThatCacheWarmersAreProcessedInPriorityOrder()
2323
$services = array(
2424
'my_cache_warmer_service1' => array(0 => array('priority' => 100)),
2525
'my_cache_warmer_service2' => array(0 => array('priority' => 200)),
26-
'my_cache_warmer_service3' => array()
26+
'my_cache_warmer_service3' => array(),
2727
);
2828

2929
$definition = $this->getMock('Symfony\Component\DependencyInjection\Definition');
@@ -46,7 +46,7 @@ public function testThatCacheWarmersAreProcessedInPriorityOrder()
4646
->with(0, array(
4747
new Reference('my_cache_warmer_service2'),
4848
new Reference('my_cache_warmer_service1'),
49-
new Reference('my_cache_warmer_service3')
49+
new Reference('my_cache_warmer_service3'),
5050
));
5151

5252
$addCacheWarmerPass = new AddCacheWarmerPass();

Tests/DependencyInjection/Compiler/AddConsoleCommandPassTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,4 @@ public function testProcessThrowAnExceptionIfTheServiceIsNotASubclassOfCommand()
9191

9292
class MyCommand extends Command
9393
{
94-
9594
}

Tests/DependencyInjection/Compiler/SerializerPassTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
*/
2323
class SerializerPassTest extends \PHPUnit_Framework_TestCase
2424
{
25-
2625
public function testThrowExceptionWhenNoNormalizers()
2726
{
2827
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder');
@@ -72,16 +71,16 @@ public function testThrowExceptionWhenNoEncoders()
7271

7372
public function testServicesAreOrderedAccordingToPriority()
7473
{
75-
$services = array(
74+
$services = array(
7675
'n3' => array('tag' => array()),
7776
'n1' => array('tag' => array('priority' => 200)),
78-
'n2' => array('tag' => array('priority' => 100))
77+
'n2' => array('tag' => array('priority' => 100)),
7978
);
8079

81-
$expected = array(
80+
$expected = array(
8281
new Reference('n1'),
8382
new Reference('n2'),
84-
new Reference('n3')
83+
new Reference('n3'),
8584
);
8685

8786
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder');

Tests/DependencyInjection/Compiler/TranslatorPassTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ public function testValidCollector()
4040
$container->expects($this->once())
4141
->method('findDefinition')
4242
->will($this->returnValue($this->getMock('Symfony\Component\DependencyInjection\Definition')));
43-
;
44-
4543
$pass = new TranslatorPass();
4644
$pass->process($container);
4745
}

Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function testValidTrustedProxies($trustedProxies, $processedProxies)
3636
$configuration = new Configuration();
3737
$config = $processor->processConfiguration($configuration, array(array(
3838
'secret' => 's3cr3t',
39-
'trusted_proxies' => $trustedProxies
39+
'trusted_proxies' => $trustedProxies,
4040
)));
4141

4242
$this->assertEquals($processedProxies, $config['trusted_proxies']);
@@ -66,8 +66,8 @@ public function testInvalidTypeTrustedProxies()
6666
$processor->processConfiguration($configuration, array(
6767
array(
6868
'secret' => 's3cr3t',
69-
'trusted_proxies' => 'Not an IP address'
70-
)
69+
'trusted_proxies' => 'Not an IP address',
70+
),
7171
));
7272
}
7373

@@ -81,8 +81,8 @@ public function testInvalidValueTrustedProxies()
8181
$processor->processConfiguration($configuration, array(
8282
array(
8383
'secret' => 's3cr3t',
84-
'trusted_proxies' => array('Not an IP address')
85-
)
84+
'trusted_proxies' => array('Not an IP address'),
85+
),
8686
));
8787
}
8888

@@ -137,8 +137,8 @@ protected static function getBundleDefaultConfig()
137137
'debug' => '%kernel.debug%',
138138
),
139139
'serializer' => array(
140-
'enabled' => false
141-
)
140+
'enabled' => false,
141+
),
142142
);
143143
}
144144
}

Tests/DependencyInjection/Fixtures/TestBundle/TestBundle.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313

1414
class TestBundle extends \Symfony\Component\HttpKernel\Bundle\Bundle
1515
{
16-
1716
}

Tests/DependencyInjection/Fixtures/php/form_csrf_sets_field_name.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
$container->loadFromExtension('framework', array(
44
'csrf_protection' => array(
55
'enabled' => true,
6-
'field_name' => '_custom'
6+
'field_name' => '_custom',
77
),
88
'form' => array(
99
'enabled' => true,

Tests/DependencyInjection/Fixtures/php/form_csrf_under_form_sets_field_name.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
$container->loadFromExtension('framework', array(
44
'csrf_protection' => array(
55
'enabled' => true,
6-
'field_name' => '_custom'
6+
'field_name' => '_custom',
77
),
88
'form' => array(
99
'enabled' => true,
1010
'csrf_protection' => array(
11-
'field_name' => '_custom_form'
11+
'field_name' => '_custom_form',
1212
),
1313
),
1414
'session' => array(

Tests/DependencyInjection/Fixtures/php/full.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
),
5555
),
5656
'form' => array(
57-
'resources' => array('theme1', 'theme2')
57+
'resources' => array('theme1', 'theme2'),
5858
),
5959
'hinclude_default_template' => 'global_hinclude_template',
6060
),
@@ -78,7 +78,7 @@
7878
'text/csv',
7979
'text/plain',
8080
),
81-
'pdf' => 'application/pdf'
82-
)
83-
)
81+
'pdf' => 'application/pdf',
82+
),
83+
),
8484
));

Tests/Functional/Bundle/TestBundle/Controller/SessionController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
class SessionController extends ContainerAware
2020
{
21-
public function welcomeAction(Request $request, $name=null)
21+
public function welcomeAction(Request $request, $name = null)
2222
{
2323
$session = $request->getSession();
2424

Tests/Routing/RouterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function testGenerateWithServiceParam()
2424
$routes->add('foo', new Route(
2525
' /{_locale}',
2626
array(
27-
'_locale' => '%locale%'
27+
'_locale' => '%locale%',
2828
),
2929
array(
3030
'_locale' => 'en|es',

Tests/Templating/DelegatingEngineTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function testSupportsRetrievesEngineFromTheContainer()
1919
{
2020
$container = $this->getContainerMock(array(
2121
'engine.first' => $this->getEngineMock('template.php', false),
22-
'engine.second' => $this->getEngineMock('template.php', true)
22+
'engine.second' => $this->getEngineMock('template.php', true),
2323
));
2424

2525
$delegatingEngine = new DelegatingEngine($container, array('engine.first', 'engine.second'));
@@ -33,7 +33,7 @@ public function testGetExistingEngine()
3333
$secondEngine = $this->getEngineMock('template.php', true);
3434
$container = $this->getContainerMock(array(
3535
'engine.first' => $firstEngine,
36-
'engine.second' => $secondEngine
36+
'engine.second' => $secondEngine,
3737
));
3838

3939
$delegatingEngine = new DelegatingEngine($container, array('engine.first', 'engine.second'));
@@ -51,7 +51,7 @@ public function testGetInvalidEngine()
5151
$secondEngine = $this->getEngineMock('template.php', false);
5252
$container = $this->getContainerMock(array(
5353
'engine.first' => $firstEngine,
54-
'engine.second' => $secondEngine
54+
'engine.second' => $secondEngine,
5555
));
5656

5757
$delegatingEngine = new DelegatingEngine($container, array('engine.first', 'engine.second'));

Tests/Templating/Helper/FormHelperDivLayoutTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ protected function setTheme(FormView $view, array $themes)
112112
public static function themeBlockInheritanceProvider()
113113
{
114114
return array(
115-
array(array('TestBundle:Parent'))
115+
array(array('TestBundle:Parent')),
116116
);
117117
}
118118

119119
public static function themeInheritanceProvider()
120120
{
121121
return array(
122-
array(array('TestBundle:Parent'), array('TestBundle:Child'))
122+
array(array('TestBundle:Parent'), array('TestBundle:Child')),
123123
);
124124
}
125125
}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
<?php if (!$label) { $label = $view['form']->humanize($name); } ?>
1+
<?php if (!$label) {
2+
$label = $view['form']->humanize($name);
3+
} ?>
24
<label>Custom label: <?php echo $view->escape($view['translator']->trans($label, array(), $translation_domain)) ?></label>

Tests/Translation/TranslatorTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ public function testGetLocaleWithInvalidLocale()
175175
$this->assertSame('en-US', $translator->getLocale());
176176
}
177177

178-
179178
protected function getCatalogue($locale, $messages)
180179
{
181180
$catalogue = new MessageCatalogue($locale);

Translation/PhpStringTokenParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public static function parse($str)
9696
public static function parseEscapeSequences($str, $quote)
9797
{
9898
if (null !== $quote) {
99-
$str = str_replace('\\' . $quote, $quote, $str);
99+
$str = str_replace('\\'.$quote, $quote, $str);
100100
}
101101

102102
return preg_replace_callback(

0 commit comments

Comments
 (0)