Skip to content

Commit 1bbe314

Browse files
committed
Merge branch '2.3'
* 2.3: (25 commits) bumped Symfony version to 2.2.11 updated VERSION for 2.2.10 update CONTRIBUTORS for 2.2.10 updated CHANGELOG for 2.2.10 fixed version Request::overrideGlobals() may call invalid ini value Force Luhn Validator to only work with strings Fixed bug with lazy services [Translation] fixed the error in the dumper test as described in #9475 deleted mixing string concatenation inside a sprintf "__call()" should be displayed only if $this->magicCall is true [Console] fix phpdoc and constructor default value Add media-query for printing: Do not print the toolbar. Fix ProgressHelper redraw when redrawFreq is greater than 1 Update toolbar.css.twig slovenian translations fixed slovenian translations fixed [DependencyInjection] fixed YamlDumper did not make services private. [FrameworkBundle] fix routing container parameter exception message [Form] fix and unify phpdoc ... Conflicts: src/Symfony/Component/Console/Helper/ProgressHelper.php src/Symfony/Component/DependencyInjection/ContainerBuilder.php src/Symfony/Component/HttpKernel/Kernel.php
2 parents 7e0a8af + 438b32c commit 1bbe314

15 files changed

+37
-34
lines changed

Button.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
class Button implements \IteratorAggregate, FormInterface
2323
{
2424
/**
25-
* @var FormInterface
25+
* @var FormInterface|null
2626
*/
2727
private $parent;
2828

Extension/Validator/ValidatorTypeGuesser.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function guessPattern($class, $property)
8282
*
8383
* @param Constraint $constraint The constraint to guess for
8484
*
85-
* @return TypeGuess The guessed field class and options
85+
* @return TypeGuess|null The guessed field class and options
8686
*/
8787
public function guessTypeForConstraint(Constraint $constraint)
8888
{
@@ -172,7 +172,7 @@ public function guessTypeForConstraint(Constraint $constraint)
172172
*
173173
* @param Constraint $constraint The constraint to guess for
174174
*
175-
* @return Guess The guess whether the field is required
175+
* @return ValueGuess|null The guess whether the field is required
176176
*/
177177
public function guessRequiredForConstraint(Constraint $constraint)
178178
{
@@ -191,7 +191,7 @@ public function guessRequiredForConstraint(Constraint $constraint)
191191
*
192192
* @param Constraint $constraint The constraint to guess for
193193
*
194-
* @return Guess The guess for the maximum length
194+
* @return ValueGuess|null The guess for the maximum length
195195
*/
196196
public function guessMaxLengthForConstraint(Constraint $constraint)
197197
{
@@ -229,7 +229,7 @@ public function guessMaxLengthForConstraint(Constraint $constraint)
229229
*
230230
* @param Constraint $constraint The constraint to guess for
231231
*
232-
* @return Guess The guess for the pattern
232+
* @return ValueGuess|null The guess for the pattern
233233
*/
234234
public function guessPatternForConstraint(Constraint $constraint)
235235
{
@@ -281,7 +281,7 @@ public function guessPatternForConstraint(Constraint $constraint)
281281
* @param mixed $defaultValue The default value assumed if no other value
282282
* can be guessed.
283283
*
284-
* @return Guess The guessed value with the highest confidence
284+
* @return Guess|null The guessed value with the highest confidence
285285
*/
286286
protected function guess($class, $property, \Closure $closure, $defaultValue = null)
287287
{

Form.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ public function __construct(FormConfigInterface $config)
170170

171171
public function __clone()
172172
{
173+
$this->children = clone $this->children;
174+
173175
foreach ($this->children as $key => $child) {
174176
$this->children[$key] = clone $child;
175177
}

FormFactoryBuilderInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function addExtension(FormExtensionInterface $extension);
3939
/**
4040
* Adds a list of extensions to be loaded by the factory.
4141
*
42-
* @param array $extensions The extensions.
42+
* @param FormExtensionInterface[] $extensions The extensions.
4343
*
4444
* @return FormFactoryBuilderInterface The builder.
4545
*/
@@ -57,7 +57,7 @@ public function addType(FormTypeInterface $type);
5757
/**
5858
* Adds a list of form types to the factory.
5959
*
60-
* @param array $types The form types.
60+
* @param FormTypeInterface[] $types The form types.
6161
*
6262
* @return FormFactoryBuilderInterface The builder.
6363
*/
@@ -75,7 +75,7 @@ public function addTypeExtension(FormTypeExtensionInterface $typeExtension);
7575
/**
7676
* Adds a list of form type extensions to the factory.
7777
*
78-
* @param array $typeExtensions The form type extensions.
78+
* @param FormTypeExtensionInterface[] $typeExtensions The form type extensions.
7979
*
8080
* @return FormFactoryBuilderInterface The builder.
8181
*/
@@ -93,7 +93,7 @@ public function addTypeGuesser(FormTypeGuesserInterface $typeGuesser);
9393
/**
9494
* Adds a list of type guessers to the factory.
9595
*
96-
* @param array $typeGuessers The type guessers.
96+
* @param FormTypeGuesserInterface[] $typeGuessers The type guessers.
9797
*
9898
* @return FormFactoryBuilderInterface The builder.
9999
*/

FormRegistryInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function getTypeGuesser();
5151
/**
5252
* Returns the extensions loaded by the framework.
5353
*
54-
* @return array
54+
* @return FormExtensionInterface[]
5555
*/
5656
public function getExtensions();
5757
}

FormTypeGuesserChain.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class FormTypeGuesserChain implements FormTypeGuesserInterface
2121
/**
2222
* Constructor.
2323
*
24-
* @param array $guessers Guessers as instances of FormTypeGuesserInterface
24+
* @param FormTypeGuesserInterface[] $guessers Guessers as instances of FormTypeGuesserInterface
2525
*
2626
* @throws UnexpectedTypeException if any guesser does not implement FormTypeGuesserInterface
2727
*/
@@ -87,7 +87,7 @@ public function guessPattern($class, $property)
8787
* @param \Closure $closure The closure to execute. Accepts a guesser
8888
* as argument and should return a Guess instance
8989
*
90-
* @return Guess The guess with the highest confidence
90+
* @return Guess|null The guess with the highest confidence
9191
*/
9292
private function guess(\Closure $closure)
9393
{

FormTypeGuesserInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ interface FormTypeGuesserInterface
2222
* @param string $class The fully qualified class name
2323
* @param string $property The name of the property to guess for
2424
*
25-
* @return Guess\TypeGuess A guess for the field's type and options
25+
* @return Guess\TypeGuess|null A guess for the field's type and options
2626
*/
2727
public function guessType($class, $property);
2828

@@ -32,7 +32,7 @@ public function guessType($class, $property);
3232
* @param string $class The fully qualified class name
3333
* @param string $property The name of the property to guess for
3434
*
35-
* @return Guess\Guess A guess for the field's required setting
35+
* @return Guess\ValueGuess A guess for the field's required setting
3636
*/
3737
public function guessRequired($class, $property);
3838

@@ -42,7 +42,7 @@ public function guessRequired($class, $property);
4242
* @param string $class The fully qualified class name
4343
* @param string $property The name of the property to guess for
4444
*
45-
* @return Guess\Guess A guess for the field's maximum length
45+
* @return Guess\ValueGuess|null A guess for the field's maximum length
4646
*/
4747
public function guessMaxLength($class, $property);
4848

@@ -58,7 +58,7 @@ public function guessMaxLength($class, $property);
5858
* @param string $class The fully qualified class name
5959
* @param string $property The name of the property to guess for
6060
*
61-
* @return Guess\Guess A guess for the field's required pattern
61+
* @return Guess\ValueGuess|null A guess for the field's required pattern
6262
*/
6363
public function guessPattern($class, $property);
6464
}

Guess/Guess.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ abstract class Guess
5959
private $confidence;
6060

6161
/**
62-
* Returns the guess most likely to be correct from a list of guesses
62+
* Returns the guess most likely to be correct from a list of guesses.
6363
*
6464
* If there are multiple guesses with the same, highest confidence, the
6565
* returned guess is any of them.
6666
*
67-
* @param array $guesses A list of guesses
67+
* @param Guess[] $guesses An array of guesses
6868
*
69-
* @return Guess The guess with the highest confidence
69+
* @return Guess|null The guess with the highest confidence
7070
*/
7171
public static function getBestGuess(array $guesses)
7272
{
@@ -84,7 +84,7 @@ public static function getBestGuess(array $guesses)
8484
}
8585

8686
/**
87-
* Constructor
87+
* Constructor.
8888
*
8989
* @param integer $confidence The confidence
9090
*
@@ -101,7 +101,7 @@ public function __construct($confidence)
101101
}
102102

103103
/**
104-
* Returns the confidence that the guessed value is correct
104+
* Returns the confidence that the guessed value is correct.
105105
*
106106
* @return integer One of the constants VERY_HIGH_CONFIDENCE,
107107
* HIGH_CONFIDENCE, MEDIUM_CONFIDENCE and LOW_CONFIDENCE

PreloadedExtension.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class PreloadedExtension implements FormExtensionInterface
3838
/**
3939
* Creates a new preloaded extension.
4040
*
41-
* @param array $types The types that the extension should support.
42-
* @param array $typeExtensions The type extensions that the extension should support.
43-
* @param FormTypeGuesserInterface|null $typeGuesser The guesser that the extension should support.
41+
* @param FormTypeInterface[] $types The types that the extension should support.
42+
* @param array[FormTypeExtensionInterface[]] typeExtensions The type extensions that the extension should support.
43+
* @param FormTypeGuesserInterface|null $typeGuesser The guesser that the extension should support.
4444
*/
4545
public function __construct(array $types, array $typeExtensions, FormTypeGuesserInterface $typeGuesser = null)
4646
{

ResolvedFormType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ class ResolvedFormType implements ResolvedFormTypeInterface
2929
private $innerType;
3030

3131
/**
32-
* @var array
32+
* @var FormTypeExtensionInterface[]
3333
*/
3434
private $typeExtensions;
3535

3636
/**
37-
* @var ResolvedFormTypeInterface
37+
* @var ResolvedFormTypeInterface|null
3838
*/
3939
private $parent;
4040

ResolvedFormTypeFactoryInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ interface ResolvedFormTypeFactoryInterface
2525
/**
2626
* Resolves a form type.
2727
*
28-
* @param FormTypeInterface $type
29-
* @param array $typeExtensions
30-
* @param ResolvedFormTypeInterface $parent
28+
* @param FormTypeInterface $type
29+
* @param FormTypeExtensionInterface[] $typeExtensions
30+
* @param ResolvedFormTypeInterface|null $parent
3131
*
3232
* @return ResolvedFormTypeInterface
3333
*

ResolvedFormTypeInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function getName();
2828
/**
2929
* Returns the parent type.
3030
*
31-
* @return ResolvedFormTypeInterface The parent type or null.
31+
* @return ResolvedFormTypeInterface|null The parent type or null.
3232
*/
3333
public function getParent();
3434

Resources/translations/validators.sl.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
<body>
55
<trans-unit id="28">
66
<source>This form should not contain extra fields.</source>
7-
<target>To področje ne sme vsebovati dodatnih polj.</target>
7+
<target>Ta obrazec ne sme vsebovati dodatnih polj.</target>
88
</trans-unit>
99
<trans-unit id="29">
1010
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11-
<target>Naložena datoteka je prevelika. Prosim, poizkusite naložiti manjšo.</target>
11+
<target>Naložena datoteka je prevelika. Prosimo, poizkusite naložiti manjšo.</target>
1212
</trans-unit>
1313
<trans-unit id="30">
1414
<source>The CSRF token is invalid. Please try to resubmit the form.</source>

SubmitButtonBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class SubmitButtonBuilder extends ButtonBuilder
2121
/**
2222
* Creates the button.
2323
*
24-
* @return Button The button
24+
* @return SubmitButton The button
2525
*/
2626
public function getForm()
2727
{

Tests/CompoundFormTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ public function testCloneChildren()
155155

156156
$this->assertNotSame($this->form, $clone);
157157
$this->assertNotSame($child, $clone['child']);
158+
$this->assertNotSame($this->form['child'], $clone['child']);
158159
}
159160

160161
public function testNotEmptyIfChildNotEmpty()

0 commit comments

Comments
 (0)