diff options
-rw-r--r-- | 50353e06d89a0bf0a77287f9d232f3a2edb60667.patch | 26 | ||||
-rw-r--r-- | php-pecl-apcu.spec | 11 |
2 files changed, 31 insertions, 6 deletions
diff --git a/50353e06d89a0bf0a77287f9d232f3a2edb60667.patch b/50353e06d89a0bf0a77287f9d232f3a2edb60667.patch new file mode 100644 index 0000000..4da2788 --- /dev/null +++ b/50353e06d89a0bf0a77287f9d232f3a2edb60667.patch @@ -0,0 +1,26 @@ +From 50353e06d89a0bf0a77287f9d232f3a2edb60667 Mon Sep 17 00:00:00 2001 +From: Nikita Popov <nikita.ppv@gmail.com> +Date: Fri, 7 Jun 2019 10:04:14 +0200 +Subject: [PATCH] Use different fatal error + +The string conversion fatal is an exception in 7.4. +--- + tests/apc_entry_003.phpt | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/tests/apc_entry_003.phpt b/tests/apc_entry_003.phpt +index ef8ace9..0fd7be4 100644 +--- a/tests/apc_entry_003.phpt ++++ b/tests/apc_entry_003.phpt +@@ -8,8 +8,9 @@ apc.enable_cli=1 + --FILE-- + <?php + $value = apcu_entry("test", function($key) { +- (string) new stdClass; ++ // Fatal error ++ class X implements Y {} + }); + ?> + --EXPECTF-- +-%s fatal error: Object of class stdClass could not be converted to string in %s on line %d ++Fatal error: Interface 'Y' not found in %s on line %d diff --git a/php-pecl-apcu.spec b/php-pecl-apcu.spec index b64b8a0..78729c5 100644 --- a/php-pecl-apcu.spec +++ b/php-pecl-apcu.spec @@ -41,6 +41,8 @@ Source1: %{pecl_name}-5.1.2.ini Source2: %{pecl_name}-panel.conf Source3: %{pecl_name}.conf.php +Patch0: https://github.com/krakjoe/apcu/commit/50353e06d89a0bf0a77287f9d232f3a2edb60667.patch + License: PHP URL: http://pecl.php.net/package/APCu @@ -83,11 +85,11 @@ Obsoletes: php72u-pecl-%{pecl_name} <= %{version} Obsoletes: php72w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.3" -Obsoletes: php73-pecl-%{pecl_name} <= %{version} +Obsoletes: php73-pecl-%{pecl_name} <= %{version} Obsoletes: php73w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.4" -Obsoletes: php74-pecl-%{pecl_name} <= %{version} +Obsoletes: php74-pecl-%{pecl_name} <= %{version} Obsoletes: php74w-pecl-%{pecl_name} <= %{version} %endif %endif @@ -157,6 +159,7 @@ mv %{pecl_name}-%{version} NTS %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} cd NTS +%patch0 -p1 # Sanity check, really often broken extver=$(sed -n '/#define PHP_APCU_VERSION/{s/.* "//;s/".*$//;p}' php_apc.h) @@ -242,10 +245,6 @@ done %check -%if "%{php_version}" > "7.4" -rm ?TS/tests/apc_entry_003.phpt -%endif - cd NTS %{_bindir}/php -n \ -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ |