Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e73f70a

Browse filesBrowse files
minor #30364 [FrameworkBundle] Removed eval() from KernelShutdownOnTearDownTrait (skalpa)
This PR was merged into the 4.2 branch. Discussion ---------- [FrameworkBundle] Removed eval() from KernelShutdownOnTearDownTrait | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT Apart from triggering the #30362 bug, the `eval()` block from #30124 also broke my workflow: static code analyzers don't like this, and the trait even crashes PHPStan. It may also bring up other compatibility issues to other people (ie: I know companies that completely disable `eval()` on their servers). As it was only required to keep the trait compatible with PHP 5.x, it is unnecessary on 4.x that requires PHP 7.1+, and this PR removes it on the 4.2 branch. Commits ------- 324b70a Removed eval() from KernelShutdownOnTearDownTrait
2 parents 5b23a2b + 324b70a commit e73f70a
Copy full SHA for e73f70a

File tree

1 file changed

+0
-4
lines changed
Filter options

1 file changed

+0
-4
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Test/KernelShutdownOnTearDownTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Test/KernelShutdownOnTearDownTrait.php
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
// Auto-adapt to PHPUnit 8 that added a `void` return-type to the tearDown method
1717

1818
if (method_exists(\ReflectionMethod::class, 'hasReturnType') && (new \ReflectionMethod(TestCase::class, 'tearDown'))->hasReturnType()) {
19-
eval('
20-
namespace Symfony\Bundle\FrameworkBundle\Test;
21-
2219
/**
2320
* @internal
2421
*/
@@ -29,7 +26,6 @@ protected function tearDown(): void
2926
static::ensureKernelShutdown();
3027
}
3128
}
32-
');
3329
} else {
3430
/**
3531
* @internal

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.