diff options
author | Remi Collet <remi@remirepo.net> | 2019-09-02 08:17:38 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2019-09-02 08:17:38 +0200 |
commit | 00d6bdfe5ef93254ad5280d36a6191036414d35e (patch) | |
tree | 195a6560f7d1454c183fbaa28d5995164195a4c8 | |
parent | c56ef3a3738d9b6bd35faa88eadac5d1381e9796 (diff) |
add patch for PHP 7.4 from https://github.com/zendframework/zend-code/pull/172
-rw-r--r-- | 172.patch | 22 | ||||
-rw-r--r-- | php-zendframework-zend-code.spec | 12 |
2 files changed, 30 insertions, 4 deletions
diff --git a/172.patch b/172.patch new file mode 100644 index 0000000..bbb7a5f --- /dev/null +++ b/172.patch @@ -0,0 +1,22 @@ +From 7ddf14410504ca980a421a24a66182dc852a3780 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Mon, 2 Sep 2019 08:12:46 +0200 +Subject: [PATCH] fix Trying to access array offset on value of type nul (7.4) + +--- + src/Scanner/MethodScanner.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Scanner/MethodScanner.php b/src/Scanner/MethodScanner.php +index 36542028..4eaa01c4 100644 +--- a/src/Scanner/MethodScanner.php ++++ b/src/Scanner/MethodScanner.php +@@ -452,7 +452,7 @@ protected function scan() + $tokenType = null; + $tokenContent = $token; + $tokenLine = $tokenLine + substr_count( +- $lastTokenArray[1], ++ $lastTokenArray[1] ?? null, + "\n" + ); // adjust token line by last known newline count + } else { diff --git a/php-zendframework-zend-code.spec b/php-zendframework-zend-code.spec index 3324a3c..63eb84a 100644 --- a/php-zendframework-zend-code.spec +++ b/php-zendframework-zend-code.spec @@ -21,7 +21,7 @@ Name: php-%{gh_owner}-%{gh_project} Version: 3.3.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Zend Framework %{library} component License: BSD @@ -29,6 +29,8 @@ URL: https://zendframework.github.io/%{gh_project}/ Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh +Patch0: https://patch-diff.githubusercontent.com/raw/zendframework/zend-code/pull/172.patch + BuildArch: noarch # Tests %if %{with_tests} @@ -108,6 +110,7 @@ Documentation: https://zendframework.github.io/%{gh_project}/ %prep %setup -q -n %{gh_project}-%{gh_commit} +%patch0 -p1 mv LICENSE.md LICENSE @@ -141,8 +144,7 @@ require_once '%{buildroot}%{php_home}/Zend/%{library}/autoload.php'; EOF ret=0 -# TODO 7.4 Trying to access array offset on value of type null -for cmd in php php71 php72 php73; do +for cmd in php php71 php72 php73 php74; do if which $cmd; then $cmd %{_bindir}/phpunit7 --verbose || ret=1 fi @@ -162,10 +164,12 @@ exit $ret %changelog -* Mon Sep 2 2019 Remi Collet <remi@remirepo.net> - 3.3.2-1 +* Mon Sep 2 2019 Remi Collet <remi@remirepo.net> - 3.3.2-2 - update to 3.3.2 - use phpunit7 - use range dependencies +- add patch for PHP 7.4 from + https://github.com/zendframework/zend-code/pull/172 * Mon Aug 20 2018 Remi Collet <remi@remirepo.net> - 3.3.1-1 - update to 3.3.1 |