Skip to content

Commit d9f6db4

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: (25 commits) Add missing ID_id validators translation fixed CS Added missing translations in validators.tr.xlf Update validators.es.xlf Update validators.hu.xlf [Validator] Add the missing translations for the Welsh (cy) locale [Validator] Add missing DE validator translations [Validator] Add the missing translations for the Dutch (nl) locale Add missing PL translation Add missing translations. Add missing translations for IT to Validator minor #30184 [Validator] Add the missing translations for the Russian (ru) locale (antonch1989) [Validator] Add the missing translations for the Arabic (ar) locale add_missing_translations_for_portuguese : [Validator] Add the missing translations for the Portuguese ("pt") locale [Validator] Add the missing translations for the French (fr) locale [Validator] Add some missing contents to the English translation use PropertyAccessorInterface instead of PropertyAccessor Fix KernelTestCase compatibility for PhpUnit 8 (bis) add xabbuh as code owner of the Form component [Validator] Added a missing translation ...
2 parents c726ac9 + 2b7214f commit d9f6db4

File tree

2 files changed

+48
-3
lines changed

2 files changed

+48
-3
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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\Bundle\FrameworkBundle\Test;
13+
14+
use PHPUnit\Framework\TestCase;
15+
16+
// Auto-adapt to PHPUnit 8 that added a `void` return-type to the tearDown method
17+
18+
if (method_exists(\ReflectionMethod::class, 'hasReturnType') && (new \ReflectionMethod(TestCase::class, 'tearDown'))->hasReturnType()) {
19+
eval('
20+
/**
21+
* @internal
22+
*/
23+
trait KernelShutdownOnTearDownTrait
24+
{
25+
protected function tearDown(): void
26+
{
27+
static::ensureKernelShutdown();
28+
}
29+
}
30+
');
31+
} else {
32+
/**
33+
* @internal
34+
*/
35+
trait KernelShutdownOnTearDownTrait
36+
{
37+
/**
38+
* @return void
39+
*/
40+
protected function tearDown()
41+
{
42+
static::ensureKernelShutdown();
43+
}
44+
}
45+
}

Test/KernelTestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
*/
2424
abstract class KernelTestCase extends TestCase
2525
{
26+
use KernelShutdownOnTearDownTrait;
27+
2628
protected static $class;
2729

2830
/**
@@ -112,9 +114,7 @@ protected static function createKernel(array $options = [])
112114
}
113115

114116
/**
115-
* @after
116-
*
117-
* Shuts the kernel down if it was used in the test.
117+
* Shuts the kernel down if it was used in the test - called by the tearDown method by default.
118118
*/
119119
protected static function ensureKernelShutdown()
120120
{

0 commit comments

Comments
 (0)