--- /dev/null
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit php-pear-r2 vcs-snapshot
+
+SRC_URI="https://github.com/pear/Text_Wiki_Mediawiki/archive/11a902741d3f8cc6010fb97b825d66345143e4dc.tar.gz -> ${PEAR_P}.tar.gz"
+DESCRIPTION="Mediawiki parser for Text_Wiki"
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="test"
+RDEPEND=">=dev-php/PEAR-Text_Wiki-1.2.2_p20170904"
+DEPEND="test? ( ${RDEPEND} dev-php/phpunit )"
+PATCHES=( "${FILESDIR}/0.2.0-constructor.patch" )
+
+src_test() {
+ phpunit tests/Text_Wiki_Parse_Mediawiki_Test.php || die
+}
+
+src_install() {
+ php-pear-r2_src_install
+ insinto /usr/share/php/.packagexml
+ newins package.xml "${PEAR_P}.xml"
+}
--- /dev/null
+diff -aurN a/Text/Wiki/Mediawiki.php b/Text/Wiki/Mediawiki.php
+--- a/Text/Wiki/Mediawiki.php 2014-06-04 23:24:45.000000000 -0400
++++ b/Text/Wiki/Mediawiki.php 2018-02-14 13:36:18.777893414 -0500
+@@ -87,7 +87,7 @@
+ * @param array $rules The set of rules to load for this object.
+ */
+ function __construct($rules = null) {
+- parent::Text_Wiki($rules);
++ parent::__construct($rules);
+ $this->addPath('parse', $this->fixPath(dirname(__FILE__)).'Parse/Mediawiki');
+ }
+ }
+diff -aurN a/Text/Wiki/Parse/Mediawiki/Url.php b/Text/Wiki/Parse/Mediawiki/Url.php
+--- a/Text/Wiki/Parse/Mediawiki/Url.php 2014-06-04 23:24:45.000000000 -0400
++++ b/Text/Wiki/Parse/Mediawiki/Url.php 2018-02-14 13:40:21.974024459 -0500
+@@ -87,7 +87,7 @@
+ */
+ function __construct(&$obj)
+ {
+- parent::Text_Wiki_Parse($obj);
++ parent::__construct($obj);
+
+ // convert the list of recognized schemes to a regex-safe string,
+ // where the pattern delim is a slash
+diff -aurN a/Text/Wiki/Parse/Mediawiki/Wikilink.php b/Text/Wiki/Parse/Mediawiki/Wikilink.php
+--- a/Text/Wiki/Parse/Mediawiki/Wikilink.php 2014-06-04 23:24:45.000000000 -0400
++++ b/Text/Wiki/Parse/Mediawiki/Wikilink.php 2018-02-14 13:40:46.030542359 -0500
+@@ -99,7 +99,7 @@
+ function __construct(&$obj)
+ {
+ $default = $this->conf;
+- parent::Text_Wiki_Parse($obj);
++ parent::__construct($obj);
+
+ // override config options for image if specified
+ if (in_array('Image', $this->wiki->disable)) {