Skip to content

Commit d5ff094

Browse files
committed
Merge branch '3.3' into 3.4
* 3.3: [HttpFoundation] Use the correct syntax for session gc based on Pdo driver Removed assertDateTimeEquals() methods. Revert "bug symfony#24987 [Console] Fix global console flag when used in chain (Simperfit)" Revert "bug symfony#25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)" Disable CSP header on exception pages only in debug Fixed submitting disabled buttons Fixed Button::setParent() when already submitted Improve assertions Restore RoleInterface import Improve assertions SCA: get rid of repetitive calls allow null values for root nodes in YAML configs revert useless tests fixtures changes [VarDumper] Fix docblock Improve phpdoc to make it more explicit
2 parents 05e9682 + 57e5075 commit d5ff094

File tree

35 files changed

+147
-103
lines changed

35 files changed

+147
-103
lines changed

src/Symfony/Bundle/FrameworkBundle/Console/Application.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ public function __construct(KernelInterface $kernel)
3939

4040
parent::__construct('Symfony', Kernel::VERSION);
4141

42-
$this->getDefinition()->addOption(new InputOption('--env', '-e', InputOption::VALUE_REQUIRED, 'The environment name', $kernel->getEnvironment()));
43-
$this->getDefinition()->addOption(new InputOption('--no-debug', null, InputOption::VALUE_NONE, 'Switches off debug mode'));
42+
$inputDefinition = $this->getDefinition();
43+
$inputDefinition->addOption(new InputOption('--env', '-e', InputOption::VALUE_REQUIRED, 'The Environment name.', $kernel->getEnvironment()));
44+
$inputDefinition->addOption(new InputOption('--no-debug', null, InputOption::VALUE_NONE, 'Switches off debug mode.'));
4445
}
4546

4647
/**

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,8 +945,9 @@ private function registerTemplatingConfiguration(array $config, ContainerBuilder
945945
if (1 === count($engines)) {
946946
$container->setAlias('templating', (string) reset($engines))->setPublic(true);
947947
} else {
948+
$templateEngineDefinition = $container->getDefinition('templating.engine.delegating');
948949
foreach ($engines as $engine) {
949-
$container->getDefinition('templating.engine.delegating')->addMethodCall('addEngine', array($engine));
950+
$templateEngineDefinition->addMethodCall('addEngine', array($engine));
950951
}
951952
$container->setAlias('templating', 'templating.engine.delegating')->setPublic(true);
952953
}

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/templating_no_assets.php

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

33
$container->loadFromExtension('framework', array(
4-
'assets' => array(
5-
'enabled' => true,
6-
),
74
'templating' => array(
85
'engines' => array('php', 'twig'),
96
),

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/templating_no_assets.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
77

88
<framework:config>
9-
<framework:assets enabled="true" />
109
<framework:templating>
1110
<framework:engine>php</framework:engine>
1211
<framework:engine>twig</framework:engine>
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
framework:
2-
assets:
3-
enabled: true
42
templating:
53
engines: [php, twig]

src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ public function testCsrfAliases()
8686
$processor = new Processor();
8787
$configuration = new MainConfiguration(array(), array());
8888
$processedConfig = $processor->processConfiguration($configuration, array($config));
89-
$this->assertTrue(isset($processedConfig['firewalls']['stub']['logout']['csrf_token_generator']));
89+
$this->assertArrayHasKey('csrf_token_generator', $processedConfig['firewalls']['stub']['logout']);
9090
$this->assertEquals('a_token_generator', $processedConfig['firewalls']['stub']['logout']['csrf_token_generator']);
91-
$this->assertTrue(isset($processedConfig['firewalls']['stub']['logout']['csrf_token_id']));
91+
$this->assertArrayHasKey('csrf_token_id', $processedConfig['firewalls']['stub']['logout']);
9292
$this->assertEquals('a_token_id', $processedConfig['firewalls']['stub']['logout']['csrf_token_id']);
9393
}
9494

src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
<tag name="monolog.logger" channel="request" />
129129
<argument>%twig.exception_listener.controller%</argument>
130130
<argument type="service" id="logger" on-invalid="null" />
131+
<argument>%kernel.debug%</argument>
131132
</service>
132133

133134
<service id="twig.controller.exception" class="Symfony\Bundle\TwigBundle\Controller\ExceptionController" public="true">

src/Symfony/Component/Console/Input/ArgvInput.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -285,16 +285,6 @@ public function hasParameterOption($values, $onlyParams = false)
285285
if ($token === $value || 0 === strpos($token, $value.'=')) {
286286
return true;
287287
}
288-
289-
if (0 === strpos($token, '-') && 0 !== strpos($token, '--')) {
290-
$noValue = explode('=', $token);
291-
$token = $noValue[0];
292-
$searchableToken = str_replace('-', '', $token);
293-
$searchableValue = str_replace('-', '', $value);
294-
if ('' !== $searchableToken && '' !== $searchableValue && false !== strpos($searchableToken, $searchableValue)) {
295-
return true;
296-
}
297-
}
298288
}
299289
}
300290

src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,6 @@ public function testHasParameterOption()
314314
$input = new ArgvInput(array('cli.php', '-f', 'foo'));
315315
$this->assertTrue($input->hasParameterOption('-f'), '->hasParameterOption() returns true if the given short option is in the raw input');
316316

317-
$input = new ArgvInput(array('cli.php', '-fh'));
318-
$this->assertTrue($input->hasParameterOption('-fh'), '->hasParameterOption() returns true if the given short option is in the raw input');
319-
320-
$input = new ArgvInput(array('cli.php', '-e=test'));
321-
$this->assertFalse($input->hasParameterOption('-s'), '->hasParameterOption() returns true if the given short option is in the raw input');
322-
323317
$input = new ArgvInput(array('cli.php', '--foo', 'foo'));
324318
$this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if the given short option is in the raw input');
325319

src/Symfony/Component/DependencyInjection/ContainerBuilder.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,12 +422,16 @@ public function fileExists($path, $trackContents = true)
422422
* @throws BadMethodCallException When this ContainerBuilder is compiled
423423
* @throws \LogicException if the extension is not registered
424424
*/
425-
public function loadFromExtension($extension, array $values = array())
425+
public function loadFromExtension($extension, array $values = null)
426426
{
427427
if ($this->isCompiled()) {
428428
throw new BadMethodCallException('Cannot load from an extension on a compiled container.');
429429
}
430430

431+
if (func_num_args() < 2) {
432+
$values = array();
433+
}
434+
431435
$namespace = $this->getExtension($extension)->getAlias();
432436

433437
$this->extensionConfigs[$namespace][] = $values;

0 commit comments

Comments
 (0)