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

Revert "bug #38063 [FrameworkBundle] generate preload.php in src/ to make opcache.preload predictable" #38343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Revert "bug #38063 [FrameworkBundle] generate preload.php in src/ to …
…make opcache.preload predictable (nicolas-grekas)"

This reverts commit d441d86, reversing
changes made to 043e7c3.
  • Loading branch information
nicolas-grekas committed Sep 29, 2020
commit 662fcff40f131e8303d5bf0ddd3e327f19e9734a
14 changes: 0 additions & 14 deletions 14 src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,20 +170,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}
}

$kernelDir = \dirname((new \ReflectionObject($kernel))->getFileName());
$preloadFile = $fs->makePathRelative(\dirname($containerFile, 2), $kernelDir);
$preloadFile .= substr_replace(basename($containerFile), '.preload', -4, 0);
$preloadFile = var_export('/'.$preloadFile, true);
@file_put_contents($kernelDir.'/.preload.php', <<<EOPHP
<?php

if (file_exists(__DIR__.$preloadFile)) {
require __DIR__.$preloadFile;
}

EOPHP
);

if ($output->isVerbose()) {
$io->comment('Finished');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ protected function setUp(): void
protected function tearDown(): void
{
$this->fs->remove($this->kernel->getProjectDir());
$this->fs->remove(__DIR__.'/Fixture/.preload.php');
}

public function testCacheIsFreshAfterCacheClearedWithWarmup()
Expand Down Expand Up @@ -83,7 +82,5 @@ public function testCacheIsFreshAfterCacheClearedWithWarmup()
$containerRef = new \ReflectionClass(require $containerFile);
$containerFile = str_replace('tes_'.\DIRECTORY_SEPARATOR, 'test'.\DIRECTORY_SEPARATOR, $containerRef->getFileName());
$this->assertMatchesRegularExpression(sprintf('/\'kernel.container_class\'\s*=>\s*\'%s\'/', $containerClass), file_get_contents($containerFile), 'kernel.container_class is properly set on the dumped container');

$this->assertFileEquals(__DIR__.'/Fixture/preload.php.expected', __DIR__.'/Fixture/.preload.php');
}
}

This file was deleted.

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