Removed eval() from KernelShutdownOnTearDownTrait

This commit is contained in:
Pascal Luna 2019-02-24 02:12:10 +00:00
parent 5b23a2b257
commit 324b70afa3

View File

@ -16,9 +16,6 @@ use PHPUnit\Framework\TestCase;
// Auto-adapt to PHPUnit 8 that added a `void` return-type to the tearDown method // 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()) { if (method_exists(\ReflectionMethod::class, 'hasReturnType') && (new \ReflectionMethod(TestCase::class, 'tearDown'))->hasReturnType()) {
eval('
namespace Symfony\Bundle\FrameworkBundle\Test;
/** /**
* @internal * @internal
*/ */
@ -29,7 +26,6 @@ if (method_exists(\ReflectionMethod::class, 'hasReturnType') && (new \Reflection
static::ensureKernelShutdown(); static::ensureKernelShutdown();
} }
} }
');
} else { } else {
/** /**
* @internal * @internal