diff options
author | Julian Brost | 2018-04-26 15:56:36 +0200 |
---|---|---|
committer | Julian Brost | 2018-04-26 15:56:36 +0200 |
commit | 6f4ada4c18808e23d7255d07d35b58743709d946 (patch) | |
tree | 67a3fcc096e4ab68a653205f1f98ada1f8c20a64 | |
parent | 0e8862bcbc1b8fc1e0756dd296840a02d1c00bf2 (diff) | |
download | aur-6f4ada4c18808e23d7255d07d35b58743709d946.tar.gz |
new version 2.5.2-1
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | 3315-dont-call-session_start-after-ini_set.patch | 109 | ||||
-rw-r--r-- | PKGBUILD | 13 | ||||
-rw-r--r-- | pr3186-php72-support.diff | 522 |
4 files changed, 121 insertions, 533 deletions
@@ -1,6 +1,6 @@ pkgbase = icingaweb2 pkgdesc = Icinga Web 2 Interface - pkgver = 2.5.1 + pkgver = 2.5.2 pkgrel = 1 url = http://www.icinga.org install = icingaweb2.install @@ -10,11 +10,11 @@ pkgbase = icingaweb2 optdepends = php-gd: export data to PDF optdepends = php-intl: support for internationalization optdepends = php-pgsql: for PostgreSQL backend - source = https://github.com/Icinga/icingaweb2/archive/v2.5.1.tar.gz - source = pr3186-php72-support.diff + source = https://github.com/Icinga/icingaweb2/archive/v2.5.2.tar.gz + source = 3315-dont-call-session_start-after-ini_set.patch source = HTMLPurifier-autoload-deprecation-warning.diff - sha256sums = a419f0d94d7633cf49ce71a63536bc7f7b820eb08329d7c92411485cd520fa10 - sha256sums = 3313d453f542abdd99fefd17acd550b4a1f585a9aef9cdc7c78a3858126ddc2e + sha256sums = 4a4d388ecd96cdd007ff3044bd32275438c2cf578a06e895b3c51578326c1f33 + sha256sums = c40f0608e110fefa2b85b452c416019ff9453722964278fee2128290e467f165 sha256sums = 69aa5ebf5ab234c2caad879199dfbaef85d867d701280ef05b50083cc0efffde pkgname = icingaweb2 diff --git a/3315-dont-call-session_start-after-ini_set.patch b/3315-dont-call-session_start-after-ini_set.patch new file mode 100644 index 000000000000..ace8d9620282 --- /dev/null +++ b/3315-dont-call-session_start-after-ini_set.patch @@ -0,0 +1,109 @@ +From dadd2c80f6819111f25e3799c072ec39c991897e Mon Sep 17 00:00:00 2001 +From: "Alexander A. Klimov" <alexander.klimov@icinga.com> +Date: Wed, 24 Jan 2018 17:38:20 +0100 +Subject: [PATCH] Don't call session_start() after ini_set() + +refs #3185 +--- + library/Icinga/Web/Session.php | 2 +- + library/Icinga/Web/Session/Php72Session.php | 37 ++++++++++++++++++++++ + library/Icinga/Web/Session/PhpSession.php | 15 +++++++++ + .../library/Icinga/Web/Session/PhpSessionTest.php | 2 +- + 4 files changed, 54 insertions(+), 2 deletions(-) + create mode 100644 library/Icinga/Web/Session/Php72Session.php + +diff --git a/library/Icinga/Web/Session.php b/library/Icinga/Web/Session.php +index e6f7218ad2..40df89f9e4 100644 +--- a/library/Icinga/Web/Session.php ++++ b/library/Icinga/Web/Session.php +@@ -29,7 +29,7 @@ class Session + public static function create(BaseSession $session = null) + { + if ($session === null) { +- self::$session = new PhpSession(); ++ self::$session = PhpSession::create(); + } else { + self::$session = $session; + } +diff --git a/library/Icinga/Web/Session/Php72Session.php b/library/Icinga/Web/Session/Php72Session.php +new file mode 100644 +index 0000000000..e6a6b19197 +--- /dev/null ++++ b/library/Icinga/Web/Session/Php72Session.php +@@ -0,0 +1,37 @@ ++<?php ++/* Icinga Web 2 | (c) 2017 Icinga Development Team | GPLv2+ */ ++ ++namespace Icinga\Web\Session; ++ ++use Icinga\Application\Logger; ++use Icinga\Exception\ConfigurationError; ++use Icinga\Web\Cookie; ++ ++/** ++ * Session implementation in PHP ++ */ ++class Php72Session extends PhpSession ++{ ++ /** ++ * Open a PHP session ++ */ ++ protected function open() ++ { ++ session_name($this->sessionName); ++ ++ $cookie = new Cookie('bogus'); ++ session_set_cookie_params( ++ 0, ++ $cookie->getPath(), ++ $cookie->getDomain(), ++ $cookie->isSecure(), ++ true ++ ); ++ ++ session_start(array( ++ 'use_cookies' => true, ++ 'use_only_cookies' => true, ++ 'use_trans_sid' => false ++ )); ++ } ++} +diff --git a/library/Icinga/Web/Session/PhpSession.php b/library/Icinga/Web/Session/PhpSession.php +index e00544cf9b..36dd84e9dd 100644 +--- a/library/Icinga/Web/Session/PhpSession.php ++++ b/library/Icinga/Web/Session/PhpSession.php +@@ -33,6 +33,21 @@ class PhpSession extends Session + */ + protected $sessionName = 'Icingaweb2'; + ++ /** ++ * Create a new PHPSession object using the provided options (if any) ++ * ++ * @param array $options An optional array of ini options to set ++ * ++ * @return static ++ * ++ * @throws ConfigurationError ++ * @see http://php.net/manual/en/session.configuration.php ++ */ ++ public static function create(array $options = null) ++ { ++ return version_compare(PHP_VERSION, '7.2.0') < 0 ? new self($options) : new Php72Session($options); ++ } ++ + /** + * Create a new PHPSession object using the provided options (if any) + * +diff --git a/test/php/library/Icinga/Web/Session/PhpSessionTest.php b/test/php/library/Icinga/Web/Session/PhpSessionTest.php +index d835fb034c..224e984621 100644 +--- a/test/php/library/Icinga/Web/Session/PhpSessionTest.php ++++ b/test/php/library/Icinga/Web/Session/PhpSessionTest.php +@@ -13,7 +13,7 @@ private function getSession() + if (!is_writable('/tmp')) { + $this->markTestSkipped('Could not write to session directory'); + } +- return new PhpSession( ++ return PhpSession::create( + array( + 'use_cookies' => false, + 'save_path' => '/tmp', @@ -2,7 +2,7 @@ # Maintainer: Julian Brost <julian@0x4a42.net> pkgname=icingaweb2 -pkgver=2.5.1 +pkgver=2.5.2 pkgrel=1 pkgdesc="Icinga Web 2 Interface" license=('GPL') @@ -13,19 +13,20 @@ optdepends=('php-gd: export data to PDF' 'php-pgsql: for PostgreSQL backend') url="http://www.icinga.org" source=("https://github.com/Icinga/${pkgname}/archive/v${pkgver}.tar.gz" - 'pr3186-php72-support.diff' + '3315-dont-call-session_start-after-ini_set.patch' 'HTMLPurifier-autoload-deprecation-warning.diff') install='icingaweb2.install' -sha256sums=('a419f0d94d7633cf49ce71a63536bc7f7b820eb08329d7c92411485cd520fa10' - '3313d453f542abdd99fefd17acd550b4a1f585a9aef9cdc7c78a3858126ddc2e' +sha256sums=('4a4d388ecd96cdd007ff3044bd32275438c2cf578a06e895b3c51578326c1f33' + 'c40f0608e110fefa2b85b452c416019ff9453722964278fee2128290e467f165' '69aa5ebf5ab234c2caad879199dfbaef85d867d701280ef05b50083cc0efffde') prepare() { cd "$srcdir/$pkgname-$pkgver" # Support for PHP 7.2 in Icinga Web 2 - # https://github.com/Icinga/icingaweb2/pull/3186 - patch -Np1 -i "${srcdir}/pr3186-php72-support.diff" + # https://github.com/Icinga/icingaweb2/issues/3185 + # https://github.com/Icinga/icingaweb2/pull/3315 + patch -Np1 -i "${srcdir}/3315-dont-call-session_start-after-ini_set.patch" # Fix deprecation warning in HTMLPurifier # https://github.com/ezyang/htmlpurifier/commit/bb7ad665265a29303ec59918f0c1832528bdc509 diff --git a/pr3186-php72-support.diff b/pr3186-php72-support.diff deleted file mode 100644 index 78f7cd193739..000000000000 --- a/pr3186-php72-support.diff +++ /dev/null @@ -1,522 +0,0 @@ -diff --git a/.travis.yml b/.travis.yml -index 34a4e5f633..102a024475 100644 ---- a/.travis.yml -+++ b/.travis.yml -@@ -8,6 +8,8 @@ php: - - '5.6' - - '7.0' - - '7.1' -+ - '7.2' -+ - nightly - - matrix: - include: -@@ -18,6 +20,8 @@ matrix: - - PHPCS_VERSION=2.9.1 - - LOCALE_GEN=1 - - ENABLE_LDAP=1 -+ allow_failures: -+ - php: nightly - - services: - - mysql -diff --git a/library/Icinga/Authentication/User/DbUserBackend.php b/library/Icinga/Authentication/User/DbUserBackend.php -index 6a2e2f6463..8cf4f5f401 100644 ---- a/library/Icinga/Authentication/User/DbUserBackend.php -+++ b/library/Icinga/Authentication/User/DbUserBackend.php -@@ -117,7 +117,7 @@ protected function initializeFilterColumns() - * - * @return void - */ -- public function insert($table, array $bind) -+ public function insert($table, array $bind, array $types = array()) - { - $this->requireTable($table); - $bind['created_at'] = date('Y-m-d H:i:s'); -@@ -138,7 +138,7 @@ public function insert($table, array $bind) - * @param array $bind - * @param Filter $filter - */ -- public function update($table, array $bind, Filter $filter = null) -+ public function update($table, array $bind, Filter $filter = null, array $types = array()) - { - $this->requireTable($table); - $bind['last_modified'] = date('Y-m-d H:i:s'); -diff --git a/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php b/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php -index 844b6da3c9..17562d2f43 100644 ---- a/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php -+++ b/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php -@@ -130,7 +130,7 @@ protected function initializeFilterColumns() - * @param string $table - * @param array $bind - */ -- public function insert($table, array $bind) -+ public function insert($table, array $bind, array $types = array()) - { - $bind['created_at'] = date('Y-m-d H:i:s'); - parent::insert($table, $bind); -@@ -143,7 +143,7 @@ public function insert($table, array $bind) - * @param array $bind - * @param Filter $filter - */ -- public function update($table, array $bind, Filter $filter = null) -+ public function update($table, array $bind, Filter $filter = null, array $types = array()) - { - $bind['last_modified'] = date('Y-m-d H:i:s'); - parent::update($table, $bind, $filter); -diff --git a/library/Icinga/Chart/Donut.php b/library/Icinga/Chart/Donut.php -index 1efc9546be..74f93d7d80 100644 ---- a/library/Icinga/Chart/Donut.php -+++ b/library/Icinga/Chart/Donut.php -@@ -344,7 +344,7 @@ protected function encode($content) - - protected function renderAttributes(array $attributes) - { -- $html = []; -+ $html = array(); - - foreach ($attributes as $name => $value) { - if ($value === null) { -diff --git a/library/Icinga/Data/Filter/FilterQueryString.php b/library/Icinga/Data/Filter/FilterQueryString.php -index 692f7da935..2a36f78373 100644 ---- a/library/Icinga/Data/Filter/FilterQueryString.php -+++ b/library/Icinga/Data/Filter/FilterQueryString.php -@@ -155,7 +155,7 @@ protected function readFilters($nestingLevel = 0, $op = null) - } - } - -- if ($op === null && count($filters > 0) && ($next === '&' || $next === '|')) { -+ if ($op === null && count($filters) > 0 && ($next === '&' || $next === '|')) { - $op = $next; - continue; - } -diff --git a/library/Icinga/File/Storage/TemporaryLocalFileStorage.php b/library/Icinga/File/Storage/TemporaryLocalFileStorage.php -index 05d633588e..6fd751c783 100644 ---- a/library/Icinga/File/Storage/TemporaryLocalFileStorage.php -+++ b/library/Icinga/File/Storage/TemporaryLocalFileStorage.php -@@ -41,7 +41,7 @@ public function __destruct() - foreach ($directoryIterator as $path => $entry) { - /** @var \SplFileInfo $entry */ - -- if ($entry->isDir()) { -+ if ($entry->isDir() && ! $entry->isLink()) { - rmdir($path); - } else { - unlink($path); -diff --git a/library/Icinga/Web/Form/Element/Note.php b/library/Icinga/Web/Form/Element/Note.php -index 5344fb31cb..9569dee55c 100644 ---- a/library/Icinga/Web/Form/Element/Note.php -+++ b/library/Icinga/Web/Form/Element/Note.php -@@ -48,7 +48,7 @@ public function init() - * - * @return bool Always true - */ -- public function isValid($value) -+ public function isValid($value, $context = null) - { - return true; - } -diff --git a/library/Icinga/Web/Session.php b/library/Icinga/Web/Session.php -index e6f7218ad2..40df89f9e4 100644 ---- a/library/Icinga/Web/Session.php -+++ b/library/Icinga/Web/Session.php -@@ -29,7 +29,7 @@ class Session - public static function create(BaseSession $session = null) - { - if ($session === null) { -- self::$session = new PhpSession(); -+ self::$session = PhpSession::create(); - } else { - self::$session = $session; - } -diff --git a/library/Icinga/Web/Session/Php72Session.php b/library/Icinga/Web/Session/Php72Session.php -new file mode 100644 -index 0000000000..9003d7e1fc ---- /dev/null -+++ b/library/Icinga/Web/Session/Php72Session.php -@@ -0,0 +1,121 @@ -+<?php -+/* Icinga Web 2 | (c) 2017 Icinga Development Team | GPLv2+ */ -+ -+namespace Icinga\Web\Session; -+ -+use Icinga\Application\Logger; -+use Icinga\Exception\ConfigurationError; -+use Icinga\Web\Cookie; -+ -+/** -+ * Session implementation in PHP -+ */ -+class Php72Session extends PhpSession -+{ -+ /** -+ * Open a PHP session -+ */ -+ protected function open() -+ { -+ session_name($this->sessionName); -+ -+ $cookie = new Cookie('bogus'); -+ session_set_cookie_params( -+ 0, -+ $cookie->getPath(), -+ $cookie->getDomain(), -+ $cookie->isSecure(), -+ true -+ ); -+ -+ session_start(array( -+ 'use_cookies' => true, -+ 'use_only_cookies' => true, -+ 'use_trans_sid' => false -+ )); -+ } -+ -+ /** -+ * Read all values written to the underling session and make them accessible. -+ */ -+ public function read() -+ { -+ $this->clear(); -+ $this->open(); -+ -+ foreach ($_SESSION as $key => $value) { -+ if (strpos($key, self::NAMESPACE_PREFIX) === 0) { -+ $namespace = new SessionNamespace(); -+ $namespace->setAll($value); -+ $this->namespaces[substr($key, strlen(self::NAMESPACE_PREFIX))] = $namespace; -+ } else { -+ $this->set($key, $value); -+ } -+ } -+ -+ session_write_close(); -+ } -+ -+ /** -+ * Write all values of this session object to the underlying session implementation -+ */ -+ public function write() -+ { -+ $this->open(); -+ -+ foreach ($this->removed as $key) { -+ unset($_SESSION[$key]); -+ } -+ foreach ($this->values as $key => $value) { -+ $_SESSION[$key] = $value; -+ } -+ foreach ($this->removedNamespaces as $identifier) { -+ unset($_SESSION[self::NAMESPACE_PREFIX . $identifier]); -+ } -+ foreach ($this->namespaces as $identifier => $namespace) { -+ $_SESSION[self::NAMESPACE_PREFIX . $identifier] = $namespace->getAll(); -+ } -+ -+ session_write_close(); -+ } -+ -+ /** -+ * Delete the current session, causing all session information to be lost -+ */ -+ public function purge() -+ { -+ $this->open(); -+ $_SESSION = array(); -+ $this->clear(); -+ session_destroy(); -+ $this->clearCookies(); -+ session_write_close(); -+ } -+ -+ /** -+ * @see Session::getId() -+ */ -+ public function getId() -+ { -+ if (($id = session_id()) === '') { -+ // Make sure we actually get a id -+ $this->open(); -+ session_write_close(); -+ $id = session_id(); -+ } -+ -+ return $id; -+ } -+ -+ /** -+ * Assign a new sessionId to the currently active session -+ */ -+ public function refreshId() -+ { -+ $this->open(); -+ if ($this->exists()) { -+ session_regenerate_id(); -+ } -+ session_write_close(); -+ } -+} -diff --git a/library/Icinga/Web/Session/PhpSession.php b/library/Icinga/Web/Session/PhpSession.php -index e00544cf9b..36dd84e9dd 100644 ---- a/library/Icinga/Web/Session/PhpSession.php -+++ b/library/Icinga/Web/Session/PhpSession.php -@@ -33,6 +33,21 @@ class PhpSession extends Session - */ - protected $sessionName = 'Icingaweb2'; - -+ /** -+ * Create a new PHPSession object using the provided options (if any) -+ * -+ * @param array $options An optional array of ini options to set -+ * -+ * @return static -+ * -+ * @throws ConfigurationError -+ * @see http://php.net/manual/en/session.configuration.php -+ */ -+ public static function create(array $options = null) -+ { -+ return version_compare(PHP_VERSION, '7.2.0') < 0 ? new self($options) : new Php72Session($options); -+ } -+ - /** - * Create a new PHPSession object using the provided options (if any) - * -diff --git a/modules/monitoring/library/Monitoring/Plugin.php b/modules/monitoring/library/Monitoring/Plugin.php -index 2edc459700..e8e1f5dbb8 100644 ---- a/modules/monitoring/library/Monitoring/Plugin.php -+++ b/modules/monitoring/library/Monitoring/Plugin.php -@@ -3,6 +3,8 @@ - - namespace Icinga\Module\Monitoring; - -+use Icinga\Application\Cli; -+ - require_once ICINGA_LIBDIR . '/Icinga/Application/Cli.php'; - - class Plugin extends Cli -diff --git a/modules/test/application/clicommands/PhpCommand.php b/modules/test/application/clicommands/PhpCommand.php -index 8a62deffd9..8e50d78c12 100644 ---- a/modules/test/application/clicommands/PhpCommand.php -+++ b/modules/test/application/clicommands/PhpCommand.php -@@ -3,8 +3,11 @@ - - namespace Icinga\Module\Test\Clicommands; - -+use ErrorException; - use Icinga\Application\Icinga; - use Icinga\Cli\Command; -+use RecursiveDirectoryIterator; -+use RecursiveIteratorIterator; - - /** - * PHP unit- & style-tests -@@ -68,7 +71,7 @@ public function unitAction() - . $phpUnit - . ' -c modules/test/phpunit.xml' - . ' ' . join(' ', array_merge($options, $this->params->getAllStandalone())); -- -+ - if ($this->isVerbose) { - $res = `$command`; - foreach (preg_split('/\n/', $res) as $line) { -@@ -155,6 +158,96 @@ public function styleAction() - ); - } - -+ /** -+ * Run code-validity checks -+ * -+ * This command checks whether icingaweb and installed modules match PHP syntax. -+ * -+ * USAGE -+ * -+ * icingacli test php validity -+ */ -+ public function validityAction() -+ { -+ $types = array( -+ T_CLASS => 'class', -+ T_INTERFACE => 'interface' -+ ); -+ -+ if (version_compare(PHP_VERSION, '5.4.0') > -1) { -+ $types[T_TRAIT] = 'trait'; -+ } -+ -+ $files = array(); -+ $baseDir = realpath(__DIR__ . '/../../../..'); -+ $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($baseDir)); -+ -+ foreach ($iterator as $path => $info) { -+ /** @var \SplFileInfo $info */ -+ if (preg_match( -+ '~\A(?:test|vendor|modules/[^/]+/test|library/Icinga/Test)(?:/|\z)~', -+ $iterator->getInnerIterator()->getSubPath() -+ ) || ! ($info->isFile() && preg_match('/\.php\z/', $path))) { -+ continue; -+ } -+ -+ $content = file_get_contents("file://$path"); -+ $lines = explode("\n", $content); -+ $tokens = token_get_all($content); -+ $lastDocComment = ''; -+ -+ foreach ($tokens as $token) { -+ if (! is_array($token)) { -+ continue; -+ } -+ -+ list($tokenNr, $raw, $lineNr) = $token; -+ -+ if ($tokenNr === T_DOC_COMMENT) { -+ $lastDocComment = $raw; -+ continue; -+ } -+ -+ if (array_key_exists($tokenNr, $types)) { -+ $matches = array(); -+ if (preg_match('/\A\s*(\w+)\s+\w+/', $lines[$lineNr - 1], $matches)) { -+ list($_, $type) = $matches; -+ -+ if ($type === $types[$tokenNr]) { -+ // Valid definition header -+ -+ if (! preg_match('/@deprecated\b/', $lastDocComment)) { -+ $files[] = $path; -+ } -+ } -+ } -+ -+ // Bad definition header -+ break; -+ } -+ } -+ -+ // No definition header -+ } -+ -+ define('ICINGA_LIBDIR', "$baseDir/library"); -+ -+ require_once 'HTMLPurifier/Bootstrap.php'; -+ require_once 'HTMLPurifier.php'; -+ -+ $oldErrorReportingLevel = error_reporting(); -+ error_reporting($oldErrorReportingLevel & ~ E_DEPRECATED); -+ -+ require_once 'HTMLPurifier.autoload.php'; -+ -+ error_reporting($oldErrorReportingLevel); -+ -+ foreach ($files as $file) { -+ printf('+ require_once %s;%s', var_export($file, true), PHP_EOL); -+ require_once $file; -+ } -+ } -+ - /** - * Setup the directory where to put report files and return its path - * -diff --git a/test/php/library/Icinga/Application/PhpCodeValidityTest.php b/test/php/library/Icinga/Application/PhpCodeValidityTest.php -new file mode 100644 -index 0000000000..6a3ff3beb0 ---- /dev/null -+++ b/test/php/library/Icinga/Application/PhpCodeValidityTest.php -@@ -0,0 +1,50 @@ -+<?php -+/* Icinga Web 2 | (c) 2017 Icinga Development Team | GPLv2+ */ -+ -+namespace Tests\Icinga\Application; -+ -+use DirectoryIterator; -+use Icinga\Application\Config; -+use Icinga\Data\ConfigObject; -+use Icinga\File\Storage\TemporaryLocalFileStorage; -+use Icinga\Test\BaseTestCase; -+ -+class PhpCodeValidityTest extends BaseTestCase -+{ -+ /** -+ * Collect all classes, interfaces and traits and let PHP validate them as if included -+ */ -+ public function testAllClassesInterfacesAndTraits() -+ { -+ $baseDir = realpath(__DIR__ . '/../../../../..'); -+ $storage = new TemporaryLocalFileStorage(); -+ -+ $storage->create('etc/icingaweb2/config.ini', (string) new Config(new ConfigObject(array( -+ 'global' => array( -+ 'module_path' => "$baseDir/modules", -+ 'config_backend' => 'ini' -+ ) -+ )))); -+ -+ $icingacli = 'ICINGAWEB_CONFIGDIR=' . $storage->resolvePath('etc/icingaweb2') -+ . ' ' . realpath('/proc/self/exe') . " $baseDir/bin/icingacli"; -+ -+ foreach (new DirectoryIterator("$baseDir/modules") as $module) { -+ if (! $module->isDot() && $module->isDir()) { -+ $this->system("$icingacli module enable {$module->getFilename()}"); -+ } -+ } -+ -+ $this->system("$icingacli test php validity"); -+ } -+ -+ protected function system($command) -+ { -+ echo "+ $command" . PHP_EOL; -+ -+ $return = 127; -+ system($command, $return); -+ -+ $this->assertSame(0, $return); -+ } -+} -diff --git a/test/php/library/Icinga/File/Storage/LocalFileStorageTest.php b/test/php/library/Icinga/File/Storage/LocalFileStorageTest.php -index 86ccc6f03c..5f104a50c4 100644 ---- a/test/php/library/Icinga/File/Storage/LocalFileStorageTest.php -+++ b/test/php/library/Icinga/File/Storage/LocalFileStorageTest.php -@@ -11,10 +11,16 @@ - - class LocalFileStorageTest extends BaseTestCase - { -+ /** -+ * @var int -+ */ -+ protected $oldErrorReportingLevel; -+ - public function __construct($name = null, array $data = array(), $dataName = '') - { - parent::__construct($name, $data, $dataName); - -+ $this->oldErrorReportingLevel = error_reporting(); - error_reporting(E_ALL | E_STRICT); - - set_error_handler(function ($errno, $errstr, $errfile, $errline) { -@@ -35,6 +41,12 @@ public function __construct($name = null, array $data = array(), $dataName = '') - }); - } - -+ public function __destruct() -+ { -+ error_reporting($this->oldErrorReportingLevel); -+ restore_error_handler(); -+ } -+ - public function testGetIterator() - { - $lfs = new TemporaryLocalFileStorage(); -diff --git a/test/php/library/Icinga/Web/Session/PhpSessionTest.php b/test/php/library/Icinga/Web/Session/PhpSessionTest.php -index d835fb034c..224e984621 100644 ---- a/test/php/library/Icinga/Web/Session/PhpSessionTest.php -+++ b/test/php/library/Icinga/Web/Session/PhpSessionTest.php -@@ -13,7 +13,7 @@ private function getSession() - if (!is_writable('/tmp')) { - $this->markTestSkipped('Could not write to session directory'); - } -- return new PhpSession( -+ return PhpSession::create( - array( - 'use_cookies' => false, - 'save_path' => '/tmp', |