This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Description
I've been getting an error: session_regenerate_id(): Session object destruction failed. ID: user (path: )
I can replicate by adding the following test to test/SaveHandler/DbTableGatewayTest.php:
/**
* @runInSeparateProcess
*/
public function testRegenerateWithSessionManager()
{
$sm = new \Zend\Session\SessionManager(null, null, new DbTableGateway($this->tableGateway, $this->options));
$sm->start();
$sm->regenerateId();
}
PHPUnit 5.2.10 by Sebastian Bergmann and contributors.
...E 4 / 4 (100%)
Time: 1.7 seconds, Memory: 6.00MB
There was 1 error:
1) ZendTest\Session\SaveHandler\DbTableGatewayTest::testRegenerateWithSessionMan
ager
session_regenerate_id(): Session object destruction failed. ID: user (path: )
C:\.home\.workspace\zend-session\src\SessionManager.php:323
C:\.home\.workspace\zend-session\test\SaveHandler\DbTableGatewayTest.php:133
I'm still trying to track down what changed since 2.5 but I do know DbTableGateway is being called to delete a record it hasn't created yet, and because it returns zero (the number of records it removed in the delete) the save_handler call fails. Apparently this hadn't happened back in 2.5.