Skip to content

Commit 023ca65

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: Revert "bug #38063 [FrameworkBundle] generate preload.php in src/ to make opcache.preload predictable (nicolas-grekas)" [PhpUnitBridge] Fix class_alias() for PHPUnit\Framework\Error\Error
2 parents 7910c19 + 01c517f commit 023ca65

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

Command/CacheClearCommand.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -175,20 +175,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
175175
}
176176
}
177177

178-
$kernelDir = \dirname((new \ReflectionObject($kernel))->getFileName());
179-
$preloadFile = $fs->makePathRelative(\dirname($containerFile, 2), $kernelDir);
180-
$preloadFile .= substr_replace(basename($containerFile), '.preload', -4, 0);
181-
$preloadFile = var_export('/'.$preloadFile, true);
182-
@file_put_contents($kernelDir.'/.preload.php', <<<EOPHP
183-
<?php
184-
185-
if (file_exists(__DIR__.$preloadFile)) {
186-
require __DIR__.$preloadFile;
187-
}
188-
189-
EOPHP
190-
);
191-
192178
if ($output->isVerbose()) {
193179
$io->comment('Finished');
194180
}

Tests/Command/CacheClearCommand/CacheClearCommandTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ protected function setUp(): void
3838
protected function tearDown(): void
3939
{
4040
$this->fs->remove($this->kernel->getProjectDir());
41-
$this->fs->remove(__DIR__.'/Fixture/.preload.php');
4241
}
4342

4443
public function testCacheIsFreshAfterCacheClearedWithWarmup()
@@ -83,7 +82,5 @@ public function testCacheIsFreshAfterCacheClearedWithWarmup()
8382
$containerRef = new \ReflectionClass(require $containerFile);
8483
$containerFile = str_replace('tes_'.\DIRECTORY_SEPARATOR, 'test'.\DIRECTORY_SEPARATOR, $containerRef->getFileName());
8584
$this->assertMatchesRegularExpression(sprintf('/\'kernel.container_class\'\s*=>\s*\'%s\'/', $containerClass), file_get_contents($containerFile), 'kernel.container_class is properly set on the dumped container');
86-
87-
$this->assertFileEquals(__DIR__.'/Fixture/preload.php.expected', __DIR__.'/Fixture/.preload.php');
8885
}
8986
}

Tests/Command/CacheClearCommand/Fixture/preload.php.expected

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)