8000 Merge branch '3.4' into 4.2 · symfony/symfony@c58d4c2 · GitHub
[go: up one dir, main page]

Skip to content

Commit c58d4c2

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: allow to skip tests based on the supported version Update validators.bg.xlf Update validators.ca.xlf fixed CS Updated validators.eu.xlf with missing translations fixed typo backported a translation [Validator] added missing translation for UK validator Validator: add the Persian translations Update validators.sq.xlf fixed CS forward valid numeric values to transform() add constraint validators before optimizations
2 parents 1614a52 + 37b0eeb commit c58d4c2

23 files changed

+343
-5
lines changed

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class EntityTypePerformanceTest extends FormPerformanceTestCase
3030
*/
3131
private $em;
3232

33+
protected static $supportedFeatureSetVersion = 304;
34+
3335
protected function getExtensions()
3436
{
3537
$manager = $this->getMockBuilder('Doctrine\Common\Persistence\ManagerRegistry')->getMock();

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ class EntityTypeTest extends BaseTypeTest
5757
*/
5858
private $emRegistry;
5959

60+
protected static $supportedFeatureSetVersion = 304;
61+
6062
protected function setUp()
6163
{
6264
$this->em = DoctrineTestHelper::createTestEntityManager();

src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
1818
{
19+
protected static $supportedFeatureSetVersion = 304;
20+
1921
public function testLabelOnForm()
2022
{
2123
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType');

src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTest
3131
*/
3232
private $renderer;
3333

34+
protected static $supportedFeatureSetVersion = 304;
35+
3436
protected function setUp()
3537
{
3638
parent::setUp();

src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class FormExtensionTableLayoutTest extends AbstractTableLayoutTest
3030
*/
3131
private $renderer;
3232

33+
protected static $supportedFeatureSetVersion = 304;
34+
3335
protected function setUp()
3436
{
3537
parent::setUp();

src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function build(ContainerBuilder $container)
9595
// but as late as possible to get resolved parameters
9696
$container->addCompilerPass((new RegisterListenersPass())->setHotPathEvents($hotPathEvents), PassConfig::TYPE_BEFORE_REMOVING);
9797
$container->addCompilerPass(new TemplatingPass());
98-
$this->addCompilerPassIfExists($container, AddConstraintValidatorsPass::class, PassConfig::TYPE_BEFORE_REMOVING);
98+
$this->addCompilerPassIfExists($container, AddConstraintValidatorsPass::class);
9999
$container->addCompilerPass(new AddAnnotationsCachedReaderPass(), PassConfig::TYPE_AFTER_REMOVING, -255);
100100
$this->addCompilerPassIfExists($container, AddValidatorInitializersPass::class);
101101
$this->addCompilerPassIfExists($container, AddConsoleCommandPass::class, PassConfig::TYPE_BEFORE_REMOVING);

src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ class FormHelperDivLayoutTest extends AbstractDivLayoutTest
2727
*/
2828
protected $engine;
2929

30+
protected static $supportedFeatureSetVersion = 304;
31+
3032
protected function getExtensions()
3133
{
3234
// should be moved to the Form component once absolute file paths are supported

src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ class FormHelperTableLayoutTest extends AbstractTableLayoutTest
2727
*/
2828
protected $engine;
2929

30+
protected static $supportedFeatureSetVersion = 304;
31+
3032
public function testStartTagHasNoActionAttributeWhenActionIsEmpty()
3133
{
3234
$form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, [

src/Symfony/Component/Form/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function transform($value)
5858
if (!is_numeric($value)) {
5959
throw new TransformationFailedException('Expected a numeric.');
6060
}
61-
$value = (string) ($value / $this->divisor);
61+
$value /= $this->divisor;
6262
}
6363

6464
return parent::transform($value);

src/Symfony/Component/Form/Test/FormPerformanceTestCase.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Component\Form\Test;
1313

14+
use Symfony\Component\Form\Tests\VersionAwareTest;
15+
1416
/**
1517
* Base class for performance tests.
1618
*
@@ -21,6 +23,8 @@
2123
*/
2224
abstract class FormPerformanceTestCase extends FormIntegrationTestCase
2325
{
26+
use VersionAwareTest;
27+
2428
/**
2529
* @var int
2630
*/

0 commit comments

Comments
 (0)
0