diff --git a/.gitignore b/.gitignore index 9b6c76f..945e349 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /php-masterminds-html5-2.2.2-7866e93dcf0245de22378414e0c2c7350abc45af.tar.gz /php-masterminds-html5-2.3.0-2c37c6c520b995b761674de3be8455a381679067.tar.gz /php-masterminds-html5-2.6.0-c961ca6a0a81dc6b55b6859b3f9ea7f402edf9ad.tar.gz +/php-masterminds-html5-2.7.0-104443ad663d15981225f99532ba73c2f1d6b6f2.tar.gz diff --git a/170.patch b/170.patch new file mode 100644 index 0000000..076b8d4 --- /dev/null +++ b/170.patch @@ -0,0 +1,23 @@ +From 70d36f21e9223cad511dbc149c299b1143d264e4 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Fri, 11 Oct 2019 10:30:57 +0200 +Subject: [PATCH] Fix Trying to access array offset on value of type null + +--- + test/HTML5/Parser/TokenizerTest.php | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/test/HTML5/Parser/TokenizerTest.php b/test/HTML5/Parser/TokenizerTest.php +index 153dd23..6c90686 100644 +--- a/test/HTML5/Parser/TokenizerTest.php ++++ b/test/HTML5/Parser/TokenizerTest.php +@@ -26,7 +26,8 @@ public function assertEventEquals($type, $expects, $event) + if (is_array($expects)) { + $this->assertEquals($expects, $event['data'], "Event $type should equal " . print_r($expects, true) . ': ' . print_r($event, true)); + } else { +- $this->assertEquals($expects, $event['data'][0], "Event $type should equal $expects: " . print_r($event, true)); ++ $d = (is_array($event['data']) ? $event['data'][0] : null); ++ $this->assertEquals($expects, $d, "Event $type should equal $expects: " . print_r($event, true)); + } + } + diff --git a/php-masterminds-html5.spec b/php-masterminds-html5.spec index 381dce4..42d8312 100644 --- a/php-masterminds-html5.spec +++ b/php-masterminds-html5.spec @@ -11,8 +11,8 @@ %global github_owner Masterminds %global github_name html5-php -%global github_version 2.6.0 -%global github_commit c961ca6a0a81dc6b55b6859b3f9ea7f402edf9ad +%global github_version 2.7.0 +%global github_commit 104443ad663d15981225f99532ba73c2f1d6b6f2 %global composer_vendor masterminds %global composer_project html5 @@ -27,13 +27,15 @@ Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 2%{?dist} +Release: 1%{?dist} Summary: An HTML5 parser and serializer License: MIT URL: http://masterminds.github.io/html5-php Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz +Patch0: https://patch-diff.githubusercontent.com/raw/Masterminds/html5-php/pull/170.patch + BuildArch: noarch # Autoload generation BuildRequires: %{_bindir}/phpab @@ -44,7 +46,7 @@ BuildRequires: php(language) >= %{php_min_ver} BuildRequires: php-composer(phpunit/phpunit) >= 4.8.35 BuildRequires: php-ctype BuildRequires: php-dom -## phpcompatinfo (computed from version 2.6.0) +## phpcompatinfo (computed from version 2.7.0) BuildRequires: php-iconv BuildRequires: php-json BuildRequires: php-mbstring @@ -55,13 +57,14 @@ BuildRequires: php-spl # composer.json Requires: php(language) >= %{php_min_ver} -# phpcompatinfo (computed from version 2.6.0) Requires: php-ctype Requires: php-dom +# phpcompatinfo (computed from version 2.7.0) Requires: php-iconv Requires: php-mbstring Requires: php-pcre Requires: php-spl +# notice: xml only detected for utf8_decode # Composer Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} @@ -81,6 +84,7 @@ refactoring work, we began a new parser. %prep %setup -qn %{github_name}-%{github_commit} +%patch0 -p1 -b .pr170 : Docs mkdir -p docs/{Parser,Serializer} @@ -119,7 +123,7 @@ AUTOLOAD : Upstream tests RETURN_CODE=0 PHPUNIT=$(which phpunit) -for PHP_EXEC in "" %{?rhel:php54 php55} php56 php70 php71 php72; do +for PHP_EXEC in "" %{?rhel:php54 php55 php56 php70} php71 php72 php73 php74; do if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then $PHP_EXEC $PHPUNIT --verbose || RETURN_CODE=1 fi @@ -138,6 +142,11 @@ exit $RETURN_CODE %changelog +* Fri Oct 11 2019 Remi Collet - 2.7.0-1 +- update to 2.7.0 +- add patch for PHP 7.4 from + https://github.com/Masterminds/html5-php/pull/170 + * Fri Jul 26 2019 Fedora Release Engineering - 2.6.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index e987697..891e5cc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-masterminds-html5-2.6.0-c961ca6a0a81dc6b55b6859b3f9ea7f402edf9ad.tar.gz) = aeb8ea8da66f0396292725809df10392858e28cb87d8787837576e1ef6040e0f2757fb370a9f9035adb806687c8b7f38563d02d99019b9f347edb7bfb0061e1c +SHA512 (php-masterminds-html5-2.7.0-104443ad663d15981225f99532ba73c2f1d6b6f2.tar.gz) = 1d2cf668e67dcdbab54c2cdfba5f23214a0cdc2e4a47bd202da912c99a4aed2ff5db329c4a167dc9b2859e59ac3afcae7b64e3874050bdc5f2712eca88f01448