summaryrefslogtreecommitdiffstats
path: root/12845d5957b8af7c356e31f0d1be3d72986aab26.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-04-10 14:40:24 +0200
committerRemi Collet <remi@remirepo.net>2020-04-10 14:40:24 +0200
commit7666a8c8f1b73a76e2031a4e8510b7179f5f4887 (patch)
tree9977174fbbdcda431ab4563a16abf67505c8d7fa /12845d5957b8af7c356e31f0d1be3d72986aab26.patch
parent6e45c14ad198dfcbd7ef9c529d1bf55d4b3d478a (diff)
add upstream patch for 8.0
Diffstat (limited to '12845d5957b8af7c356e31f0d1be3d72986aab26.patch')
-rw-r--r--12845d5957b8af7c356e31f0d1be3d72986aab26.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/12845d5957b8af7c356e31f0d1be3d72986aab26.patch b/12845d5957b8af7c356e31f0d1be3d72986aab26.patch
new file mode 100644
index 0000000..a01267d
--- /dev/null
+++ b/12845d5957b8af7c356e31f0d1be3d72986aab26.patch
@@ -0,0 +1,56 @@
+From 12845d5957b8af7c356e31f0d1be3d72986aab26 Mon Sep 17 00:00:00 2001
+From: Nikita Popov <nikita.ppv@gmail.com>
+Date: Sat, 15 Feb 2020 11:09:22 +0100
+Subject: [PATCH] Fork test for PHP 8
+
+---
+ tests/apc_store_reference.phpt | 2 ++
+ tests/apc_store_reference_php8.phpt | 26 ++++++++++++++++++++++++++
+ 2 files changed, 28 insertions(+)
+ create mode 100644 tests/apc_store_reference_php8.phpt
+
+diff --git a/tests/apc_store_reference.phpt b/tests/apc_store_reference.phpt
+index 2228899..d2cb991 100644
+--- a/tests/apc_store_reference.phpt
++++ b/tests/apc_store_reference.phpt
+@@ -4,6 +4,8 @@ The outermost value should always be a value, not a reference
+ apc.enabled=1
+ apc.enable_cli=1
+ apc.serializer=default
++--SKIPIF--
++<?php if (PHP_VERSION_ID >= 80000) die('skip Requires PHP < 8.0.0'); ?>
+ --FILE--
+ <?php
+
+diff --git a/tests/apc_store_reference_php8.phpt b/tests/apc_store_reference_php8.phpt
+new file mode 100644
+index 0000000..1eae4bb
+--- /dev/null
++++ b/tests/apc_store_reference_php8.phpt
+@@ -0,0 +1,26 @@
++--TEST--
++The outermost value should always be a value, not a reference
++--INI--
++apc.enabled=1
++apc.enable_cli=1
++apc.serializer=default
++--SKIPIF--
++<?php if (PHP_VERSION_ID < 80000) die('skip Requires PHP >= 8.0.0'); ?>
++--FILE--
++<?php
++
++/* The output is different for the php serializer, because it does not replicate the
++ * cycle involving the top-level value. Instead the cycle is placed one level lower.
++ * I believe this is a bug in the php serializer. */
++
++$value = [&$value];
++apcu_store(["key" => &$value]);
++$result = apcu_fetch("key");
++var_dump($result);
++
++?>
++--EXPECT--
++array(1) {
++ [0]=>
++ *RECURSION*
++}