summaryrefslogtreecommitdiffstats
path: root/php-mikey179-vfsstream-upstream.patch
blob: 0d939663434086818083d32c93ba198662b1ba2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 17b0f39b4a767bf950066dbad1a9a0b0ec4f7c68 Mon Sep 17 00:00:00 2001
From: Vladimir Jimenez <allejo@me.com>
Date: Tue, 22 Feb 2022 17:36:32 -0800
Subject: [PATCH] Fix PHP 8.2 support for vfsStreamWrapper

Co-authored-by: James Gilliland <neclimdul@gmail.com>
---
 src/main/php/org/bovigo/vfs/vfsStreamWrapper.php | 6 ++++++
 src/test/phpt/bug71287.phpt                      | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php b/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
index 368b2fbe..a31e6d22 100644
--- a/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
+++ b/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
@@ -46,6 +46,12 @@ class vfsStreamWrapper
      * file mode: read and write
      */
     const ALL                    = 2;
+    /**
+     * The current context or null if none passed.
+     *
+     * @var resource|null
+     */
+    public $context;
     /**
      * switch whether class has already been registered as stream wrapper or not
      *
diff --git a/src/test/phpt/bug71287.phpt b/src/test/phpt/bug71287.phpt
index ea2efb75..75b9b376 100644
--- a/src/test/phpt/bug71287.phpt
+++ b/src/test/phpt/bug71287.phpt
@@ -6,6 +6,12 @@ See https://github.com/mikey179/vfsStream/issues/120
 --FILE--
 <?php
 class Stream {
+    /**
+     * The current context or null if none passed.
+     *
+     * @var resource|null
+     */
+    public $context;
     public function stream_open($path, $mode, $options, $opened_path) {
 
         return true;