diff -Nru php-horde-sessionhandler-2.2.9/debian/changelog php-horde-sessionhandler-2.2.9/debian/changelog --- php-horde-sessionhandler-2.2.9/debian/changelog 2017-06-30 15:57:18.000000000 -0400 +++ php-horde-sessionhandler-2.2.9/debian/changelog 2018-02-22 14:58:07.000000000 -0500 @@ -1,3 +1,15 @@ +php-horde-sessionhandler (2.2.9-1ubuntu1) UNRELEASED; urgency=medium + + * debian/patches/0001-run_tests_in_separate_processes.patch: run + BuiltinTest.php tests in separate processes. Thanks to Jan + Schneider . + * debian/patches/0002-fix_stderr_test_output.patch: fix stderr output + during tests. + * debian/patches/0003-session-save-handler.patch: don't try to set + session save handler with ini_set(). (LP:1749783) + + -- Matt Coleman Thu, 22 Feb 2018 14:57:34 -0500 + php-horde-sessionhandler (2.2.9-1) unstable; urgency=medium * New upstream version 2.2.9 diff -Nru php-horde-sessionhandler-2.2.9/debian/patches/0001-run_tests_in_separate_processes.patch php-horde-sessionhandler-2.2.9/debian/patches/0001-run_tests_in_separate_processes.patch --- php-horde-sessionhandler-2.2.9/debian/patches/0001-run_tests_in_separate_processes.patch 1969-12-31 19:00:00.000000000 -0500 +++ php-horde-sessionhandler-2.2.9/debian/patches/0001-run_tests_in_separate_processes.patch 2018-02-21 18:08:22.000000000 -0500 @@ -0,0 +1,104 @@ +Description: run BuiltinTest.php tests in separate processes + This fixes "headers already sent" errors. +Author: Jan Schneider +Origin: upstream, https://github.com/horde/SessionHandler/commit/d1a72d266117894be11f10645486cb13c7b1b40e +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: php-horde-sessionhandler-2.2.9/Horde_SessionHandler-2.2.9/test/Horde/SessionHandler/Storage/BuiltinTest.php +=================================================================== +--- php-horde-sessionhandler-2.2.9.orig/Horde_SessionHandler-2.2.9/test/Horde/SessionHandler/Storage/BuiltinTest.php ++++ php-horde-sessionhandler-2.2.9/Horde_SessionHandler-2.2.9/test/Horde/SessionHandler/Storage/BuiltinTest.php +@@ -15,29 +15,29 @@ require_once dirname(__FILE__) . '/Base. + */ + class Horde_SessionHandler_Storage_BuiltinTest extends Horde_SessionHandler_Storage_Base + { ++ /** ++ * @runInSeparateProcess ++ */ + public function testWrite() + { +- session_name('sessionname'); +- session_id('sessionid'); +- session_start(); +- $this->assertEmpty($_SESSION); +- $_SESSION['sessiondata'] = 'foo'; +- session_write_close(); ++ $this->_write(); + } + + /** +- * @depends testWrite ++ * @runInSeparateProcess + */ + public function testRead() + { ++ $this->_write(); + $this->assertEquals('sessiondata|s:3:"foo";', self::$handler->read('sessionid')); + } + + /** +- * @depends testWrite ++ * @runInSeparateProcess + */ + public function testReopen() + { ++ $this->_write(); + session_write_close(); + session_name('sessionname'); + session_id('sessionid'); +@@ -47,10 +47,11 @@ class Horde_SessionHandler_Storage_Built + } + + /** +- * @depends testWrite ++ * @runInSeparateProcess + */ + public function testList() + { ++ $this->_write(); + session_write_close(); + session_name('sessionname'); + session_id('sessionid2'); +@@ -69,10 +70,11 @@ class Horde_SessionHandler_Storage_Built + } + + /** +- * @depends testList ++ * @runInSeparateProcess + */ + public function testDestroy() + { ++ $this->testList(); + session_name('sessionname'); + session_id('sessionid2'); + session_start(); +@@ -86,10 +88,11 @@ class Horde_SessionHandler_Storage_Built + } + + /** +- * @depends testDestroy ++ * @runInSeparateProcess + */ + public function testGc() + { ++ $this->testDestroy(); + $this->probability = ini_get('session.gc_probability'); + $this->divisor = ini_get('session.gc_divisor'); + $this->maxlifetime = ini_get('session.gc_maxlifetime'); +@@ -102,6 +105,16 @@ class Horde_SessionHandler_Storage_Built + self::$handler->getSessionIDs()); + } + ++ protected function _write() ++ { ++ session_name('sessionname'); ++ session_id('sessionid'); ++ session_start(); ++ $this->assertEmpty($_SESSION); ++ $_SESSION['sessiondata'] = 'foo'; ++ session_write_close(); ++ } ++ + public static function setUpBeforeClass() + { + parent::setUpBeforeClass(); diff -Nru php-horde-sessionhandler-2.2.9/debian/patches/0002-fix_stderr_test_output.patch php-horde-sessionhandler-2.2.9/debian/patches/0002-fix_stderr_test_output.patch --- php-horde-sessionhandler-2.2.9/debian/patches/0002-fix_stderr_test_output.patch 1969-12-31 19:00:00.000000000 -0500 +++ php-horde-sessionhandler-2.2.9/debian/patches/0002-fix_stderr_test_output.patch 2018-02-21 18:13:34.000000000 -0500 @@ -0,0 +1,42 @@ +Description: fix stderr output during tests + PHP 7.2 outputs a warning when any headers or session changes are attempted + after headers have been sent. This patch updates BuiltinTest.php to perform + all changes to the headers and session inside the test's child process. +Author: Matt Coleman +Origin: other +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: php-horde-sessionhandler-2.2.9/Horde_SessionHandler-2.2.9/test/Horde/SessionHandler/Storage/BuiltinTest.php +=================================================================== +--- php-horde-sessionhandler-2.2.9.orig/Horde_SessionHandler-2.2.9/test/Horde/SessionHandler/Storage/BuiltinTest.php ++++ php-horde-sessionhandler-2.2.9/Horde_SessionHandler-2.2.9/test/Horde/SessionHandler/Storage/BuiltinTest.php +@@ -115,7 +115,7 @@ class Horde_SessionHandler_Storage_Built + session_write_close(); + } + +- public static function setUpBeforeClass() ++ public function setUp() + { + parent::setUpBeforeClass(); + session_cache_limiter(''); +@@ -124,19 +124,10 @@ class Horde_SessionHandler_Storage_Built + self::$handler = new Horde_SessionHandler_Storage_Builtin(array('path' => self::$dir)); + } + +- public function tearDown() +- { +- if (isset($this->probability)) { +- ini_set('session.gc_probability', $this->probability); +- ini_set('session.gc_divisor', $this->divisor); +- ini_set('session.gc_maxlifetime', $this->maxlifetime); +- } +- } +- + /** + * @todo Rely on session_status() in H6. + */ +- public static function tearDownAfterClass() ++ public function tearDown() + { + parent::tearDownAfterClass(); + unset($_SESSION); diff -Nru php-horde-sessionhandler-2.2.9/debian/patches/0003-session-save-handler.patch php-horde-sessionhandler-2.2.9/debian/patches/0003-session-save-handler.patch --- php-horde-sessionhandler-2.2.9/debian/patches/0003-session-save-handler.patch 1969-12-31 19:00:00.000000000 -0500 +++ php-horde-sessionhandler-2.2.9/debian/patches/0003-session-save-handler.patch 2018-02-22 14:56:55.000000000 -0500 @@ -0,0 +1,22 @@ +Description: don't try to set session save handler with ini_set() + This was an undocumented breaking change from this commit: + http://git.php.net/?p=php-src.git;a=commit;h=a93a51c3bf4ea1638ce0adc4a899cb93531b9f0d + Since using `ini_set()` was deprecated in favor of calling + `session_set_save_handler()`, which occurs on the next line, this line can be + removed. +Author: Matt Coleman +Origin: other +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: php-horde-sessionhandler-2.2.9/Horde_SessionHandler-2.2.9/lib/Horde/SessionHandler.php +=================================================================== +--- php-horde-sessionhandler-2.2.9.orig/Horde_SessionHandler-2.2.9/lib/Horde/SessionHandler.php ++++ php-horde-sessionhandler-2.2.9/Horde_SessionHandler-2.2.9/lib/Horde/SessionHandler.php +@@ -92,7 +92,6 @@ class Horde_SessionHandler + $this->_storage = $storage; + + if (empty($this->_params['noset'])) { +- ini_set('session.save_handler', 'user'); + session_set_save_handler( + array($this, 'open'), + array($this, 'close'), diff -Nru php-horde-sessionhandler-2.2.9/debian/patches/series php-horde-sessionhandler-2.2.9/debian/patches/series --- php-horde-sessionhandler-2.2.9/debian/patches/series 1969-12-31 19:00:00.000000000 -0500 +++ php-horde-sessionhandler-2.2.9/debian/patches/series 2018-02-22 14:54:03.000000000 -0500 @@ -0,0 +1,3 @@ +0001-run_tests_in_separate_processes.patch +0002-fix_stderr_test_output.patch +0003-session-save-handler.patch