@@ -30,27 +30,6 @@ function awaitFirst(iterable $futures, ?Cancellation $cancellation = null): mixe
30
30
throw new CompositeLengthException ('Argument #1 ($futures) is empty ' );
31
31
}
32
32
33
- /**
34
- * Unwraps the first completed future.
35
- *
36
- * If you want the first future completed without an error, use {@see any()} instead.
37
- *
38
- * @template T
39
- *
40
- * @param iterable<Future<T>> $futures
41
- * @param Cancellation|null $cancellation Optional cancellation.
42
- *
43
- * @return T
44
- *
45
- * @throws CompositeLengthException If $futures is empty.
46
- *
47
- * @deprecated Use {@see awaitFirst()} instead.
48
- */
49
- function race (iterable $ futures , ?Cancellation $ cancellation = null ): mixed
50
- {
51
- return awaitFirst ($ futures , $ cancellation );
52
- }
53
-
54
33
/**
55
34
* Awaits the first successfully completed future, ignoring errors.
56
35
*
@@ -73,29 +52,6 @@ function awaitAny(iterable $futures, ?Cancellation $cancellation = null): mixed
73
52
return $ result [\array_key_first ($ result )];
74
53
}
75
54
76
- /**
77
- * Awaits the first successfully completed future, ignoring errors.
78
- *
79
- * If you want the first future completed, successful or not, use {@see awaitFirst()} instead.
80
- *
81
- * @template Tk of array-key
82
- * @template Tv
83
- *
84
- * @param iterable<Tk, Future<Tv>> $futures
85
- * @param Cancellation|null $cancellation Optional cancellation.
86
- *
87
- * @return Tv
88
- *
89
- * @throws CompositeException If all futures errored.
90
- * @throws CompositeLengthException If {@code $futures} is empty.
91
- *
92
- * @deprecated Use {@see awaitFirst()} instead.
93
- */
94
- function any (iterable $ futures , ?Cancellation $ cancellation = null ): mixed
95
- {
96
- return awaitAny ($ futures , $ cancellation );
97
- }
98
-
99
55
/**
100
56
* Awaits the first N successfully completed futures, ignoring errors.
101
57
*
@@ -141,26 +97,6 @@ function awaitAnyN(int $count, iterable $futures, ?Cancellation $cancellation =
141
97
throw new CompositeException ($ errors );
142
98
}
143
99
144
- /**
145
- * @template Tk of array-key
146
- * @template Tv
147
- *
148
- * @param iterable<Tk, Future<Tv>> $futures
149
- * @param positive-int $count
150
- * @param Cancellation|null $cancellation Optional cancellation.
151
- *
152
- * @return non-empty-array<Tk, Tv>
153
- *
154
- * @throws CompositeException If all futures errored.
155
- * @throws CompositeLengthException If {@code $futures} is empty.
156
- *
157
- * @deprecated Use {@see awaitAnyN()} instead.
158
- */
159
- function some (iterable $ futures , int $ count , ?Cancellation $ cancellation = null ): array
160
- {
161
- return awaitAnyN ($ count , $ futures , $ cancellation );
162
- }
163
-
164
100
/**
165
101
* Awaits all futures to complete or error.
166
102
*
@@ -190,22 +126,6 @@ function awaitAll(iterable $futures, ?Cancellation $cancellation = null): array
190
126
return [$ errors , $ values ];
191
127
}
192
128
193
- /**
194
- * @template Tk of array-key
195
- * @template Tv
196
- *
197
- * @param iterable<Tk, Future<Tv>> $futures
198
- * @param Cancellation|null $cancellation Optional cancellation.
199
- *
200
- * @return array{array<Tk, \Throwable>, array<Tk, Tv>}
201
- *
202
- * @deprecated Use {@see awaitAll()} instead.
203
- */
204
- function settle (iterable $ futures , ?Cancellation $ cancellation = null ): array
205
- {
206
- return awaitAll ($ futures , $ cancellation );
207
- }
208
-
209
129
/**
210
130
* Awaits all futures to complete or aborts if any errors.
211
131
*
@@ -235,22 +155,3 @@ function await(iterable $futures, ?Cancellation $cancellation = null): array
235
155
/** @var array<Tk, Tv> */
236
156
return $ values ;
237
157
}
238
-
239
- /**
240
- * Awaits all futures to complete or aborts if any errors. The returned array keys will be in the order the futures
241
- * resolved, not in the order given by the iterable. Sort the array after resolution if necessary.
242
- *
243
- * @template Tk of array-key
244
- * @template Tv
245
- *
246
- * @param iterable<Tk, Future<Tv>> $futures
247
- * @param Cancellation|null $cancellation Optional cancellation.
248
- *
249
- * @return array<Tk, Tv> Unwrapped values with the order preserved.
250
- *
251
- * @deprecated Use {@see await()} instead.
252
- */
253
- function all (iterable $ futures , ?Cancellation $ cancellation = null ): array
254
- {
255
- return await ($ futures , $ cancellation );
256
- }
0 commit comments