diff -pruN 2.1.3-3/debian/changelog 2.1.4-0ubuntu2/debian/changelog
--- 2.1.3-3/debian/changelog	2016-06-08 04:43:29.000000000 +0000
+++ 2.1.4-0ubuntu2/debian/changelog	2018-02-23 22:26:29.000000000 +0000
@@ -1,3 +1,18 @@
+php-horde-stream-wrapper (2.1.4-0ubuntu2) bionic; urgency=medium
+
+  * debian/patches/phpunit6_compat.patch: PHPUnit 6 has namespaced
+    classes.
+  * d/t/phpunit: explicitly pass bootstrap file.
+
+ -- Nishanth Aravamudan <nish.aravamudan@canonical.com>  Fri, 23 Feb 2018 14:26:29 -0800
+
+php-horde-stream-wrapper (2.1.4-0ubuntu1) bionic; urgency=medium
+
+  * New upstream release (2.1.4)
+    - Includes PHP7.2 compatibility fixes.
+
+ -- Nishanth Aravamudan <nish.aravamudan@canonical.com>  Wed, 14 Feb 2018 11:40:47 -0800
+
 php-horde-stream-wrapper (2.1.3-3) unstable; urgency=medium
 
   * Update Standards-Version to 3.9.8, no change
diff -pruN 2.1.3-3/debian/control 2.1.4-0ubuntu2/debian/control
--- 2.1.3-3/debian/control	2016-06-08 04:43:29.000000000 +0000
+++ 2.1.4-0ubuntu2/debian/control	2018-02-14 19:40:47.000000000 +0000
@@ -1,7 +1,8 @@
 Source: php-horde-stream-wrapper
 Section: php
 Priority: extra
-Maintainer: Horde Maintainers <pkg-horde-hackers@lists.alioth.debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Horde Maintainers <pkg-horde-hackers@lists.alioth.debian.org>
 Uploaders: Mathieu Parent <sathieu@debian.org>
 Build-Depends: debhelper (>= 9), pkg-php-tools, pear-horde-channel
 Standards-Version: 3.9.8
