summaryrefslogtreecommitdiffstats
path: root/php-theseer-fDOMDocument-pr29.patch
diff options
context:
space:
mode:
Diffstat (limited to 'php-theseer-fDOMDocument-pr29.patch')
-rw-r--r--php-theseer-fDOMDocument-pr29.patch116
1 files changed, 116 insertions, 0 deletions
diff --git a/php-theseer-fDOMDocument-pr29.patch b/php-theseer-fDOMDocument-pr29.patch
new file mode 100644
index 0000000..aa245ec
--- /dev/null
+++ b/php-theseer-fDOMDocument-pr29.patch
@@ -0,0 +1,116 @@
+From 419398ed434bb240487c42628a4bd30d6795ae81 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 14 Apr 2017 06:33:53 +0200
+Subject: [PATCH 1/2] fix (PHP 7.2) count(): Parameter must be an array or an
+ object that implements Countable
+
+---
+ src/XPathQuery.php | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/XPathQuery.php b/src/XPathQuery.php
+index ab7e3a9..cd661ad 100644
+--- a/src/XPathQuery.php
++++ b/src/XPathQuery.php
+@@ -191,7 +191,7 @@ private function getXPathObjectFor(\DOMNode $ctx) {
+ */
+ private function buildQuery(fDOMXPath $xp, array $values = NULL) {
+ $backup = $this->values;
+- if (count($values) > 0) {
++ if (is_array($values) && count($values) > 0) {
+ foreach($values as $k => $v) {
+ $this->bind($k, $v);
+ }
+
+From c8069cbd0032a476a04c9147e89c8c015a7dd5de Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 14 Apr 2017 06:34:06 +0200
+Subject: [PATCH 2/2] allow modern PHPUnit
+
+---
+ tests/Translator.test.php | 2 +-
+ tests/XPathQuery.test.php | 2 +-
+ tests/fDOMDocument.test.php | 2 +-
+ tests/fDOMDocumentFragment.test.php | 2 +-
+ tests/fDOMElement.test.php | 2 +-
+ tests/fDOMXPath.test.php | 2 +-
+ 6 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/tests/Translator.test.php b/tests/Translator.test.php
+index 2152238..0c10cb1 100644
+--- a/tests/Translator.test.php
++++ b/tests/Translator.test.php
+@@ -4,7 +4,7 @@
+
+ use TheSeer\fDOM\CSS\Translator;
+
+- class TranslatorTest extends \PHPUnit_Framework_TestCase {
++ class TranslatorTest extends \PHPUnit\Framework\TestCase {
+
+ /**
+ * @dataProvider provider
+diff --git a/tests/XPathQuery.test.php b/tests/XPathQuery.test.php
+index fb0aeae..3bed435 100644
+--- a/tests/XPathQuery.test.php
++++ b/tests/XPathQuery.test.php
+@@ -44,7 +44,7 @@
+ use TheSeer\fDOM\XPathQuery;
+ use TheSeer\fDOM\fDOMDocument;
+
+- class XPathQueryTest extends \PHPUnit_Framework_TestCase {
++ class XPathQueryTest extends \PHPUnit\Framework\TestCase {
+
+ private $dom;
+
+diff --git a/tests/fDOMDocument.test.php b/tests/fDOMDocument.test.php
+index b7392d8..fd5c08f 100644
+--- a/tests/fDOMDocument.test.php
++++ b/tests/fDOMDocument.test.php
+@@ -48,7 +48,7 @@
+ * @author Arne Blankerts <arne@blankerts.de>
+ * @copyright Arne Blankerts <arne@blankerts.de>, All rights reserved.
+ */
+- class fDOMDocumentTest extends \PHPUnit_Framework_TestCase {
++ class fDOMDocumentTest extends \PHPUnit\Framework\TestCase {
+
+ /**
+ * @var fDOMDocument
+diff --git a/tests/fDOMDocumentFragment.test.php b/tests/fDOMDocumentFragment.test.php
+index 1f2fcf3..d524bfe 100644
+--- a/tests/fDOMDocumentFragment.test.php
++++ b/tests/fDOMDocumentFragment.test.php
+@@ -49,7 +49,7 @@
+ * @author Arne Blankerts <arne@blankerts.de>
+ * @copyright Arne Blankerts <arne@blankerts.de>, All rights reserved.
+ */
+- class fDOMDocumentFragmentTest extends \PHPUnit_Framework_TestCase {
++ class fDOMDocumentFragmentTest extends \PHPUnit\Framework\TestCase {
+
+ /**
+ * @var fDOMDocument
+diff --git a/tests/fDOMElement.test.php b/tests/fDOMElement.test.php
+index b7ae9b3..0e6a11c 100644
+--- a/tests/fDOMElement.test.php
++++ b/tests/fDOMElement.test.php
+@@ -49,7 +49,7 @@
+ * @author Arne Blankerts <arne@blankerts.de>
+ * @copyright Arne Blankerts <arne@blankerts.de>, All rights reserved.
+ */
+- class fDOMElementTest extends \PHPUnit_Framework_TestCase {
++ class fDOMElementTest extends \PHPUnit\Framework\TestCase {
+
+ /**
+ * @var fDOMDocument
+diff --git a/tests/fDOMXPath.test.php b/tests/fDOMXPath.test.php
+index ce91e13..2504a75 100644
+--- a/tests/fDOMXPath.test.php
++++ b/tests/fDOMXPath.test.php
+@@ -49,7 +49,7 @@
+ * @author Arne Blankerts <arne@blankerts.de>
+ * @copyright Arne Blankerts <arne@blankerts.de>, All rights reserved.
+ */
+- class fDOMXPathTest extends \PHPUnit_Framework_TestCase {
++ class fDOMXPathTest extends \PHPUnit\Framework\TestCase {
+
+ /**
+ * @var TheSeer\fDOM\fDOMDocument