Package: php-net-imap
Version: 1:1.1.3-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu xenial ubuntu-patch
Hi Dario,
The php-net-imap package uses an old-style, PHP4 class constructor. This
results in a deprecation warning, which among other things causes the
php-horde-kolab-storage package to fail its autopkgtests.
Attached is a patch that updates php-net-imap to the current supported style
of constructor ('__construct()').
Thanks for considering the patch.
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
[email protected] [email protected]
diff -Nru php-net-imap-1.1.3/debian/patches/php7-constructors.patch php-net-imap-1.1.3/debian/patches/php7-constructors.patch
--- php-net-imap-1.1.3/debian/patches/php7-constructors.patch 1969-12-31 16:00:00.000000000 -0800
+++ php-net-imap-1.1.3/debian/patches/php7-constructors.patch 2016-03-26 17:15:26.000000000 -0700
@@ -0,0 +1,17 @@
+Description: Support php7-style constructors
+ Constructors with the same name as the class are deprecated in php7.
+ Update to the new style __construct() for compatibility.
+Author: Steve Langasek <[email protected]>
+Index: php-net-imap-1.1.3/Net_IMAP-1.1.3/Net/IMAP.php
+===================================================================
+--- php-net-imap-1.1.3.orig/Net_IMAP-1.1.3/Net/IMAP.php
++++ php-net-imap-1.1.3/Net_IMAP-1.1.3/Net/IMAP.php
+@@ -43,7 +43,7 @@
+ * @param bool $enableSTARTTLS Enable STARTTLS support
+ * @param string $encoding Character encoding
+ */
+- function Net_IMAP($host = 'localhost',
++ function __construct($host = 'localhost',
+ $port = 143,
+ $enableSTARTTLS = true,
+ $encoding = 'ISO-8859-1')
diff -Nru php-net-imap-1.1.3/debian/patches/series php-net-imap-1.1.3/debian/patches/series
--- php-net-imap-1.1.3/debian/patches/series 2014-04-06 06:23:31.000000000 -0700
+++ php-net-imap-1.1.3/debian/patches/series 2016-03-26 17:13:18.000000000 -0700
@@ -0,0 +1 @@
+php7-constructors.patch