@@ -432,7 +432,7 @@ private function shouldTestBeSkipped(array $sections, array $settings): bool
432
432
433
433
$ skipIfCode = $ this ->render ($ sections ['SKIPIF ' ]);
434
434
435
- if ($ this ->shouldRunSkipIfInSubprocess ($ sections , $ skipIfCode )) {
435
+ if ($ this ->shouldRunInSubprocess ($ sections , $ skipIfCode )) {
436
436
$ jobResult = JobRunnerRegistry::run (
437
437
new Job (
438
438
$ skipIfCode ,
@@ -469,7 +469,7 @@ private function shouldTestBeSkipped(array $sections, array $settings): bool
469
469
/**
470
470
* @param array<non-empty-string, non-empty-string> $sections
471
471
*/
472
- private function shouldRunCleanInSubprocess (array $ sections , string $ cleanCode ): bool
472
+ private function shouldRunInSubprocess (array $ sections , string $ cleanCode ): bool
473
473
{
474
474
if (isset ($ sections ['INI ' ])) {
475
475
// to get per-test INI settings, we need a dedicated subprocess
@@ -497,35 +497,6 @@ private function shouldRunCleanInSubprocess(array $sections, string $cleanCode):
497
497
return false ;
498
498
}
499
499
500
- /**
501
- * @param array<non-empty-string, non-empty-string> $sections
502
- */
503
- private function shouldRunSkipIfInSubprocess (array $ sections , string $ skipIfCode ): bool
504
- {
505
- if (isset ($ sections ['INI ' ])) {
506
- // to get per-test INI settings, we need a dedicated subprocess
507
- return true ;
508
- }
509
-
510
- $ detector = new SideEffectsDetector ;
511
- $ sideEffects = $ detector ->getSideEffects ($ skipIfCode );
512
-
513
- if ($ sideEffects === []) {
514
- return false ; // no side-effects
515
- }
516
-
517
- foreach ($ sideEffects as $ sideEffect ) {
518
- if ($ sideEffect === SideEffect::STANDARD_OUTPUT ) {
519
- // stdout is fine, we will catch it using output-buffering
520
- continue ;
521
- }
522
-
523
- return true ;
524
- }
525
-
526
- return false ;
527
- }
528
-
529
500
private function runCodeInLocalSandbox (string $ code ): string
530
501
{
531
502
$ code = preg_replace ('/^<\?(?:php)?|\?>\s*+$/ ' , '' , $ code );
@@ -550,7 +521,7 @@ private function runClean(array $sections, bool $collectCoverage): void
550
521
551
522
$ cleanCode = $ this ->render ($ sections ['CLEAN ' ]);
552
523
553
- if ($ this ->shouldRunCleanInSubprocess ($ sections , $ cleanCode )) {
524
+ if ($ this ->shouldRunInSubprocess ($ sections , $ cleanCode )) {
554
525
$ result = JobRunnerRegistry::run (
555
526
new Job (
556
527
$ cleanCode ,
0 commit comments