Skip to content

Commit 55462b6

Browse files
committed
Deprecate dedicated Stdin class, use Stdio "data" event instead
1 parent a75475a commit 55462b6

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ $stdout = $stdio->getOutput();
507507

508508
#### Stdin
509509

510-
The `Stdin` represents a `ReadableStream` and is responsible for handling console input.
510+
[Deprecated] The `Stdin` represents a `ReadableStream` and is responsible for handling console input.
511511

512512
Interfacing with it directly is *not recommended* and considered *advanced usage*.
513513

@@ -525,6 +525,7 @@ Should you need to interface with the `Stdin`, you can access the current instan
525525
You can access the current instance through the [`Stdio`](#stdio):
526526

527527
```php
528+
// deprecated
528529
$stdin = $stdio->getInput();
529530
```
530531

src/Stdin.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
use React\Stream\Stream;
66
use React\EventLoop\LoopInterface;
77

8-
// TODO: only implement ReadableStream
8+
/**
9+
* @deprecated
10+
*/
911
class Stdin extends Stream
1012
{
1113
private $oldMode = null;

src/Stdio.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,9 @@ public function close()
217217
$this->output->close();
218218
}
219219

220+
/**
221+
* @deprecated
222+
*/
220223
public function getInput()
221224
{
222225
return $this->input;

0 commit comments

Comments
 (0)