Skip to content
Merged
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
28 changes: 18 additions & 10 deletions src/DependencyInjection/Configurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,28 @@ public function loadContainer(): string
$staticParameters = $this->staticParameters;
ksort($staticParameters['env']);
unset($staticParameters['env']['_']);
// make sure variables which can get defined by the shell
// after user-interactions with the UI will not invalidate the container cache
unset($staticParameters['env']['SHLVL']);
unset($staticParameters['env']['OLDPWD']);
unset($staticParameters['env']['LINES']);
unset($staticParameters['env']['COLUMNS']);
unset($staticParameters['env']['SHELL_VERBOSITY']);

$containerKey = [
$staticParameters,
array_keys($this->dynamicParameters),
$this->configs,
PHP_VERSION_ID - PHP_RELEASE_VERSION,
is_file($attributesPhp) ? hash_file('sha256', $attributesPhp) : 'attributes-missing',
NeonAdapter::CACHE_KEY,
$this->getAllConfigFilesHashes(),
var_export(TurboExtensionEnabler::isLoaded(), true),
];

$className = $loader->load(
[$this, 'generateContainer'],
[
$staticParameters,
array_keys($this->dynamicParameters),
$this->configs,
PHP_VERSION_ID - PHP_RELEASE_VERSION,
is_file($attributesPhp) ? hash_file('sha256', $attributesPhp) : 'attributes-missing',
NeonAdapter::CACHE_KEY,
$this->getAllConfigFilesHashes(),
var_export(TurboExtensionEnabler::isLoaded(), true),
],
$containerKey,
);

if ($this->journalContainer) {
Expand Down
Loading