From 58b0fd3824ff263e90054496faa3c3c72d2f1434 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 25 Jan 2020 09:53:56 +0100 Subject: update to 2.8.1 switch to phpunit7 drop patch merged upstream --- 2.patch | 35 ----------------------------------- composer.json | 2 +- php-laminas-barcode.spec | 27 ++++++++++++++------------- 3 files changed, 15 insertions(+), 49 deletions(-) delete mode 100644 2.patch diff --git a/2.patch b/2.patch deleted file mode 100644 index 608ef25..0000000 --- a/2.patch +++ /dev/null @@ -1,35 +0,0 @@ -From c765b77757f5fff04998232fd45d401b48288102 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 2 Jan 2020 14:34:04 +0100 -Subject: [PATCH] Fix Invalid characters passed for attempted conversion (7.4) - ---- - src/Object/AbstractObject.php | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/Object/AbstractObject.php b/src/Object/AbstractObject.php -index a3b2d48..0fa2689 100644 ---- a/src/Object/AbstractObject.php -+++ b/src/Object/AbstractObject.php -@@ -429,8 +429,8 @@ public function getFactor() - */ - public function setForeColor($value) - { -- if (preg_match('`\#[0-9A-F]{6}`', $value)) { -- $this->foreColor = hexdec($value); -+ if (preg_match('`\#([0-9A-F]{6})`', $value, $reg)) { -+ $this->foreColor = hexdec($reg[1]); - } elseif (is_numeric($value) && $value >= 0 && $value <= 16777125) { - $this->foreColor = intval($value); - } else { -@@ -460,8 +460,8 @@ public function getForeColor() - */ - public function setBackgroundColor($value) - { -- if (preg_match('`\#[0-9A-F]{6}`', $value)) { -- $this->backgroundColor = hexdec($value); -+ if (preg_match('`\#([0-9A-F]{6})`', $value, $reg)) { -+ $this->backgroundColor = hexdec($reg[1]); - } elseif (is_numeric($value) && $value >= 0 && $value <= 16777125) { - $this->backgroundColor = intval($value); - } else { diff --git a/composer.json b/composer.json index 22cf779..eae4ed5 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "require-dev": { "laminas/laminas-coding-standard": "~1.0.0", "laminas/laminas-config": "^2.6 || ^3.1", - "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.5.20", "zendframework/zendpdf": "^2.0.2" }, "suggest": { diff --git a/php-laminas-barcode.spec b/php-laminas-barcode.spec index 089b2b0..27fa07c 100644 --- a/php-laminas-barcode.spec +++ b/php-laminas-barcode.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit 35fb88fd487324fd6fb6bb5c5385239ba023be64 +%global gh_commit 07f4fe97d79634e226795941a8b4217a2764534b %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner laminas %global gh_project laminas-barcode @@ -22,8 +22,8 @@ %endif Name: php-%{gh_project} -Version: 2.8.0 -Release: 2%{?dist} +Version: 2.8.1 +Release: 1%{?dist} Summary: %{namespace} Framework %{library} component License: BSD @@ -31,8 +31,6 @@ URL: https://github.com/%{gh_owner}/%{gh_project} Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh -Patch0: https://patch-diff.githubusercontent.com/raw/laminas/laminas-barcode/pull/2.patch - BuildArch: noarch # Tests %if %{with_tests} @@ -52,7 +50,7 @@ BuildRequires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 # From composer, "require-dev": { # "laminas/laminas-coding-standard": "~1.0.0", # "laminas/laminas-config": "^2.6 || ^3.1", -# "phpunit/phpunit": "^5.7.23 || ^6.4.3", +# "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.5.20", # "zendframework/zendpdf": "^2.0.2" BuildRequires: (php-autoloader(%{gh_owner}/laminas-config) >= 2.6 with php-autoloader(%{gh_owner}/laminas-config) < 4) BuildRequires: (php-autoloader(zendframework/zendpdf) >= 2.0.2 with php-autoloader(zendframework/zendpdf) < 3) @@ -65,8 +63,8 @@ BuildRequires: php-laminas-zendframework-bridge BuildRequires: php-laminas-config BuildRequires: php-zendframework-zendpdf %endif -%global phpunit %{_bindir}/phpunit6 -BuildRequires: phpunit6 >= 6.4.3 +%global phpunit %{_bindir}/phpunit7 +BuildRequires: phpunit7 >= 7.5.20 %endif # Autoloader BuildRequires: php-fedora-autoloader-devel @@ -107,8 +105,8 @@ Requires: php-spl Obsoletes: php-ZendFramework2-%{library} < 2.5 Provides: php-ZendFramework2-%{library} = %{version} # Compatibily ensure by the bridge -Obsoletes: php-zendframework-%{zf_name} < 2.8.0-99 -Provides: php-zendframework-%{zf_name} = %{version}-99 +Obsoletes: php-zendframework-%{zf_name} < 2.8.1 +Provides: php-zendframework-%{zf_name} = %{version} Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} Provides: php-composer(zendframework/%{zf_name}) = %{version} Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version} @@ -130,8 +128,6 @@ Documentation: https://docs.laminas.dev/%{gh_project}/ mv LICENSE.md LICENSE -%patch0 -p1 -b .pr2 - %build phpab --template fedora --output src/autoload.php src @@ -193,7 +189,7 @@ ret=0 for cmdarg in "php %{phpunit}" php72 php73 php74; do if which $cmdarg; then set $cmdarg - $1 ${2:-%{_bindir}/phpunit6} --verbose || ret=1 + $1 ${2:-%{_bindir}/phpunit7} --verbose || ret=1 fi done exit $ret @@ -213,6 +209,11 @@ exit $ret %changelog +* Sat Jan 25 2020 Remi Collet - 2.8.1-1 +- update to 2.8.1 +- switch to phpunit7 +- drop patch merged upstream + * Fri Jan 17 2020 Remi Collet - 2.8.0-2 - cleanup -- cgit