--TEST-- restore statements on reset --SKIPIF-- --INI-- date.timezone=UTC --FILE-- prepare("test", "SELECT 1"); $c->on(pq\Connection::EVENT_RESET, function($conn) { printf("Connection was reset\n"); }); var_dump($s->exec()->fetchRow()); $c->reset(); // Fatal error: Uncaught exception 'pq\Exception\DomainException' with message 'ERROR: prepared statement "test" does not exist' var_dump($s->exec()->fetchRow()); ?> ===DONE=== --EXPECT-- Test array(1) { [0]=> int(1) } Connection was reset array(1) { [0]=> int(1) } ===DONE===