Skip to content

Commit b184c45

Browse files
committed
SessionExtension: option 'autoStart=smart' behaves differently and starts session when it is needed (BC break)
1 parent 7830f87 commit b184c45

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/Bridges/HttpDI/SessionExtension.php

+2-9
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,8 @@ public function loadConfiguration()
9393
$builder->addAlias('session', $this->prefix('session'));
9494
}
9595

96-
if (!$this->cliMode) {
97-
$name = $this->prefix('session');
98-
99-
if ($config->autoStart === 'smart') {
100-
$this->initialization->addBody('$this->getService(?)->autoStart(false);', [$name]);
101-
102-
} elseif ($config->autoStart === 'always' || $config->autoStart === true) {
103-
$this->initialization->addBody('$this->getService(?)->start();', [$name]);
104-
}
96+
if (!$this->cliMode && ($config->autoStart === 'always' || $config->autoStart === true)) {
97+
$this->initialization->addBody('$this->getService(?)->start();', [$this->prefix('session')]);
10598
}
10699
}
107100
}

0 commit comments

Comments
 (0)