Skip to content

Commit 2d67010

Browse files
committed
Merge branch '3.3' into 3.4
* 3.3: (27 commits) Always require symfony/polyfill-apcu to provide APCuIterator everywhere bumped Symfony version to 3.3.9 updated VERSION for 3.3.8 updated CHANGELOG for 3.3.8 [DI] Fix tracking env var placeholders nested in object graphs bumped Symfony version to 3.3.8 updated VERSION for 3.3.7 updated CHANGELOG for 3.3.7 [DI] Fix tracking env vars when merging configs (bis) removed obsolete comment install PHPUnit 6 on PHP 7.2 [Cache] Use zend.detect_unicode instead of zend.multibyte Fix case sensitive typo in use class name [VarDumper] Enhance docblock to tell about AbstractDumper::dumpLine(-1) [Debug] Remove false-positive check in DebugClassLoader [Validator] Fix use of GroupSequenceProvider in child classes Change number PHPDoc type to int|float [Cache] Workaround zend.detect_unicode + zend.multibyte [VarDumper] Strengthen dumped JS [VarDumper] Strengthen dumped JS ...
2 parents cafabc2 + 3ad28ae commit 2d67010

File tree

5 files changed

+38
-14
lines changed

5 files changed

+38
-14
lines changed

Constraints/File.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
* @Annotation
1919
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
2020
*
21+
* @property int $maxSize
22+
*
2123
* @author Bernhard Schussek <[email protected]>
2224
*/
2325
class File extends Constraint

Mapping/ClassMetadata.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,10 @@ public function addGetterMethodConstraints($property, $method, array $constraint
339339
*/
340340
public function mergeConstraints(ClassMetadata $source)
341341
{
342+
if ($source->isGroupSequenceProvider()) {
343+
$this->setGroupSequenceProvider(true);
344+
}
345+
342346
foreach ($source->getConstraints() as $constraint) {
343347
$this->addConstraint(clone $constraint);
344348
}

Resources/translations/validators.el.xlf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
</trans-unit>
101101
<trans-unit id="25">
102102
<source>This value is not valid.</source>
103-
<target>Αυτή η τιμή δεν είναι έκγυρη.</target>
103+
<target>Αυτή η τιμή δεν είναι έγκυρη.</target>
104104
</trans-unit>
105105
<trans-unit id="26">
106106
<source>This value is not a valid time.</source>
@@ -136,19 +136,19 @@
136136
</trans-unit>
137137
<trans-unit id="37">
138138
<source>This is not a valid IP address.</source>
139-
<target>Αυτό δεν είναι μια έκγυρη διεύθυνση IP.</target>
139+
<target>Αυτό δεν είναι μια έγκυρη διεύθυνση IP.</target>
140140
</trans-unit>
141141
<trans-unit id="38">
142142
<source>This value is not a valid language.</source>
143-
<target>Αυτή η τιμή δεν αντιστοιχεί σε μια έκγυρη γλώσσα.</target>
143+
<target>Αυτή η τιμή δεν αντιστοιχεί σε μια έγκυρη γλώσσα.</target>
144144
</trans-unit>
145145
<trans-unit id="39">
146146
<source>This value is not a valid locale.</source>
147147
<target>Αυτή η τιμή δεν αντιστοιχεί σε έκγυρο κωδικό τοποθεσίας.</target>
148148
</trans-unit>
149149
<trans-unit id="40">
150150
<source>This value is not a valid country.</source>
151-
<target>Αυτή η τιμή δεν αντιστοιχεί σε μια έκγυρη χώρα.</target>
151+
<target>Αυτή η τιμή δεν αντιστοιχεί σε μια έγκυρη χώρα.</target>
152152
</trans-unit>
153153
<trans-unit id="41">
154154
<source>This value is already used.</source>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\Validator\Tests\Fixtures;
13+
14+
class GroupSequenceProviderChildEntity extends GroupSequenceProviderEntity
15+
{
16+
}

Tests/Mapping/ClassMetadataTest.php

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class ClassMetadataTest extends TestCase
2424
const CLASSNAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity';
2525
const PARENTCLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityParent';
2626
const PROVIDERCLASS = 'Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity';
27+
const PROVIDERCHILDCLASS = 'Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderChildEntity';
2728

2829
protected $metadata;
2930

@@ -301,6 +302,17 @@ public function testGroupSequenceProvider()
301302
$this->assertTrue($metadata->isGroupSequenceProvider());
302303
}
303304

305+
public function testMergeConstraintsMergesGroupSequenceProvider()
306+
{
307+
$parent = new ClassMetadata(self::PROVIDERCLASS);
308+
$parent->setGroupSequenceProvider(true);
309+
310+
$metadata = new ClassMetadata(self::PROVIDERCHILDCLASS);
311+
$metadata->mergeConstraints($parent);
312+
313+
$this->assertTrue($metadata->isGroupSequenceProvider());
314+
}
315+
304316
/**
305317
* https://github.com/symfony/symfony/issues/11604.
306318
*/
@@ -309,13 +321,3 @@ public function testGetPropertyMetadataReturnsEmptyArrayWithoutConfiguredMetadat
309321
$this->assertCount(0, $this->metadata->getPropertyMetadata('foo'), '->getPropertyMetadata() returns an empty collection if no metadata is configured for the given property');
310322
}
311323
}
312-
313-
class ParentClass
314-
{
315-
public $example = 0;
316-
}
317-
318-
class ChildClass extends ParentClass
319-
{
320-
public $example = 1; // overrides parent property of same name
321-
}

0 commit comments

Comments
 (0)