Skip to content

Commit b61758b

Browse files
committed
Remove deprecated getOutput() and getInput() accessors
1 parent ae5d3fc commit b61758b

File tree

3 files changed

+1
-35
lines changed

3 files changed

+1
-35
lines changed

README.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -470,13 +470,6 @@ If you want to print some text to console output, use the [`Stdio::write()`](#ou
470470
$stdio->write('hello');
471471
```
472472

473-
Should you need to interface with the `Stdout`, you can access the current instance through the [`Stdio`](#stdio):
474-
475-
```php
476-
// deprecated
477-
$stdout = $stdio->getOutput();
478-
```
479-
480473
#### Stdin
481474

482475
[Deprecated] The `Stdin` represents a `ReadableStream` and is responsible for handling console input.
@@ -492,15 +485,6 @@ $stdio->on('data', function ($line) use ($stdio) {
492485
});
493486
```
494487

495-
Should you need to interface with the `Stdin`, you can access the current instance through the [`Stdio`](#stdio):
496-
497-
You can access the current instance through the [`Stdio`](#stdio):
498-
499-
```php
500-
// deprecated
501-
$stdin = $stdio->getInput();
502-
```
503-
504488
## Pitfalls
505489

506490
The [`Readline`](#readline) has to redraw the current user

src/Stdio.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -192,22 +192,6 @@ public function close()
192192
$this->output->close();
193193
}
194194

195-
/**
196-
* @deprecated
197-
*/
198-
public function getInput()
199-
{
200-
return $this->input;
201-
}
202-
203-
/**
204-
* @deprecated
205-
*/
206-
public function getOutput()
207-
{
208-
return $this->output;
209-
}
210-
211195
public function getReadline()
212196
{
213197
return $this->readline;

tests/StdioTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function testCtorDefaultArgs()
2121
$stdio->close();
2222
}
2323

24-
public function testCtorArgsWillBeReturnedByGetters()
24+
public function testCtorReadlineArgWillBeReturnedBygetReadline()
2525
{
2626
$input = $this->getMockBuilder('React\Stream\ReadableStreamInterface')->getMock();
2727
$output = $this->getMockBuilder('React\Stream\WritableStreamInterface')->getMock();
@@ -31,8 +31,6 @@ public function testCtorArgsWillBeReturnedByGetters()
3131

3232
$stdio = new Stdio($this->loop, $input, $output, $readline);
3333

34-
$this->assertSame($input, $stdio->getInput());
35-
$this->assertSame($output, $stdio->getOutput());
3634
$this->assertSame($readline, $stdio->getReadline());
3735
}
3836

0 commit comments

Comments
 (0)