summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-04-29 10:33:52 +0200
committerRemi Collet <remi@remirepo.net>2020-04-29 10:33:52 +0200
commit082108d4c8055b0652b209e330748eb3f1364424 (patch)
treed333ad750dcace8e9b7a3c96cf5a56297667d7b4
parent064b8e28291c081076126e70eae57efad424a8a7 (diff)
update to 5.2.2
fix test suite for PHP 7.4 using patch from https://github.com/llaville/php-compat-info/pull/261
-rw-r--r--261.patch22
-rw-r--r--php-bartlett-PHP-CompatInfo-5.2.2-rpm.patch (renamed from php-bartlett-PHP-CompatInfo-5.2.1-rpm.patch)2
-rw-r--r--php-bartlett-PHP-CompatInfo.spec17
3 files changed, 35 insertions, 6 deletions
diff --git a/261.patch b/261.patch
new file mode 100644
index 0000000..a85df82
--- /dev/null
+++ b/261.patch
@@ -0,0 +1,22 @@
+From 19098e5772eb4ad87cdc2ebcb94b3fdca39c0887 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 29 Apr 2020 10:25:46 +0200
+Subject: [PATCH] fix curly braces is deprecated
+
+---
+ src/Bartlett/CompatInfo/Sniffs/PHP/DocStringSyntaxSniff.php | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Bartlett/CompatInfo/Sniffs/PHP/DocStringSyntaxSniff.php b/src/Bartlett/CompatInfo/Sniffs/PHP/DocStringSyntaxSniff.php
+index ec0e33a6..dc1e31ad 100644
+--- a/src/Bartlett/CompatInfo/Sniffs/PHP/DocStringSyntaxSniff.php
++++ b/src/Bartlett/CompatInfo/Sniffs/PHP/DocStringSyntaxSniff.php
+@@ -100,7 +100,7 @@ protected function isHeredocSyntax($node)
+ {
+ $i = $node->getAttribute('startTokenPos');
+ return (strpos($this->tokens[$i][1], "<<<") === 0
+- && $this->tokens[$i][1]{3} !== "'"
++ && $this->tokens[$i][1][3] !== "'"
+ );
+ }
+
diff --git a/php-bartlett-PHP-CompatInfo-5.2.1-rpm.patch b/php-bartlett-PHP-CompatInfo-5.2.2-rpm.patch
index e7ed3f5..2c9d19d 100644
--- a/php-bartlett-PHP-CompatInfo-5.2.1-rpm.patch
+++ b/php-bartlett-PHP-CompatInfo-5.2.2-rpm.patch
@@ -70,6 +70,6 @@ diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo
Environment::setScanDir();
--$application = new Application($appName, '5.2.1');
+-$application = new Application($appName, '5.2.2');
+$application = new Application($appName, '@package_version@');
$application->run();
diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec
index 4325ee6..5ccfaa0 100644
--- a/php-bartlett-PHP-CompatInfo.spec
+++ b/php-bartlett-PHP-CompatInfo.spec
@@ -11,7 +11,7 @@
%undefine __brp_mangle_shebangs
%{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)}
-%global gh_commit 287d879f1b85f49faffdca89088a6b7bffb535d9
+%global gh_commit de5add0eae4774e5832259ebef3f6223ca23a5e1
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20151005
%global gh_owner llaville
@@ -26,7 +26,7 @@
%endif
Name: php-bartlett-PHP-CompatInfo
-Version: 5.2.1
+Version: 5.2.2
%global specrel 1
Release: %{?gh_date:1%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist}
Summary: Find out version and the extensions required for a piece of code to run
@@ -42,7 +42,9 @@ Source1: fedora-review-check
Source2: %{name}-5.1.0-autoload.php
# Autoload and sqlite database path
-Patch0: %{name}-5.2.1-rpm.patch
+Patch0: %{name}-5.2.2-rpm.patch
+
+Patch1: https://patch-diff.githubusercontent.com/raw/llaville/php-compat-info/pull/261.patch
BuildArch: noarch
BuildRequires: php(language) >= 5.5
@@ -150,7 +152,7 @@ Documentation: http://php5.laurent-laville.org/compatinfo/manual/current/en/
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-#setup -q -n %{gh_project}-%{version}
+%patch1 -p1
%patch0 -p1 -b .rpm
cp %{SOURCE2} src/Bartlett/CompatInfo/autoload.php
@@ -185,7 +187,7 @@ ln -s %{buildroot}%{_datadir}/php/Bartlett/CompatInfo/autoload.php vendor/
ret=0
-for cmdarg in "php %{phpunit}" "php70 %{_bindir}/phpunit" php71 php72 php73 php74; do
+for cmdarg in "php %{phpunit}" php72 php73 php74 php80; do
if which $cmdarg; then
set $cmdarg
$1 ${2:-%{_bindir}/phpunit7} \
@@ -216,6 +218,11 @@ fi
%changelog
+* Wed Apr 29 2020 Remi Collet <remi@remirepo.net> - 5.2.2-1
+- update to 5.2.2
+- fix test suite for PHP 7.4 using patch from
+ https://github.com/llaville/php-compat-info/pull/261
+
* Tue Oct 22 2019 Remi Collet <remi@remirepo.net> - 5.2.1-1
- update to 5.2.1 (no change)