<p dir="auto">Hello,</p>
<p dir="auto">I upgrade my PHP version from PHP 5.6.36 to PHP 7.2, but I have a problem when I want to use the migrate function of Session component.</p>
<p dir="auto">My simple line of code :<br>
<code class="notranslate">$this-&gt;request-&gt;getSession()-&gt;migrate(true, $newLifetime);</code></p>
<p dir="auto">The error returned :<br>
<code class="notranslate">Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time </code></p>
<p dir="auto">I have already a session opened before by my login page, but I want to change the session life time on login.<br>
My Symfony version 2.8.44<br>
Thanks for your help</p>
<p dir="auto">My entity :</p>
<p dir="auto">/**</p>
<ul dir="auto">
<li><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Orm/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Orm">@Orm</a>\Column(type="string",length="50")
<ul dir="auto">
<li><a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/Assert/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Assert">@Assert</a>\NotBlank()</li>
</ul>
</li>
<li><a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/Assert/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Assert">@Assert</a>\Choice(choices = {"spring", "summer","autumn","winter"})<br>
*/<br>
private $season;</li>
</ul>
<p dir="auto">My Form :</p>
<p dir="auto">$builder-&gt;add('season', 'choice', array('choices' =&gt; array('spring'=&gt;'season.spring','summer'=&gt;'season.summer','autumn'=&gt;'season.autumn','winter'=&gt;'season.winter'),<br>
'multiple' =&gt; true,<br>
'expanded' =&gt; true<br>
));</p>
<p dir="auto">The validation is always false &gt;&gt; "The value you selected is not a valid choice"</p>