diff -pruN 2.1.3-3/debian/patches/phpunit6_compat.patch 2.1.4-0ubuntu2/debian/patches/phpunit6_compat.patch
--- 2.1.3-3/debian/patches/phpunit6_compat.patch	1970-01-01 00:00:00.000000000 +0000
+++ 2.1.4-0ubuntu2/debian/patches/phpunit6_compat.patch	2018-02-23 22:26:26.000000000 +0000
@@ -0,0 +1,27 @@
+Description: PHPUnit 6 has namespaced classes
+Author: Nishanth Aravamudan <nish.aravamudan@canonical.com>
+Forwarded: Will be done by Nishanth Aravamudan
+Last-Update: 2018-02-23
+
+--- php-horde-stream-wrapper-2.1.4.orig/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/CombineTest.php
++++ php-horde-stream-wrapper-2.1.4/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/CombineTest.php
+@@ -23,7 +23,7 @@
+  * @package    Stream_Wrapper
+  * @subpackage UnitTests
+  */
+-class Horde_Stream_Wrapper_CombineTest extends PHPUnit_Framework_TestCase
++class Horde_Stream_Wrapper_CombineTest extends PHPUnit\Framework\TestCase
+ {
+     public function testUsage()
+     {
+--- php-horde-stream-wrapper-2.1.4.orig/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/StringTest.php
++++ php-horde-stream-wrapper-2.1.4/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/StringTest.php
+@@ -23,7 +23,7 @@
+  * @package    Stream_Wrapper
+  * @subpackage UnitTests
+  */
+-class Horde_Stream_Wrapper_StringTest extends PHPUnit_Framework_TestCase
++class Horde_Stream_Wrapper_StringTest extends PHPUnit\Framework\TestCase
+ {
+     public function testUsage()
+     {
diff -pruN 2.1.3-3/debian/patches/series 2.1.4-0ubuntu2/debian/patches/series
--- 2.1.3-3/debian/patches/series	1970-01-01 00:00:00.000000000 +0000
+++ 2.1.4-0ubuntu2/debian/patches/series	2018-02-23 22:26:06.000000000 +0000
@@ -0,0 +1 @@
+phpunit6_compat.patch
diff -pruN 2.1.3-3/debian/tests/phpunit 2.1.4-0ubuntu2/debian/tests/phpunit
--- 2.1.3-3/debian/tests/phpunit	2016-06-08 04:43:29.000000000 +0000
+++ 2.1.4-0ubuntu2/debian/tests/phpunit	2018-02-23 22:26:29.000000000 +0000
@@ -3,4 +3,4 @@
 set -e
 
 cd Horde_Stream_Wrapper*/test/./Horde/Stream/Wrapper
-phpunit -v .
+phpunit --bootstrap bootstrap.php -v .
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.3/doc/Horde/Stream/Wrapper/COPYING 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/doc/Horde/Stream/Wrapper/COPYING
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.3/doc/Horde/Stream/Wrapper/COPYING	2016-02-02 09:34:09.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/doc/Horde/Stream/Wrapper/COPYING	1970-01-01 00:00:00.000000000 +0000
@@ -1,24 +0,0 @@
-        Copyright 1999-2016 Horde LLC.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HORDE PROJECT
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.3/lib/Horde/Stream/Wrapper/Combine.php 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/lib/Horde/Stream/Wrapper/Combine.php
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.3/lib/Horde/Stream/Wrapper/Combine.php	2016-02-02 09:34:09.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/lib/Horde/Stream/Wrapper/Combine.php	1970-01-01 00:00:00.000000000 +0000
@@ -1,316 +0,0 @@
-<?php
-/**
- * Copyright 2009-2016 Horde LLC (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (BSD). If you
- * did not receive this file, see http://www.horde.org/licenses/bsd.
- *
- * @category  Horde
- * @copyright 2009-2016 Horde LLC
- * @license   http://www.horde.org/licenses/bsd BSD
- * @package   Stream_Wrapper
- */
-
-/**
- * A stream wrapper that will combine multiple strings/streams into a single
- * stream.
- *
- * @author    Michael Slusarz <slusarz@horde.org>
- * @category  Horde
- * @copyright 2009-2016 Horde LLC
- * @license   http://www.horde.org/licenses/bsd BSD
- * @package   Stream_Wrapper
- */
-class Horde_Stream_Wrapper_Combine
-{
-    /**/
-    const WRAPPER_NAME = 'horde-stream-wrapper-combine';
-
-    /**
-     * Context.
-     *
-     * @var resource
-     */
-    public $context;
-
-    /**
-     * Array that holds the various streams.
-     *
-     * @var array
-     */
-    protected $_data = array();
-
-    /**
-     * The combined length of the stream.
-     *
-     * @var integer
-     */
-    protected $_length = 0;
-
-    /**
-     * The current position in the string.
-     *
-     * @var integer
-     */
-    protected $_position = 0;
-
-    /**
-     * The current position in the data array.
-     *
-     * @var integer
-     */
-    protected $_datapos = 0;
-
-    /**
-     * Have we reached EOF?
-     *
-     * @var boolean
-     */
-    protected $_ateof = false;
-
-    /**
-     * Unique ID tracker for the streams.
-     *
-     * @var integer
-     */
-    private static $_id = 0;
-
-    /**
-     * Create a stream from multiple data sources.
-     *
-     * @since 2.1.0
-     *
-     * @param array $data  An array of strings and/or streams to combine into
-     *                     a single stream.
-     *
-     * @return resource  A PHP stream.
-     */
-    public static function getStream($data)
-    {
-        if (!self::$_id) {
-            stream_wrapper_register(self::WRAPPER_NAME, __CLASS__);
-        }
-
-        return fopen(
-            self::WRAPPER_NAME . '://' . ++self::$_id,
-            'wb',
-            false,
-            stream_context_create(array(
-                self::WRAPPER_NAME => array(
-                    'data' => $data
-                )
-            ))
-        );
-    }
-    /**
-     * @see streamWrapper::stream_open()
-     *
-     * @param string $path
-     * @param string $mode
-     * @param integer $options
-     * @param string &$opened_path
-     *
-     * @throws Exception
-     */
-    public function stream_open($path, $mode, $options, &$opened_path)
-    {
-        $opts = stream_context_get_options($this->context);
-
-        if (isset($opts[self::WRAPPER_NAME]['data'])) {
-            $data = $opts[self::WRAPPER_NAME]['data'];
-        } elseif (isset($opts['horde-combine']['data'])) {
-            // @deprecated
-            $data = $opts['horde-combine']['data']->getData();
-        } else {
-            throw new Exception('Use ' . __CLASS__ . '::getStream() to initialize the stream.');
-        }
-
-        reset($data);
-        while (list(,$val) = each($data)) {
-            if (is_string($val)) {
-                $fp = fopen('php://temp', 'r+');
-                fwrite($fp, $val);
-            } else {
-                $fp = $val;
-            }
-
-            fseek($fp, 0, SEEK_END);
-            $length = ftell($fp);
-            rewind($fp);
-
-            $this->_data[] = array(
-                'fp' => $fp,
-                'l' => $length,
-                'p' => 0
-            );
-
-            $this->_length += $length;
-        }
-
-        return true;
-    }
-
-    /**
-     * @see streamWrapper::stream_read()
-     *
-     * @param integer $count
-     *
-     * @return mixed
-     */
-    public function stream_read($count)
-    {
-        if ($this->stream_eof()) {
-            return false;
-        }
-
-        $out = '';
-        $tmp = &$this->_data[$this->_datapos];
-
-        while ($count) {
-            if (!is_resource($tmp['fp'])) {
-                return false;
-            }
-
-            $curr_read = min($count, $tmp['l'] - $tmp['p']);
-            $out .= fread($tmp['fp'], $curr_read);
-            $count -= $curr_read;
-            $this->_position += $curr_read;
-
-            if ($this->_position == $this->_length) {
-                if ($count) {
-                    $this->_ateof = true;
-                    break;
-                } else {
-                    $tmp['p'] += $curr_read;
-                }
-            } elseif ($count) {
-                if (!isset($this->_data[++$this->_datapos])) {
-                    return false;
-                }
-                $tmp = &$this->_data[$this->_datapos];
-                rewind($tmp['fp']);
-                $tmp['p'] = 0;
-            } else {
-                $tmp['p'] += $curr_read;
-            }
-        }
-
-        return $out;
-    }
-
-    /**
-     * @see streamWrapper::stream_write()
-     *
-     * @param string $data
-     *
-     * @return integer
-     */
-    public function stream_write($data)
-    {
-        $tmp = &$this->_data[$this->_datapos];
-
-        $oldlen = $tmp['l'];
-        $res = fwrite($tmp['fp'], $data);
-        if ($res === false) {
-            return false;
-        }
-
-        $tmp['p'] = ftell($tmp['fp']);
-        if ($tmp['p'] > $oldlen) {
-            $tmp['l'] = $tmp['p'];
-            $this->_length += ($tmp['l'] - $oldlen);
-        }
-
-        return $res;
-    }
-
-    /**
-     * @see streamWrapper::stream_tell()
-     *
-     * @return integer
-     */
-    public function stream_tell()
-    {
-        return $this->_position;
-    }
-
-    /**
-     * @see streamWrapper::stream_eof()
-     *
-     * @return boolean
-     */
-    public function stream_eof()
-    {
-        return $this->_ateof;
-    }
-
-    /**
-     * @see streamWrapper::stream_stat()
-     *
-     * @return array
-     */
-    public function stream_stat()
-    {
-        return array(
-            'dev' => 0,
-            'ino' => 0,
-            'mode' => 0,
-            'nlink' => 0,
-            'uid' => 0,
-            'gid' => 0,
-            'rdev' => 0,
-            'size' => $this->_length,
-            'atime' => 0,
-            'mtime' => 0,
-            'ctime' => 0,
-            'blksize' => 0,
-            'blocks' => 0
-        );
-    }
-
-    /**
-     * @see streamWrapper::stream_seek()
-     *
-     * @param integer $offset
-     * @param integer $whence  SEEK_SET, SEEK_CUR, or SEEK_END
-     *
-     * @return boolean
-     */
-    public function stream_seek($offset, $whence)
-    {
-        $oldpos = $this->_position;
-        $this->_ateof = false;
-
-        switch ($whence) {
-        case SEEK_SET:
-            $offset = $offset;
-            break;
-
-        case SEEK_CUR:
-            $offset = $this->_position + $offset;
-            break;
-
-        case SEEK_END:
-            $offset = $this->_length + $offset;
-            break;
-
-        default:
-            return false;
-        }
-
-        $count = $this->_position = min($this->_length, $offset);
-
-        foreach ($this->_data as $key => $val) {
-            if ($count < $val['l']) {
-                $this->_datapos = $key;
-                $val['p'] = $count;
-                fseek($val['fp'], $count, SEEK_SET);
-                break;
-            }
-            $count -= $val['l'];
-        }
-
-        return ($oldpos != $this->_position);
-    }
-
-}
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.3/lib/Horde/Stream/Wrapper/CombineStream.php 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/lib/Horde/Stream/Wrapper/CombineStream.php
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.3/lib/Horde/Stream/Wrapper/CombineStream.php	2016-02-02 09:34:09.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/lib/Horde/Stream/Wrapper/CombineStream.php	1970-01-01 00:00:00.000000000 +0000
@@ -1,33 +0,0 @@
-<?php
-/**
- * Copyright 2009-2016 Horde LLC (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (BSD). If you
- * did not receive this file, see http://www.horde.org/licenses/bsd.
- *
- * @category  Horde
- * @copyright 2009-2016 Horde LLC
- * @license   http://www.horde.org/licenses/bsd BSD
- * @package   Stream_Wrapper
- */
-
-/**
- * Provides access to the CombineStream stream wrapper.
- *
- * @author     Michael Slusarz <slusarz@horde.org>
- * @category   Horde
- * @deprecated Use Horde_Stream_Wrapper_Combine::getStream()
- * @copyright  2009-2016 Horde LLC
- * @license    http://www.horde.org/licenses/bsd BSD
- * @package    Stream_Wrapper
- */
-interface Horde_Stream_Wrapper_CombineStream
-{
-    /**
-     * Return a reference to the data.
-     *
-     * @return array
-     */
-    public function getData();
-}
-
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.3/lib/Horde/Stream/Wrapper/String.php 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/lib/Horde/Stream/Wrapper/String.php
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.3/lib/Horde/Stream/Wrapper/String.php	2016-02-02 09:34:09.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/lib/Horde/Stream/Wrapper/String.php	1970-01-01 00:00:00.000000000 +0000
@@ -1,211 +0,0 @@
-<?php
-/**
- * Copyright 2007-2016 Horde LLC (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (BSD). If you
- * did not receive this file, see http://www.horde.org/licenses/bsd.
- *
- * @category  Horde
- * @copyright 2007-2016 Horde LLC
- * @license   http://www.horde.org/licenses/bsd BSD
- * @package   Stream_Wrapper
- */
-
-/**
- * A stream wrapper that will treat a native PHP string as a stream.
- *
- * @author    Chuck Hagenbuch <chuck@horde.org>
- * @author    Michael Slusarz <slusarz@horde.org>
- * @category  Horde
- * @copyright 2007-2016 Horde LLC
- * @license   http://www.horde.org/licenses/bsd BSD
- * @package   Stream_Wrapper
- */
-class Horde_Stream_Wrapper_String
-{
-    /**/
-    const WRAPPER_NAME = 'horde-stream-wrapper-string';
-
-    /**
-     * The current context.
-     *
-     * @var resource
-     */
-    public $context;
-
-    /**
-     * String position.
-     *
-     * @var integer
-     */
-    protected $_pos;
-
-    /**
-     * The string.
-     *
-     * @var string
-     */
-    protected $_string;
-
-    /**
-     * Unique ID tracker for the streams.
-     *
-     * @var integer
-     */
-    private static $_id = 0;
-
-    /**
-     * Create a stream from a PHP string.
-     *
-     * @since 2.1.0
-     *
-     * @param string &$string  A PHP string variable.
-     *
-     * @return resource  A PHP stream pointing to the variable.
-     */
-    public static function getStream(&$string)
-    {
-        if (!self::$_id) {
-            stream_wrapper_register(self::WRAPPER_NAME, __CLASS__);
-        }
-
-        /* Needed to keep reference. */
-        $ob = new stdClass;
-        $ob->string = &$string;
-
-        return fopen(
-            self::WRAPPER_NAME . '://' . ++self::$_id,
-            'wb',
-            false,
-            stream_context_create(array(
-                self::WRAPPER_NAME => array(
-                    'string' => $ob
-                )
-            ))
-        );
-    }
-
-    /**
-     * @see streamWrapper::stream_open()
-     */
-    public function stream_open($path, $mode, $options, &$opened_path)
-    {
-        $opts = stream_context_get_options($this->context);
-
-        if (isset($opts[self::WRAPPER_NAME]['string'])) {
-            $this->_string =& $opts[self::WRAPPER_NAME]['string']->string;
-        } elseif (isset($opts['horde-string']['string'])) {
-            // @deprecated
-            $this->_string =& $opts['horde-string']['string']->getString();
-        } else {
-            throw new Exception('Use ' . __CLASS__ . '::getStream() to initialize the stream.');
-        }
-
-        if (is_null($this->_string)) {
-            return false;
-        }
-
-        $this->_pos = 0;
-
-        return true;
-    }
-
-    /**
-     * @see streamWrapper::stream_close()
-     */
-    public function stream_close()
-    {
-        $this->_string = '';
-        $this->_pos = 0;
-    }
-
-    /**
-     * @see streamWrapper::stream_read()
-     */
-    public function stream_read($count)
-    {
-        $curr = $this->_pos;
-        $this->_pos += $count;
-        return substr($this->_string, $curr, $count);
-    }
-
-    /**
-     * @see streamWrapper::stream_write()
-     */
-    public function stream_write($data)
-    {
-        $len = strlen($data);
-
-        $this->_string = substr_replace($this->_string, $data, $this->_pos, $len);
-        $this->_pos += $len;
-
-        return $len;
-    }
-
-    /**
-     * @see streamWrapper::stream_tell()
-     */
-    public function stream_tell()
-    {
-        return $this->_pos;
-    }
-
-    /**
-     * @see streamWrapper::stream_eof()
-     */
-    public function stream_eof()
-    {
-        return ($this->_pos > strlen($this->_string));
-    }
-
-    /**
-     * @see streamWrapper::stream_stat()
-     */
-    public function stream_stat()
-    {
-        return array(
-            'dev' => 0,
-            'ino' => 0,
-            'mode' => 0,
-            'nlink' => 0,
-            'uid' => 0,
-            'gid' => 0,
-            'rdev' => 0,
-            'size' => strlen($this->_string),
-            'atime' => 0,
-            'mtime' => 0,
-            'ctime' => 0,
-            'blksize' => 0,
-            'blocks' => 0
-        );
-    }
-
-    /**
-     * @see streamWrapper::stream_seek()
-     */
-    public function stream_seek($offset, $whence)
-    {
-        switch ($whence) {
-        case SEEK_SET:
-            $pos = $offset;
-            break;
-
-        case SEEK_CUR:
-            $pos = $this->_pos + $offset;
-            break;
-
-        case SEEK_END:
-            $pos = strlen($this->_string) + $offset;
-            break;
-        }
-
-        if (($pos < 0) || ($pos > strlen($this->_string))) {
-            return false;
-        }
-
-        $this->_pos = $pos;
-
-        return true;
-    }
-
-}
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.3/lib/Horde/Stream/Wrapper/StringStream.php 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/lib/Horde/Stream/Wrapper/StringStream.php
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.3/lib/Horde/Stream/Wrapper/StringStream.php	2016-02-02 09:34:09.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/lib/Horde/Stream/Wrapper/StringStream.php	1970-01-01 00:00:00.000000000 +0000
@@ -1,32 +0,0 @@
-<?php
-/**
- * Copyright 2007-2016 Horde LLC (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (BSD). If you
- * did not receive this file, see http://www.horde.org/licenses/bsd.
- *
- * @category  Horde
- * @copyright 2007-2016 Horde LLC
- * @license   http://www.horde.org/licenses/bsd BSD
- * @package   Stream_Wrapper
- */
-
-/**
- * Provides access to the StringStream stream wrapper.
- *
- * @author     Chuck Hagenbuch <chuck@horde.org>
- * @category   Horde
- * @copyright  2007-2016 Horde LLC
- * @deprecated Use Horde_Stream_Wrapper_String::getStream()
- * @license    http://www.horde.org/licenses/bsd BSD
- * @package    Stream_Wrapper
- */
-interface Horde_Stream_Wrapper_StringStream
-{
-    /**
-     * Return a reference to the wrapped string.
-     *
-     * @return string
-     */
-    public function &getString();
-}
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/AllTests.php 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/AllTests.php
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/AllTests.php	2016-02-02 09:34:09.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/AllTests.php	1970-01-01 00:00:00.000000000 +0000
@@ -1,3 +0,0 @@
-<?php
-require_once 'Horde/Test/AllTests.php';
-Horde_Test_AllTests::init(__FILE__)->run();
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/bootstrap.php 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/bootstrap.php
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/bootstrap.php	2016-02-02 09:34:09.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/bootstrap.php	1970-01-01 00:00:00.000000000 +0000
@@ -1,3 +0,0 @@
-<?php
-require_once 'Horde/Test/Bootstrap.php';
-Horde_Test_Bootstrap::bootstrap(dirname(__FILE__));
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/CombineTest.php 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/CombineTest.php
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/CombineTest.php	2016-02-02 09:34:09.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/CombineTest.php	1970-01-01 00:00:00.000000000 +0000
@@ -1,51 +0,0 @@
-<?php
-/**
- * Copyright 2009-2016 Horde LLC (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (BSD). If you
- * did not receive this file, see http://www.horde.org/licenses/bsd.
- *
- * @category   Horde
- * @copyright  2009-2016 Horde LLC
- * @license    http://www.horde.org/licenses/bsd BSD
- * @package    Stream_Wrapper
- * @subpackage UnitTests
- */
-
-/**
- * Tests for the Combine wrapper.
- *
- * @author     Michael Slusarz <slusarz@horde.org>
- * @category   Horde
- * @copyright  2009-2016 Horde LLC
- * @ignore
- * @license    http://www.horde.org/licenses/bsd BSD
- * @package    Stream_Wrapper
- * @subpackage UnitTests
- */
-class Horde_Stream_Wrapper_CombineTest extends PHPUnit_Framework_TestCase
-{
-    public function testUsage()
-    {
-        $fp = fopen('php://temp', 'r+');
-        fwrite($fp, '12345');
-
-        $data = array('ABCDE', $fp, 'fghij');
-
-        $stream = Horde_Stream_Wrapper_Combine::getStream($data);
-
-        $this->assertEquals('ABCDE12345fghij', fread($stream, 1024));
-        $this->assertEquals(true, feof($stream));
-        $this->assertEquals(0, fseek($stream, 0));
-        $this->assertEquals(-1, fseek($stream, 0));
-        $this->assertEquals(0, ftell($stream));
-        $this->assertEquals(0, fseek($stream, 5, SEEK_CUR));
-        $this->assertEquals(5, ftell($stream));
-        $this->assertEquals(10, fwrite($stream, '0000000000'));
-        $this->assertEquals(0, fseek($stream, 0, SEEK_END));
-        $this->assertEquals(20, ftell($stream));
-        $this->assertEquals(false, feof($stream));
-
-        fclose($stream);
-    }
-}
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/phpunit.xml 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/phpunit.xml
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/phpunit.xml	2016-02-02 09:34:09.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/phpunit.xml	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-<phpunit bootstrap="bootstrap.php"></phpunit>
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/StringTest.php 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/StringTest.php
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/StringTest.php	2016-02-02 09:34:09.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.3/test/Horde/Stream/Wrapper/StringTest.php	1970-01-01 00:00:00.000000000 +0000
@@ -1,66 +0,0 @@
-<?php
-/**
- * Copyright 2008-2016 Horde LLC (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (BSD). If you
- * did not receive this file, see http://www.horde.org/licenses/bsd.
- *
- * @category   Horde
- * @copyright  2008-2016 Horde LLC
- * @license    http://www.horde.org/licenses/bsd BSD
- * @package    Stream_Wrapper
- * @subpackage UnitTests
- */
-
-/**
- * Tests for the String wrapper.
- *
- * @author     Michael Slusarz <slusarz@horde.org>
- * @category   Horde
- * @copyright  2008-2016 Horde LLC
- * @ignore
- * @license    http://www.horde.org/licenses/bsd BSD
- * @package    Stream_Wrapper
- * @subpackage UnitTests
- */
-class Horde_Stream_Wrapper_StringTest extends PHPUnit_Framework_TestCase
-{
-    public function testUsage()
-    {
-        $string = 'ABCDE12345fghij';
-
-        $stream = Horde_Stream_Wrapper_String::getStream($string);
-
-        $this->assertEquals('ABCDE12345fghij', fread($stream, 1024));
-        $this->assertEquals(true, feof($stream));
-        $this->assertEquals(0, fseek($stream, 0));
-        $this->assertEquals(0, fseek($stream, 0));
-        $this->assertEquals(0, ftell($stream));
-        $this->assertEquals(0, fseek($stream, 5, SEEK_CUR));
-        $this->assertEquals(5, ftell($stream));
-        $this->assertEquals(10, fwrite($stream, '0000000000'));
-        $this->assertEquals(0, fseek($stream, 0, SEEK_END));
-        $this->assertEquals(15, ftell($stream));
-        $this->assertEquals(false, feof($stream));
-
-        fclose($stream);
-    }
-
-    public function testMemoryUsage()
-    {
-        $bytes = 1024 * 1024;
-        $string = str_repeat('*', $bytes);
-        $memoryUsage = memory_get_usage();
-
-        $stream = Horde_Stream_Wrapper_String::getStream($string);
-        $memoryUsage2 = memory_get_usage();
-        $this->assertLessThan($memoryUsage + $bytes, $memoryUsage2);
-
-        while (!feof($stream)) {
-            fread($stream, 1024);
-        }
-        $memoryUsage3 = memory_get_usage();
-        $this->assertLessThan($memoryUsage + $bytes, $memoryUsage3);
-    }
-
-}
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.4/doc/Horde/Stream/Wrapper/CHANGES 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/doc/Horde/Stream/Wrapper/CHANGES
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.4/doc/Horde/Stream/Wrapper/CHANGES	1970-01-01 00:00:00.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/doc/Horde/Stream/Wrapper/CHANGES	2018-01-25 19:58:47.000000000 +0000
@@ -0,0 +1,107 @@
+------
+v2.1.4
+------
+
+[jan] Fix deprecation warnings in PHP 7.2.
+
+
+
+------
+v2.1.3
+------
+
+[jan] Mark PHP 7 as supported.
+
+
+------
+v2.1.2
+------
+
+[mms] Fix possible infinite loop when reading from a combined stream.
+
+
+------
+v2.1.1
+------
+
+[jan] Improve PSR-2 compatibility.
+
+
+------
+v2.1.0
+------
+
+[mms] Add unit tests.
+[mms] Add Horde_Stream_Wrapper_Combine::getStream().
+[mms] Add Horde_Stream_Wrapper_String::getStream().
+[mms] Fix documentation regarding proper license for this package (BSD).
+
+
+------
+v2.0.1
+------
+
+[jan] Re-packaged 2.0.0 release.
+
+
+------
+v2.0.0
+------
+
+First stable release for Horde 5.
+
+
+-----------
+v2.0.0beta1
+-----------
+
+First beta release for Horde 5.
+
+
+------------
+v2.0.0alpha1
+------------
+
+First alpha release for Horde 5.
+
+
+------
+v1.0.1
+------
+
+[rla] Add license file.
+
+
+------
+v1.0.0
+------
+
+First stable release for Horde 4.
+
+
+---------
+v1.0.0RC2
+---------
+
+Second release candidate for Horde 4.
+
+
+---------
+v1.0.0RC1
+---------
+
+First release candidate for Horde 4.
+
+
+-----------
+v1.0.0beta1
+-----------
+
+First beta release for Horde 4.
+
+
+------------
+v1.0.0alpha1
+------------
+
+First alpha release for Horde 4.
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.4/doc/Horde/Stream/Wrapper/COPYING 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/doc/Horde/Stream/Wrapper/COPYING
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.4/doc/Horde/Stream/Wrapper/COPYING	1970-01-01 00:00:00.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/doc/Horde/Stream/Wrapper/COPYING	2018-01-25 19:58:47.000000000 +0000
@@ -0,0 +1,24 @@
+        Copyright 1999-2017 Horde LLC.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HORDE PROJECT
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.4/lib/Horde/Stream/Wrapper/Combine.php 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/lib/Horde/Stream/Wrapper/Combine.php
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.4/lib/Horde/Stream/Wrapper/Combine.php	1970-01-01 00:00:00.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/lib/Horde/Stream/Wrapper/Combine.php	2018-01-25 19:58:47.000000000 +0000
@@ -0,0 +1,315 @@
+<?php
+/**
+ * Copyright 2009-2017 Horde LLC (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (BSD). If you
+ * did not receive this file, see http://www.horde.org/licenses/bsd.
+ *
+ * @category  Horde
+ * @copyright 2009-2017 Horde LLC
+ * @license   http://www.horde.org/licenses/bsd BSD
+ * @package   Stream_Wrapper
+ */
+
+/**
+ * A stream wrapper that will combine multiple strings/streams into a single
+ * stream.
+ *
+ * @author    Michael Slusarz <slusarz@horde.org>
+ * @category  Horde
+ * @copyright 2009-2017 Horde LLC
+ * @license   http://www.horde.org/licenses/bsd BSD
+ * @package   Stream_Wrapper
+ */
+class Horde_Stream_Wrapper_Combine
+{
+    /**/
+    const WRAPPER_NAME = 'horde-stream-wrapper-combine';
+
+    /**
+     * Context.
+     *
+     * @var resource
+     */
+    public $context;
+
+    /**
+     * Array that holds the various streams.
+     *
+     * @var array
+     */
+    protected $_data = array();
+
+    /**
+     * The combined length of the stream.
+     *
+     * @var integer
+     */
+    protected $_length = 0;
+
+    /**
+     * The current position in the string.
+     *
+     * @var integer
+     */
+    protected $_position = 0;
+
+    /**
+     * The current position in the data array.
+     *
+     * @var integer
+     */
+    protected $_datapos = 0;
+
+    /**
+     * Have we reached EOF?
+     *
+     * @var boolean
+     */
+    protected $_ateof = false;
+
+    /**
+     * Unique ID tracker for the streams.
+     *
+     * @var integer
+     */
+    private static $_id = 0;
+
+    /**
+     * Create a stream from multiple data sources.
+     *
+     * @since 2.1.0
+     *
+     * @param array $data  An array of strings and/or streams to combine into
+     *                     a single stream.
+     *
+     * @return resource  A PHP stream.
+     */
+    public static function getStream($data)
+    {
+        if (!self::$_id) {
+            stream_wrapper_register(self::WRAPPER_NAME, __CLASS__);
+        }
+
+        return fopen(
+            self::WRAPPER_NAME . '://' . ++self::$_id,
+            'wb',
+            false,
+            stream_context_create(array(
+                self::WRAPPER_NAME => array(
+                    'data' => $data
+                )
+            ))
+        );
+    }
+    /**
+     * @see streamWrapper::stream_open()
+     *
+     * @param string $path
+     * @param string $mode
+     * @param integer $options
+     * @param string &$opened_path
+     *
+     * @throws Exception
+     */
+    public function stream_open($path, $mode, $options, &$opened_path)
+    {
+        $opts = stream_context_get_options($this->context);
+
+        if (isset($opts[self::WRAPPER_NAME]['data'])) {
+            $data = $opts[self::WRAPPER_NAME]['data'];
+        } elseif (isset($opts['horde-combine']['data'])) {
+            // @deprecated
+            $data = $opts['horde-combine']['data']->getData();
+        } else {
+            throw new Exception('Use ' . __CLASS__ . '::getStream() to initialize the stream.');
+        }
+
+        foreach ($data as $val) {
+            if (is_string($val)) {
+                $fp = fopen('php://temp', 'r+');
+                fwrite($fp, $val);
+            } else {
+                $fp = $val;
+            }
+
+            fseek($fp, 0, SEEK_END);
+            $length = ftell($fp);
+            rewind($fp);
+
+            $this->_data[] = array(
+                'fp' => $fp,
+                'l' => $length,
+                'p' => 0
+            );
+
+            $this->_length += $length;
+        }
+
+        return true;
+    }
+
+    /**
+     * @see streamWrapper::stream_read()
+     *
+     * @param integer $count
+     *
+     * @return mixed
+     */
+    public function stream_read($count)
+    {
+        if ($this->stream_eof()) {
+            return false;
+        }
+
+        $out = '';
+        $tmp = &$this->_data[$this->_datapos];
+
+        while ($count) {
+            if (!is_resource($tmp['fp'])) {
+                return false;
+            }
+
+            $curr_read = min($count, $tmp['l'] - $tmp['p']);
+            $out .= fread($tmp['fp'], $curr_read);
+            $count -= $curr_read;
+            $this->_position += $curr_read;
+
+            if ($this->_position == $this->_length) {
+                if ($count) {
+                    $this->_ateof = true;
+                    break;
+                } else {
+                    $tmp['p'] += $curr_read;
+                }
+            } elseif ($count) {
+                if (!isset($this->_data[++$this->_datapos])) {
+                    return false;
+                }
+                $tmp = &$this->_data[$this->_datapos];
+                rewind($tmp['fp']);
+                $tmp['p'] = 0;
+            } else {
+                $tmp['p'] += $curr_read;
+            }
+        }
+
+        return $out;
+    }
+
+    /**
+     * @see streamWrapper::stream_write()
+     *
+     * @param string $data
+     *
+     * @return integer
+     */
+    public function stream_write($data)
+    {
+        $tmp = &$this->_data[$this->_datapos];
+
+        $oldlen = $tmp['l'];
+        $res = fwrite($tmp['fp'], $data);
+        if ($res === false) {
+            return false;
+        }
+
+        $tmp['p'] = ftell($tmp['fp']);
+        if ($tmp['p'] > $oldlen) {
+            $tmp['l'] = $tmp['p'];
+            $this->_length += ($tmp['l'] - $oldlen);
+        }
+
+        return $res;
+    }
+
+    /**
+     * @see streamWrapper::stream_tell()
+     *
+     * @return integer
+     */
+    public function stream_tell()
+    {
+        return $this->_position;
+    }
+
+    /**
+     * @see streamWrapper::stream_eof()
+     *
+     * @return boolean
+     */
+    public function stream_eof()
+    {
+        return $this->_ateof;
+    }
+
+    /**
+     * @see streamWrapper::stream_stat()
+     *
+     * @return array
+     */
+    public function stream_stat()
+    {
+        return array(
+            'dev' => 0,
+            'ino' => 0,
+            'mode' => 0,
+            'nlink' => 0,
+            'uid' => 0,
+            'gid' => 0,
+            'rdev' => 0,
+            'size' => $this->_length,
+            'atime' => 0,
+            'mtime' => 0,
+            'ctime' => 0,
+            'blksize' => 0,
+            'blocks' => 0
+        );
+    }
+
+    /**
+     * @see streamWrapper::stream_seek()
+     *
+     * @param integer $offset
+     * @param integer $whence  SEEK_SET, SEEK_CUR, or SEEK_END
+     *
+     * @return boolean
+     */
+    public function stream_seek($offset, $whence)
+    {
+        $oldpos = $this->_position;
+        $this->_ateof = false;
+
+        switch ($whence) {
+        case SEEK_SET:
+            $offset = $offset;
+            break;
+
+        case SEEK_CUR:
+            $offset = $this->_position + $offset;
+            break;
+
+        case SEEK_END:
+            $offset = $this->_length + $offset;
+            break;
+
+        default:
+            return false;
+        }
+
+        $count = $this->_position = min($this->_length, $offset);
+
+        foreach ($this->_data as $key => $val) {
+            if ($count < $val['l']) {
+                $this->_datapos = $key;
+                $val['p'] = $count;
+                fseek($val['fp'], $count, SEEK_SET);
+                break;
+            }
+            $count -= $val['l'];
+        }
+
+        return ($oldpos != $this->_position);
+    }
+
+}
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.4/lib/Horde/Stream/Wrapper/CombineStream.php 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/lib/Horde/Stream/Wrapper/CombineStream.php
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.4/lib/Horde/Stream/Wrapper/CombineStream.php	1970-01-01 00:00:00.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/lib/Horde/Stream/Wrapper/CombineStream.php	2018-01-25 19:58:47.000000000 +0000
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Copyright 2009-2017 Horde LLC (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (BSD). If you
+ * did not receive this file, see http://www.horde.org/licenses/bsd.
+ *
+ * @category  Horde
+ * @copyright 2009-2017 Horde LLC
+ * @license   http://www.horde.org/licenses/bsd BSD
+ * @package   Stream_Wrapper
+ */
+
+/**
+ * Provides access to the CombineStream stream wrapper.
+ *
+ * @author     Michael Slusarz <slusarz@horde.org>
+ * @category   Horde
+ * @deprecated Use Horde_Stream_Wrapper_Combine::getStream()
+ * @copyright  2009-2016 Horde LLC
+ * @license    http://www.horde.org/licenses/bsd BSD
+ * @package    Stream_Wrapper
+ */
+interface Horde_Stream_Wrapper_CombineStream
+{
+    /**
+     * Return a reference to the data.
+     *
+     * @return array
+     */
+    public function getData();
+}
+
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.4/lib/Horde/Stream/Wrapper/String.php 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/lib/Horde/Stream/Wrapper/String.php
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.4/lib/Horde/Stream/Wrapper/String.php	1970-01-01 00:00:00.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/lib/Horde/Stream/Wrapper/String.php	2018-01-25 19:58:47.000000000 +0000
@@ -0,0 +1,211 @@
+<?php
+/**
+ * Copyright 2007-2017 Horde LLC (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (BSD). If you
+ * did not receive this file, see http://www.horde.org/licenses/bsd.
+ *
+ * @category  Horde
+ * @copyright 2007-2017 Horde LLC
+ * @license   http://www.horde.org/licenses/bsd BSD
+ * @package   Stream_Wrapper
+ */
+
+/**
+ * A stream wrapper that will treat a native PHP string as a stream.
+ *
+ * @author    Chuck Hagenbuch <chuck@horde.org>
+ * @author    Michael Slusarz <slusarz@horde.org>
+ * @category  Horde
+ * @copyright 2007-2017 Horde LLC
+ * @license   http://www.horde.org/licenses/bsd BSD
+ * @package   Stream_Wrapper
+ */
+class Horde_Stream_Wrapper_String
+{
+    /**/
+    const WRAPPER_NAME = 'horde-stream-wrapper-string';
+
+    /**
+     * The current context.
+     *
+     * @var resource
+     */
+    public $context;
+
+    /**
+     * String position.
+     *
+     * @var integer
+     */
+    protected $_pos;
+
+    /**
+     * The string.
+     *
+     * @var string
+     */
+    protected $_string;
+
+    /**
+     * Unique ID tracker for the streams.
+     *
+     * @var integer
+     */
+    private static $_id = 0;
+
+    /**
+     * Create a stream from a PHP string.
+     *
+     * @since 2.1.0
+     *
+     * @param string &$string  A PHP string variable.
+     *
+     * @return resource  A PHP stream pointing to the variable.
+     */
+    public static function getStream(&$string)
+    {
+        if (!self::$_id) {
+            stream_wrapper_register(self::WRAPPER_NAME, __CLASS__);
+        }
+
+        /* Needed to keep reference. */
+        $ob = new stdClass;
+        $ob->string = &$string;
+
+        return fopen(
+            self::WRAPPER_NAME . '://' . ++self::$_id,
+            'wb',
+            false,
+            stream_context_create(array(
+                self::WRAPPER_NAME => array(
+                    'string' => $ob
+                )
+            ))
+        );
+    }
+
+    /**
+     * @see streamWrapper::stream_open()
+     */
+    public function stream_open($path, $mode, $options, &$opened_path)
+    {
+        $opts = stream_context_get_options($this->context);
+
+        if (isset($opts[self::WRAPPER_NAME]['string'])) {
+            $this->_string =& $opts[self::WRAPPER_NAME]['string']->string;
+        } elseif (isset($opts['horde-string']['string'])) {
+            // @deprecated
+            $this->_string =& $opts['horde-string']['string']->getString();
+        } else {
+            throw new Exception('Use ' . __CLASS__ . '::getStream() to initialize the stream.');
+        }
+
+        if (is_null($this->_string)) {
+            return false;
+        }
+
+        $this->_pos = 0;
+
+        return true;
+    }
+
+    /**
+     * @see streamWrapper::stream_close()
+     */
+    public function stream_close()
+    {
+        $this->_string = '';
+        $this->_pos = 0;
+    }
+
+    /**
+     * @see streamWrapper::stream_read()
+     */
+    public function stream_read($count)
+    {
+        $curr = $this->_pos;
+        $this->_pos += $count;
+        return substr($this->_string, $curr, $count);
+    }
+
+    /**
+     * @see streamWrapper::stream_write()
+     */
+    public function stream_write($data)
+    {
+        $len = strlen($data);
+
+        $this->_string = substr_replace($this->_string, $data, $this->_pos, $len);
+        $this->_pos += $len;
+
+        return $len;
+    }
+
+    /**
+     * @see streamWrapper::stream_tell()
+     */
+    public function stream_tell()
+    {
+        return $this->_pos;
+    }
+
+    /**
+     * @see streamWrapper::stream_eof()
+     */
+    public function stream_eof()
+    {
+        return ($this->_pos > strlen($this->_string));
+    }
+
+    /**
+     * @see streamWrapper::stream_stat()
+     */
+    public function stream_stat()
+    {
+        return array(
+            'dev' => 0,
+            'ino' => 0,
+            'mode' => 0,
+            'nlink' => 0,
+            'uid' => 0,
+            'gid' => 0,
+            'rdev' => 0,
+            'size' => strlen($this->_string),
+            'atime' => 0,
+            'mtime' => 0,
+            'ctime' => 0,
+            'blksize' => 0,
+            'blocks' => 0
+        );
+    }
+
+    /**
+     * @see streamWrapper::stream_seek()
+     */
+    public function stream_seek($offset, $whence)
+    {
+        switch ($whence) {
+        case SEEK_SET:
+            $pos = $offset;
+            break;
+
+        case SEEK_CUR:
+            $pos = $this->_pos + $offset;
+            break;
+
+        case SEEK_END:
+            $pos = strlen($this->_string) + $offset;
+            break;
+        }
+
+        if (($pos < 0) || ($pos > strlen($this->_string))) {
+            return false;
+        }
+
+        $this->_pos = $pos;
+
+        return true;
+    }
+
+}
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.4/lib/Horde/Stream/Wrapper/StringStream.php 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/lib/Horde/Stream/Wrapper/StringStream.php
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.4/lib/Horde/Stream/Wrapper/StringStream.php	1970-01-01 00:00:00.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/lib/Horde/Stream/Wrapper/StringStream.php	2018-01-25 19:58:47.000000000 +0000
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Copyright 2007-2017 Horde LLC (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (BSD). If you
+ * did not receive this file, see http://www.horde.org/licenses/bsd.
+ *
+ * @category  Horde
+ * @copyright 2007-2017 Horde LLC
+ * @license   http://www.horde.org/licenses/bsd BSD
+ * @package   Stream_Wrapper
+ */
+
+/**
+ * Provides access to the StringStream stream wrapper.
+ *
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @copyright  2007-2016 Horde LLC
+ * @deprecated Use Horde_Stream_Wrapper_String::getStream()
+ * @license    http://www.horde.org/licenses/bsd BSD
+ * @package    Stream_Wrapper
+ */
+interface Horde_Stream_Wrapper_StringStream
+{
+    /**
+     * Return a reference to the wrapped string.
+     *
+     * @return string
+     */
+    public function &getString();
+}
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/AllTests.php 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/AllTests.php
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/AllTests.php	1970-01-01 00:00:00.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/AllTests.php	2018-01-25 19:58:47.000000000 +0000
@@ -0,0 +1,3 @@
+<?php
+require_once 'Horde/Test/AllTests.php';
+Horde_Test_AllTests::init(__FILE__)->run();
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/bootstrap.php 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/bootstrap.php
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/bootstrap.php	1970-01-01 00:00:00.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/bootstrap.php	2018-01-25 19:58:47.000000000 +0000
@@ -0,0 +1,3 @@
+<?php
+require_once 'Horde/Test/Bootstrap.php';
+Horde_Test_Bootstrap::bootstrap(dirname(__FILE__));
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/CombineTest.php 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/CombineTest.php
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/CombineTest.php	1970-01-01 00:00:00.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/CombineTest.php	2018-01-25 19:58:47.000000000 +0000
@@ -0,0 +1,51 @@
+<?php
+/**
+ * Copyright 2009-2017 Horde LLC (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (BSD). If you
+ * did not receive this file, see http://www.horde.org/licenses/bsd.
+ *
+ * @category   Horde
+ * @copyright  2009-2016 Horde LLC
+ * @license    http://www.horde.org/licenses/bsd BSD
+ * @package    Stream_Wrapper
+ * @subpackage UnitTests
+ */
+
+/**
+ * Tests for the Combine wrapper.
+ *
+ * @author     Michael Slusarz <slusarz@horde.org>
+ * @category   Horde
+ * @copyright  2009-2016 Horde LLC
+ * @ignore
+ * @license    http://www.horde.org/licenses/bsd BSD
+ * @package    Stream_Wrapper
+ * @subpackage UnitTests
+ */
+class Horde_Stream_Wrapper_CombineTest extends PHPUnit_Framework_TestCase
+{
+    public function testUsage()
+    {
+        $fp = fopen('php://temp', 'r+');
+        fwrite($fp, '12345');
+
+        $data = array('ABCDE', $fp, 'fghij');
+
+        $stream = Horde_Stream_Wrapper_Combine::getStream($data);
+
+        $this->assertEquals('ABCDE12345fghij', fread($stream, 1024));
+        $this->assertEquals(true, feof($stream));
+        $this->assertEquals(0, fseek($stream, 0));
+        $this->assertEquals(-1, fseek($stream, 0));
+        $this->assertEquals(0, ftell($stream));
+        $this->assertEquals(0, fseek($stream, 5, SEEK_CUR));
+        $this->assertEquals(5, ftell($stream));
+        $this->assertEquals(10, fwrite($stream, '0000000000'));
+        $this->assertEquals(0, fseek($stream, 0, SEEK_END));
+        $this->assertEquals(20, ftell($stream));
+        $this->assertEquals(false, feof($stream));
+
+        fclose($stream);
+    }
+}
diff -pruN 2.1.3-3/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/StringTest.php 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/StringTest.php
--- 2.1.3-3/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/StringTest.php	1970-01-01 00:00:00.000000000 +0000
+++ 2.1.4-0ubuntu2/Horde_Stream_Wrapper-2.1.4/test/Horde/Stream/Wrapper/StringTest.php	2018-01-25 19:58:47.000000000 +0000
@@ -0,0 +1,66 @@
+<?php
+/**
+ * Copyright 2008-2017 Horde LLC (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (BSD). If you
+ * did not receive this file, see http://www.horde.org/licenses/bsd.
+ *
+ * @category   Horde
+ * @copyright  2008-2016 Horde LLC
+ * @license    http://www.horde.org/licenses/bsd BSD
+ * @package    Stream_Wrapper
+ * @subpackage UnitTests
+ */
+
+/**
+ * Tests for the String wrapper.
+ *
+ * @author     Michael Slusarz <slusarz@horde.org>
+ * @category   Horde
+ * @copyright  2008-2016 Horde LLC
+ * @ignore
+ * @license    http://www.horde.org/licenses/bsd BSD
+ * @package    Stream_Wrapper
+ * @subpackage UnitTests
+ */
+class Horde_Stream_Wrapper_StringTest extends PHPUnit_Framework_TestCase
+{
+    public function testUsage()
+    {
+        $string = 'ABCDE12345fghij';
+
+        $stream = Horde_Stream_Wrapper_String::getStream($string);
+
+        $this->assertEquals('ABCDE12345fghij', fread($stream, 1024));
+        $this->assertEquals(true, feof($stream));
+        $this->assertEquals(0, fseek($stream, 0));
+        $this->assertEquals(0, fseek($stream, 0));
+        $this->assertEquals(0, ftell($stream));
+        $this->assertEquals(0, fseek($stream, 5, SEEK_CUR));
+        $this->assertEquals(5, ftell($stream));
+        $this->assertEquals(10, fwrite($stream, '0000000000'));
+        $this->assertEquals(0, fseek($stream, 0, SEEK_END));
+        $this->assertEquals(15, ftell($stream));
+        $this->assertEquals(false, feof($stream));
+
+        fclose($stream);
+    }
+
+    public function testMemoryUsage()
+    {
+        $bytes = 1024 * 1024;
+        $string = str_repeat('*', $bytes);
+        $memoryUsage = memory_get_usage();
+
+        $stream = Horde_Stream_Wrapper_String::getStream($string);
+        $memoryUsage2 = memory_get_usage();
+        $this->assertLessThan($memoryUsage + $bytes, $memoryUsage2);
+
+        while (!feof($stream)) {
+            fread($stream, 1024);
+        }
+        $memoryUsage3 = memory_get_usage();
+        $this->assertLessThan($memoryUsage + $bytes, $memoryUsage3);
+    }
+
+}
diff -pruN 2.1.3-3/package.xml 2.1.4-0ubuntu2/package.xml
--- 2.1.3-3/package.xml	2016-02-02 09:34:09.000000000 +0000
+++ 2.1.4-0ubuntu2/package.xml	2018-01-25 19:58:47.000000000 +0000
@@ -1,25 +1,25 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<package packagerversion="1.9.5" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
+<package packagerversion="1.10.4" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
  <name>Horde_Stream_Wrapper</name>
  <channel>pear.horde.org</channel>
- <summary>Horde Stream wrappers</summary>
+ <summary>PHP stream wrappers library</summary>
  <description>A collection of stream wrappers.</description>
  <lead>
   <name>Chuck Hagenbuch</name>
   <user>chuck</user>
   <email>chuck@horde.org</email>
-  <active>yes</active>
+  <active>no</active>
  </lead>
  <lead>
   <name>Michael Slusarz</name>
   <user>slusarz</user>
   <email>slusarz@horde.org</email>
-  <active>yes</active>
+  <active>no</active>
  </lead>
- <date>2016-02-02</date>
- <time>10:34:09</time>
+ <date>2018-01-25</date>
+ <time>20:58:47</time>
  <version>
-  <release>2.1.3</release>
+  <release>2.1.4</release>
   <api>2.1.0</api>
  </version>
  <stability>
@@ -28,20 +28,20 @@
  </stability>
  <license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
  <notes>
-* [jan] Mark PHP 7 as supported.
+* [jan] Fix deprecation warnings in PHP 7.2.
  </notes>
  <contents>
   <dir baseinstalldir="/" name="/">
-   <file baseinstalldir="/" md5sum="425de8dde3b52a0d47672110870d3c9a" name="doc/Horde/Stream/Wrapper/COPYING" role="doc" />
-   <file baseinstalldir="/" md5sum="f2b74085267b32f4bd6f040269179f4e" name="lib/Horde/Stream/Wrapper/Combine.php" role="php" />
-   <file baseinstalldir="/" md5sum="33ac5d0dc300f9162e69f2484472e318" name="lib/Horde/Stream/Wrapper/CombineStream.php" role="php" />
-   <file baseinstalldir="/" md5sum="0453de3bd748fcc89e561ca94169785a" name="lib/Horde/Stream/Wrapper/String.php" role="php" />
-   <file baseinstalldir="/" md5sum="afe5d8e27ad3d58ce81841285e5a0f76" name="lib/Horde/Stream/Wrapper/StringStream.php" role="php" />
+   <file baseinstalldir="/" md5sum="b25935eb4633b244f780c408f8417208" name="doc/Horde/Stream/Wrapper/CHANGES" role="doc" />
+   <file baseinstalldir="/" md5sum="2a04f5f8711df126853cc85948040277" name="doc/Horde/Stream/Wrapper/COPYING" role="doc" />
+   <file baseinstalldir="/" md5sum="0e3cd8a23d8d361be0e846f26c2b967b" name="lib/Horde/Stream/Wrapper/Combine.php" role="php" />
+   <file baseinstalldir="/" md5sum="61e73d99de6e9a5f21a9862596e39eec" name="lib/Horde/Stream/Wrapper/CombineStream.php" role="php" />
+   <file baseinstalldir="/" md5sum="44b080bd598a294b5060482622608f56" name="lib/Horde/Stream/Wrapper/String.php" role="php" />
+   <file baseinstalldir="/" md5sum="62723ce13931c5b25c84c8b0447d6bec" name="lib/Horde/Stream/Wrapper/StringStream.php" role="php" />
    <file baseinstalldir="/" md5sum="8bc9518b9c0576806c82d9413489d099" name="test/Horde/Stream/Wrapper/AllTests.php" role="test" />
    <file baseinstalldir="/" md5sum="0a5018f0726d4673850fece3ad4d72c0" name="test/Horde/Stream/Wrapper/bootstrap.php" role="test" />
-   <file baseinstalldir="/" md5sum="2148b2b61cee728abbe33371c6971711" name="test/Horde/Stream/Wrapper/CombineTest.php" role="test" />
-   <file baseinstalldir="/" md5sum="090ce475b8a9773a240e954334988c75" name="test/Horde/Stream/Wrapper/phpunit.xml" role="test" />
-   <file baseinstalldir="/" md5sum="ecd7543377ed05585993a22237c5240c" name="test/Horde/Stream/Wrapper/StringTest.php" role="test" />
+   <file baseinstalldir="/" md5sum="ffa727c70cad095beaea3ded7d6bf034" name="test/Horde/Stream/Wrapper/CombineTest.php" role="test" />
+   <file baseinstalldir="/" md5sum="8f9684a3693c915ab5db2728288a3698" name="test/Horde/Stream/Wrapper/StringTest.php" role="test" />
   </dir>
  </contents>
  <dependencies>
@@ -58,6 +58,7 @@
  </dependencies>
  <phprelease>
   <filelist>
+   <install as="CHANGES" name="doc/Horde/Stream/Wrapper/CHANGES" />
    <install as="COPYING" name="doc/Horde/Stream/Wrapper/COPYING" />
    <install as="Horde/Stream/Wrapper/Combine.php" name="lib/Horde/Stream/Wrapper/Combine.php" />
    <install as="Horde/Stream/Wrapper/CombineStream.php" name="lib/Horde/Stream/Wrapper/CombineStream.php" />
@@ -66,7 +67,6 @@
    <install as="Horde/Stream/Wrapper/AllTests.php" name="test/Horde/Stream/Wrapper/AllTests.php" />
    <install as="Horde/Stream/Wrapper/bootstrap.php" name="test/Horde/Stream/Wrapper/bootstrap.php" />
    <install as="Horde/Stream/Wrapper/CombineTest.php" name="test/Horde/Stream/Wrapper/CombineTest.php" />
-   <install as="Horde/Stream/Wrapper/phpunit.xml" name="test/Horde/Stream/Wrapper/phpunit.xml" />
    <install as="Horde/Stream/Wrapper/StringTest.php" name="test/Horde/Stream/Wrapper/StringTest.php" />
   </filelist>
  </phprelease>
@@ -284,5 +284,20 @@
 * [jan] Mark PHP 7 as supported.
    </notes>
   </release>
+  <release>
+   <version>
+    <release>2.1.4</release>
+    <api>2.1.0</api>
+   </version>
+   <stability>
+    <release>stable</release>
+    <api>stable</api>
+   </stability>
+   <date>2018-01-25</date>
+   <license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
+   <notes>
+* [jan] Fix deprecation warnings in PHP 7.2.
+   </notes>
+  </release>
  </changelog>
 </package>
