Skip to content

Commit 870821e

Browse files
Convert class<T> to string for hhvm version 25.7.0
1 parent d97bddd commit 870821e

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

tests/LegacyUserElementsTest.hack

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ final class SW extends SGMLStream\SimpleUserElementWithWritableFlow {
5959
protected function compose(
6060
SGMLStreamInterfaces\WritableFlow $flow,
6161
)[write_props]: SGMLStreamInterfaces\Streamable {
62-
$flow->assignVariable(static::class, 'SW wrote this');
62+
$flow->assignVariable((string)static::class, 'SW wrote this');
6363
return <element data-class={static::class}>{$this->getChildren()}</element>;
6464
}
6565
}
@@ -78,7 +78,7 @@ final class AW extends SGMLStream\AsynchronousUserElementWithWritableFlow {
7878
protected async function composeAsync(
7979
SGMLStreamInterfaces\WritableFlow $flow,
8080
)[write_props]: Awaitable<SGMLStreamInterfaces\Streamable> {
81-
$flow->assignVariable(static::class, 'AW wrote this');
81+
$flow->assignVariable((string)static::class, 'AW wrote this');
8282
return <element data-class={static::class}>{$this->getChildren()}</element>;
8383
}
8484
}
@@ -97,8 +97,8 @@ final class DumpFlow extends SGMLStream\SimpleUserElement {
9797
)[]: SGMLStreamInterfaces\Streamable {
9898
return
9999
<element data-class={static::class}>
100-
AW({$flow->get(AW::class) as ?\XHPChild})
101-
SW({$flow->get(SW::class) as ?\XHPChild})
100+
AW({$flow->get((string)AW::class) as ?\XHPChild})
101+
SW({$flow->get((string)SW::class) as ?\XHPChild})
102102
</element>;
103103
}
104104
}

tests/XhpInPureContextTest.hack

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ final class TestAsynchronousUserElement
8484

8585
<<__Override>>
8686
public function init()[]: void {
87-
throw new LogicException(static::class);
87+
throw new LogicException((string)static::class);
8888
}
8989

9090
<<__Override>>
@@ -100,7 +100,7 @@ final class TestSimpleUserElement extends SGMLStream\SimpleUserElement {
100100

101101
<<__Override>>
102102
public function init()[]: void {
103-
throw new LogicException(static::class);
103+
throw new LogicException((string)static::class);
104104
}
105105

106106
<<__Override>>
@@ -117,7 +117,7 @@ final class TestAsynchronousUserElementWithWritableFlow
117117

118118
<<__Override>>
119119
public function init()[]: void {
120-
throw new LogicException(static::class);
120+
throw new LogicException((string)static::class);
121121
}
122122

123123
<<__Override>>
@@ -134,7 +134,7 @@ final class TestSimpleUserElementWithWritableFlow
134134

135135
<<__Override>>
136136
public function init()[]: void {
137-
throw new LogicException(static::class);
137+
throw new LogicException((string)static::class);
138138
}
139139

140140
<<__Override>>
@@ -151,7 +151,7 @@ final class TestDissolvableUserElement
151151

152152
<<__Override>>
153153
public function init()[]: void {
154-
throw new LogicException(static::class);
154+
throw new LogicException((string)static::class);
155155
}
156156

157157
<<__Override>>
@@ -165,7 +165,7 @@ final class TestAsynchronousElement extends SGMLStream\AsynchronousElement {
165165

166166
<<__Override>>
167167
public function init()[]: void {
168-
throw new LogicException(static::class);
168+
throw new LogicException((string)static::class);
169169
}
170170

171171
<<__Override>>
@@ -182,7 +182,7 @@ final class TestDissolvableElement extends SGMLStream\DissolvableElement {
182182

183183
<<__Override>>
184184
public function init()[]: void {
185-
throw new LogicException(static::class);
185+
throw new LogicException((string)static::class);
186186
}
187187

188188
<<__Override>>
@@ -198,7 +198,7 @@ final class TestAsynchronousElementWithSuccessorFlow
198198

199199
<<__Override>>
200200
public function init()[]: void {
201-
throw new LogicException(static::class);
201+
throw new LogicException((string)static::class);
202202
}
203203

204204
<<__Override>>
@@ -218,7 +218,7 @@ final class TestSimpleElement extends SGMLStream\SimpleElement {
218218

219219
<<__Override>>
220220
public function init()[]: void {
221-
throw new LogicException(static::class);
221+
throw new LogicException((string)static::class);
222222
}
223223

224224
<<__Override>>
@@ -237,7 +237,7 @@ final class TestAsynchronousElementWithWritableFlow
237237

238238
<<__Override>>
239239
public function init()[]: void {
240-
throw new LogicException(static::class);
240+
throw new LogicException((string)static::class);
241241
}
242242

243243
<<__Override>>
@@ -256,7 +256,7 @@ final class TestSimpleElementWithWritableFlow
256256

257257
<<__Override>>
258258
public function init()[]: void {
259-
throw new LogicException(static::class);
259+
throw new LogicException((string)static::class);
260260
}
261261

262262
<<__Override>>

0 commit comments

Comments
 (0)