Skip to content

Commit dfeede2

Browse files
Merge branch '3.4' into 4.0
* 3.4: (37 commits) Remove some unused variables and properties [appveyor] disable memory limit on composer up [HttpFoundation] don't prefix cookies with "Set-Cookie:" Remove some unused variables and properties Fix debug:form definition Remove some unused variables, properties and methods fix some edge cases with indented blocks [ExpressionLanguage] Fix parse error on 5.3 [HttpKernel] remove noisy frame in controller stack traces [DI] Force root-namespace for function calls in the dumper container [DI] Fix circular-aliases message register system cache clearer only if it's used doc : Namespace prefix must end with a "\" [ExpressionLanguage] throw an SyntaxError instead of letting a undefined index notice Prevent a loop in aliases within the `findDefinition` method [HttpKernel] Disable inlining on PHP 5 Ensure that inlined services with parameterized class name can be dumped [DI] Fix non-string class handling in PhpDumper Throw a sensible exception when controller has been removed Remove LOCK_EX That Breaks Cache Usage on NFS ...
2 parents 57649c1 + 2653d84 commit dfeede2

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

DependencyInjection/FormPass.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1919
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
2020
use Symfony\Component\DependencyInjection\Reference;
21-
use Symfony\Component\Form\Command\DebugCommand;
2221

2322
/**
2423
* Adds all services with the tags "form.type", "form.type_extension" and
@@ -36,7 +35,7 @@ class FormPass implements CompilerPassInterface
3635
private $formTypeGuesserTag;
3736
private $formDebugCommandService;
3837

39-
public function __construct(string $formExtensionService = 'form.extension', string $formTypeTag = 'form.type', string $formTypeExtensionTag = 'form.type_extension', string $formTypeGuesserTag = 'form.type_guesser', string $formDebugCommandService = DebugCommand::class)
38+
public function __construct(string $formExtensionService = 'form.extension', string $formTypeTag = 'form.type', string $formTypeExtensionTag = 'form.type_extension', string $formTypeGuesserTag = 'form.type_guesser', string $formDebugCommandService = 'console.command.form_debug')
4039
{
4140
$this->formExtensionService = $formExtensionService;
4241
$this->formTypeTag = $formTypeTag;

Extension/Core/DataTransformer/DateIntervalToStringTransformer.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,17 @@
2323
class DateIntervalToStringTransformer implements DataTransformerInterface
2424
{
2525
private $format;
26-
private $parseSigned;
2726

2827
/**
2928
* Transforms a \DateInterval instance to a string.
3029
*
3130
* @see \DateInterval::format() for supported formats
3231
*
33-
* @param string $format The date format
34-
* @param bool $parseSigned Whether to parse as a signed interval
32+
* @param string $format The date format
3533
*/
36-
public function __construct(string $format = 'P%yY%mM%dDT%hH%iM%sS', bool $parseSigned = false)
34+
public function __construct(string $format = 'P%yY%mM%dDT%hH%iM%sS')
3735
{
3836
$this->format = $format;
39-
$this->parseSigned = $parseSigned;
4037
}
4138

4239
/**

Tests/DependencyInjection/FormPassTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
1616
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
17-
use Symfony\Component\Form\Command\DebugCommand;
1817
use Symfony\Component\Form\DependencyInjection\FormPass;
1918
use Symfony\Component\DependencyInjection\ContainerBuilder;
2019
use Symfony\Component\DependencyInjection\Definition;
@@ -43,7 +42,7 @@ public function testDoNothingIfDebugCommandNotLoaded()
4342

4443
$container->compile();
4544

46-
$this->assertFalse($container->hasDefinition(DebugCommand::class));
45+
$this->assertFalse($container->hasDefinition('console.command.form_debug'));
4746
}
4847

4948
public function testAddTaggedTypes()
@@ -72,13 +71,13 @@ public function testAddTaggedTypesToDebugCommand()
7271
$container = $this->createContainerBuilder();
7372

7473
$container->setDefinition('form.extension', $this->createExtensionDefinition());
75-
$container->setDefinition(DebugCommand::class, $this->createDebugCommandDefinition());
74+
$container->setDefinition('console.command.form_debug', $this->createDebugCommandDefinition());
7675
$container->register('my.type1', __CLASS__.'_Type1')->addTag('form.type')->setPublic(true);
7776
$container->register('my.type2', __CLASS__.'_Type2')->addTag('form.type')->setPublic(true);
7877

7978
$container->compile();
8079

81-
$cmdDefinition = $container->getDefinition(DebugCommand::class);
80+
$cmdDefinition = $container->getDefinition('console.command.form_debug');
8281

8382
$this->assertEquals(
8483
array(

0 commit comments

Comments
 (0)