summaryrefslogtreecommitdiffstats
path: root/228.patch
blob: 7448172d19212c15cf293b0009a6e423940bc949 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
From 68d4bf090b6a12e40dcd6178837ef729f43c2d2e Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Fri, 17 Jun 2022 15:04:34 +0200
Subject: [PATCH] fix 8.2 deprecations

---
 tests/007-addremovepoll.phpt     | 6 +++---
 tests/036-device.phpt            | 8 ++++----
 tests/037-device-deprecated.phpt | 4 ++--
 tests/048-pollsetitems.phpt      | 6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/tests/007-addremovepoll.phpt b/tests/007-addremovepoll.phpt
index a37762f..645d212 100644
--- a/tests/007-addremovepoll.phpt
+++ b/tests/007-addremovepoll.phpt
@@ -16,14 +16,14 @@ $z = create_client();
 $socket_server = stream_socket_server("tcp://127.0.0.1:5858", $errno, $errstr);
 
 if (!$socket_server) {
-	echo "Failed to create socket server: ${errstr}" . PHP_EOL;
+	echo "Failed to create socket server: {$errstr}" . PHP_EOL;
 	exit (1);
 }
 
 $socket_client = stream_socket_client("tcp://127.0.0.1:5858", $errno, $errstr);
 
 if (!$socket_client) {
-	echo "Failed to create socket client: ${errstr}" . PHP_EOL;
+	echo "Failed to create socket client: {$errstr}" . PHP_EOL;
 	exit (1);
 }
 
@@ -73,4 +73,4 @@ array(1) {
   [0]=>
   string(3) "r:%d"
 }
-int(0)
\ No newline at end of file
+int(0)
diff --git a/tests/036-device.phpt b/tests/036-device.phpt
index 507e902..0fcc15e 100644
--- a/tests/036-device.phpt
+++ b/tests/036-device.phpt
@@ -17,11 +17,11 @@ class CbStateData
 	protected $_name;
 
 	public function __construct ($name) {
-	  $this->name = $name;
+	  $this->_name = $name;
 	}
 
 	public function getName () {
-	  return $this->name;
+	  return $this->_name;
 	}
 
 	public function increment ()
@@ -58,7 +58,7 @@ $orig_cb = function ($user_data) use (&$last_called, $device) {
 				$time_elapsed = (proper_microtime () - $last_called) + 1;
 
 				if ($time_elapsed < $device->getTimerTimeout ()) {
-					echo "Called too early, only ${time_elapsed}ms elapsed, expected {$device->getTimerTimeout ()}" . PHP_EOL;
+					echo "Called too early, only {$time_elapsed}ms elapsed, expected {$device->getTimerTimeout ()}" . PHP_EOL;
 				}
 
 				$device->setTimerTimeout ($device->getTimerTimeout () + 50);
@@ -100,4 +100,4 @@ Triggered for 160ms timeout
 timer function called 2 times
 Triggered for 210ms timeout
 timer function called 3 times
-OK
\ No newline at end of file
+OK
diff --git a/tests/037-device-deprecated.phpt b/tests/037-device-deprecated.phpt
index 82beb16..4f1ce37 100644
--- a/tests/037-device-deprecated.phpt
+++ b/tests/037-device-deprecated.phpt
@@ -14,7 +14,7 @@ $device = new ZMQDevice($s1, $ctx->getSocket(ZMQ::SOCKET_PUB));
 
 // Setup callback and user data for callback
 $device->setIdleTimeout (100);
-$device->setIdleCallback (function ($user_data) { echo "Called: ${user_data}" . PHP_EOL; return false; }, "test");
+$device->setIdleCallback (function ($user_data) { echo "Called: {$user_data}" . PHP_EOL; return false; }, "test");
 
 // Run first time
 $device->run ();
@@ -24,4 +24,4 @@ echo "OK";
 --EXPECTF--
 Deprecated: ZMQDevice::setidlecallback(): The signature for setIdleCallback has changed, please update your code in %s on line %d
 Called: test
-OK
\ No newline at end of file
+OK
diff --git a/tests/048-pollsetitems.phpt b/tests/048-pollsetitems.phpt
index 0f0f316..5079809 100644
--- a/tests/048-pollsetitems.phpt
+++ b/tests/048-pollsetitems.phpt
@@ -19,14 +19,14 @@ $poll = new ZMQPoll();
 $socket_server = stream_socket_server("tcp://127.0.0.1:5858", $errno, $errstr);
 
 if (!$socket_server) {
-	echo "Failed to create socket server: ${errstr}" . PHP_EOL;
+	echo "Failed to create socket server: {$errstr}" . PHP_EOL;
 	exit (1);
 }
 
 $socket_client = stream_socket_client("tcp://127.0.0.1:5858", $errno, $errstr);
 
 if (!$socket_client) {
-	echo "Failed to create socket client: ${errstr}" . PHP_EOL;
+	echo "Failed to create socket client: {$errstr}" . PHP_EOL;
 	exit (1);
 }
 
@@ -58,4 +58,4 @@ array(3) {
 }
 array(0) {
 }
-OK
\ No newline at end of file
+OK