Skip to content

Commit

Permalink
Merge branch '3.4' into 4.2
Browse files Browse the repository at this point in the history
* 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
  ...
  • Loading branch information
fabpot committed Feb 12, 2019
2 parents c726ac9 + 2b7214f commit d9f6db4
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 3 deletions.
45 changes: 45 additions & 0 deletions Test/KernelShutdownOnTearDownTrait.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Bundle\FrameworkBundle\Test;

use PHPUnit\Framework\TestCase;

// Auto-adapt to PHPUnit 8 that added a `void` return-type to the tearDown method

if (method_exists(\ReflectionMethod::class, 'hasReturnType') && (new \ReflectionMethod(TestCase::class, 'tearDown'))->hasReturnType()) {
eval('
/**
* @internal
*/
trait KernelShutdownOnTearDownTrait
{
protected function tearDown(): void
{
static::ensureKernelShutdown();
}
}
');
} else {
/**
* @internal
*/
trait KernelShutdownOnTearDownTrait
{
/**
* @return void
*/
protected function tearDown()
{
static::ensureKernelShutdown();
}
}
}
6 changes: 3 additions & 3 deletions Test/KernelTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
*/
abstract class KernelTestCase extends TestCase
{
use KernelShutdownOnTearDownTrait;

protected static $class;

/**
Expand Down Expand Up @@ -112,9 +114,7 @@ protected static function createKernel(array $options = [])
}

/**
* @after
*
* Shuts the kernel down if it was used in the test.
* Shuts the kernel down if it was used in the test - called by the tearDown method by default.
*/
protected static function ensureKernelShutdown()
{
Expand Down

0 comments on commit d9f6db4

Please sign in to comment.