Dynamically update session duration


Nov 26, 2022 Symfony


Set session duration in seconds : 

framework:
    session:
        cookie_lifetime:  60
        gc_maxlifetime: 60

 

Dynamically increase session duration 

public function indexAction(Request $request)
{
    $request->getSession()->migrate(false, 10);
    ...
}

symfony
short