diff options
| -rw-r--r-- | 17.patch | 23 | ||||
| -rw-r--r-- | php-opencloud.spec | 13 | 
2 files changed, 34 insertions, 2 deletions
diff --git a/17.patch b/17.patch new file mode 100644 index 0000000..d60dbef --- /dev/null +++ b/17.patch @@ -0,0 +1,23 @@ +From 84ef9af3c437cf173afe2a5f7c0f9ce1b17529d4 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Thu, 2 Nov 2017 16:18:43 +0100 +Subject: [PATCH] Fix count(): Parameter must be an array or an object that + implements Countable ... + +--- + src/JsonPatch.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/JsonPatch.php b/src/JsonPatch.php +index d180e5a..f77192c 100644 +--- a/src/JsonPatch.php ++++ b/src/JsonPatch.php +@@ -261,7 +261,7 @@ private static function is_index($part) +   private static function diff_values($path, $value, $other) +   { +     // manually handle the {}-looks-like-[] case, when other is associative +-    if ((count($value) == 0 || count($other) == 0) ++    if ((!$value || !$other) +         && (self::is_associative($value) || self::is_associative($other))) +     { +       return self::diff_assoc($path, $value, $other); diff --git a/php-opencloud.spec b/php-opencloud.spec index f8a607b..e3ccd00 100644 --- a/php-opencloud.spec +++ b/php-opencloud.spec @@ -49,7 +49,7 @@  Name:          php-opencloud  Version:       %{github_version} -Release:       2%{?github_release}%{?dist} +Release:       4%{?github_release}%{?dist}  Summary:       PHP SDK for OpenStack/Rackspace APIs  Group:         Development/Libraries @@ -60,6 +60,8 @@ Source0:       https://github.com/%{github_owner}/%{github_name}/archive/%{githu  # Bundled: php-composer(mikemccabe/json-patch-php)  Source1:       https://github.com/%{mikemccabe_json_patch_php_github_owner}/%{mikemccabe_json_patch_php_github_name}/archive/%{mikemccabe_json_patch_php_github_commit}/%{name}-mikemccabe-json-patch-php-%{mikemccabe_json_patch_php_github_version}-%{mikemccabe_json_patch_php_github_commit}.tar.gz +Patch0:        https://patch-diff.githubusercontent.com/raw/mikemccabe/json-patch-php/pull/17.patch +  BuildArch:     noarch  # Tests  %if %{with_tests} @@ -128,6 +130,9 @@ Documentation for PHP SDK for OpenStack/Rackspace APIs.  %prep  %setup -qn %{github_name}-%{github_commit} -a 1 +cd %{mikemccabe_json_patch_php_github_name}-%{mikemccabe_json_patch_php_github_commit} +%patch0 -p1 +  %build  : Create autoloader @@ -194,7 +199,7 @@ sed \  : Upstream tests  RETURN_CODE=0  PHPUNIT=$(which phpunit) -for PHP_EXEC in "" %{?rhel:php55} php56 php70 php71; do +for PHP_EXEC in "" %{?rhel:php55} php56 php70 php71 php72; do      if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then          $PHP_EXEC $PHPUNIT --verbose || RETURN_CODE=1      fi @@ -219,6 +224,10 @@ exit $RETURN_CODE  %changelog +* Thu Nov  2 2017 Remi Collet <remi@remimrepo.net> - 1.16.0-4 +- fix FTBFS from Koschei, add patch for PHP 7.2 from +  https://github.com/mikemccabe/json-patch-php/pull/17 +  * Mon May 29 2017 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.16.0-2  - Fix autoloader dependency  | 
