From cdc2bbf31a0c9c1c040cbe3f3e4265574400e46e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 1 Feb 2020 08:04:44 +0100 Subject: update to 4.3.0 raise dependency on PHP 7.1 raise dependency on sabre/xml 2.1 switch to phpunit8 --- composer.json | 12 +++++++++--- php-sabre-vobject4-autoload.php | 5 +---- php-sabre-vobject4-bin.patch | 22 ++++++++++------------ php-sabre-vobject4.spec | 38 ++++++++++++++++++++++++-------------- 4 files changed, 44 insertions(+), 33 deletions(-) diff --git a/composer.json b/composer.json index ad02687..9e522f8 100644 --- a/composer.json +++ b/composer.json @@ -32,12 +32,13 @@ "homepage" : "http://sabre.io/vobject/", "license" : "BSD-3-Clause", "require" : { - "php" : ">=5.5", + "php" : "^7.1", "ext-mbstring" : "*", - "sabre/xml" : ">=1.5 <3.0" + "sabre/xml" : "^2.1" }, "require-dev" : { - "phpunit/phpunit" : "> 4.8.35, <6.0.0" + "friendsofphp/php-cs-fixer": "~2.16.1", + "phpunit/phpunit" : "^7 || ^8" }, "suggest" : { "hoa/bench" : "If you would like to run the benchmark scripts" @@ -71,6 +72,11 @@ "Sabre\\VObject\\" : "lib/" } }, + "autoload-dev" : { + "psr-4" : { + "Sabre\\VObject\\" : "tests/VObject" + } + }, "bin" : [ "bin/vobject", "bin/generate_vcards" diff --git a/php-sabre-vobject4-autoload.php b/php-sabre-vobject4-autoload.php index 71664f5..57829aa 100644 --- a/php-sabre-vobject4-autoload.php +++ b/php-sabre-vobject4-autoload.php @@ -5,9 +5,6 @@ require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('Sabre\\VObject\\', __DIR__); \Fedora\Autoloader\Dependencies::required([ - [ - '/usr/share/php/Sabre/Xml2/autoload.php', - '/usr/share/php/Sabre/Xml/autoload.php', - ], + '/usr/share/php/Sabre/Xml2/autoload.php', ]); diff --git a/php-sabre-vobject4-bin.patch b/php-sabre-vobject4-bin.patch index e37bd2a..1a6b2ac 100644 --- a/php-sabre-vobject4-bin.patch +++ b/php-sabre-vobject4-bin.patch @@ -1,6 +1,6 @@ diff -up ./bin/generate_vcards.rpm ./bin/generate_vcards ---- ./bin/generate_vcards.rpm 2019-02-19 14:05:37.000000000 +0100 -+++ ./bin/generate_vcards 2019-02-20 07:21:38.282053251 +0100 +--- ./bin/generate_vcards.rpm 2020-01-31 19:50:58.000000000 +0100 ++++ ./bin/generate_vcards 2020-02-01 07:56:20.162307853 +0100 @@ -6,8 +6,7 @@ namespace Sabre\VObject; // This sucks.. we have to try to find the composer autoloader. But chances // are, we can't find it this way. So we'll do our bestest @@ -21,8 +21,8 @@ diff -up ./bin/generate_vcards.rpm ./bin/generate_vcards } diff -up ./bin/vobject.rpm ./bin/vobject ---- ./bin/vobject.rpm 2019-02-19 14:05:37.000000000 +0100 -+++ ./bin/vobject 2019-02-20 07:21:38.282053251 +0100 +--- ./bin/vobject.rpm 2020-01-31 19:50:58.000000000 +0100 ++++ ./bin/vobject 2020-02-01 07:56:20.162307853 +0100 @@ -6,8 +6,7 @@ namespace Sabre\VObject; // This sucks.. we have to try to find the composer autoloader. But chances // are, we can't find it this way. So we'll do our bestest @@ -43,8 +43,8 @@ diff -up ./bin/vobject.rpm ./bin/vobject } diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php ---- ./tests/bootstrap.php.rpm 2019-02-20 07:21:38.282053251 +0100 -+++ ./tests/bootstrap.php 2019-02-20 07:22:58.069649015 +0100 +--- ./tests/bootstrap.php.rpm 2020-01-31 19:50:58.000000000 +0100 ++++ ./tests/bootstrap.php 2020-02-01 07:57:56.802761882 +0100 @@ -3,8 +3,7 @@ date_default_timezone_set('UTC'); @@ -55,12 +55,10 @@ diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php ]; foreach ($try as $path) { -@@ -14,7 +13,7 @@ foreach ($try as $path) { +@@ -13,3 +12,6 @@ foreach ($try as $path) { + break; } } - --$autoLoader->addPsr4('Sabre\\VObject\\', __DIR__.'/VObject'); ++ +\Fedora\Autoloader\Autoload::addPsr4('Sabre\\VObject\\', __DIR__ . '/VObject'); - - if (!defined('SABRE_TEMPDIR')) { - define('SABRE_TEMPDIR', __DIR__.'/temp/'); ++ diff --git a/php-sabre-vobject4.spec b/php-sabre-vobject4.spec index 40985ec..082d8f4 100644 --- a/php-sabre-vobject4.spec +++ b/php-sabre-vobject4.spec @@ -10,7 +10,7 @@ # For compatibility with SCL %undefine __brp_mangle_shebangs -%global gh_commit 6d7476fbd227ae285029c19ad518cd451336038c +%global gh_commit 5b2248d965160f93053f3a24704794a13a22a1bb %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sabre-io %global gh_project vobject @@ -24,7 +24,7 @@ Name: php-sabre-vobject4 Summary: Library to parse and manipulate iCalendar and vCard objects -Version: 4.2.1 +Version: 4.3.0 Release: 1%{?dist} URL: http://sabre.io/vobject/ @@ -37,14 +37,14 @@ Patch0: %{name}-bin.patch BuildArch: noarch %if %{with_tests} -BuildRequires: php(language) >= 5.5 +BuildRequires: php(language) >= 7.1 BuildRequires: php-mbstring # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-composer(sabre/xml) >= 1.5 with php-composer(sabre/xml) < 3) +BuildRequires: (php-composer(sabre/xml) >= 2.1 with php-composer(sabre/xml) < 3) # remirepo:3 %else -BuildRequires: php-sabre-xml >= 1.5 +BuildRequires: php-sabre-xml2 >= 2.1 %endif BuildRequires: php-date BuildRequires: php-json @@ -52,25 +52,26 @@ BuildRequires: php-pcre BuildRequires: php-spl BuildRequires: php-xml # From composer.json, "require-dev" -# "phpunit/phpunit" : "> 4.8.35, <6.0.0" -BuildRequires: php-composer(phpunit/phpunit) > 4.8.35 +# "friendsofphp/php-cs-fixer": "~2.16.1", +# "phpunit/phpunit" : "^7 || ^8" +BuildRequires: phpunit8 # Autoloader BuildRequires: php-composer(fedora/autoloader) %endif # From composer.json, "require" -# "php" : ">=5.5", +# "php" : "^7.1", # "ext-mbstring" : "*", -# "sabre/xml" : ">=1.5 <3.0" -Requires: php(language) >= 5.5 +# "sabre/xml" : "^2.1" +Requires: php(language) >= 7.1 Requires: php-mbstring # # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-composer(sabre/xml) >= 1.5 with php-composer(sabre/xml) < 3) +Requires: (php-composer(sabre/xml) >= 2.1 with php-composer(sabre/xml) < 3) # remirepo:3 %else -Requires: php-sabre-xml >= 1.5 +Requires: php-sabre-xml2 >= 2.1 %endif # From phpcompatinfo report for version 4.1.2 %if %{with_cmd} @@ -137,9 +138,9 @@ fi : Run upstream test suite against installed library ret=0 -for cmd in php php71 php72 php73 php74; do +for cmd in php php72 php73 php74; do if which $cmd; then - $cmd %{_bindir}/phpunit $opt || ret=1 + $cmd %{_bindir}/phpunit8 $opt || ret=1 fi done exit $ret @@ -160,6 +161,15 @@ exit $ret %endif %changelog +* Sat Feb 1 2020 Remi Collet - 4.3.0-1 +- update to 4.3.0 +- raise dependency on PHP 7.1 +- raise dependency on sabre/xml 2.1 +- switch to phpunit8 + +* Tue Jan 14 2020 Remi Collet - 4.2.2-1 +- update to 4.2.2 + * Thu Dec 19 2019 Remi Collet - 4.2.1-1 - update to 4.2.1 - drop patch merged upstream -- cgit