Skip to content

Commit 266108f

Browse files
committed
Deprecate Stdio::overwrite() method, append with write() instead
1 parent f574375 commit 266108f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,12 @@ $stdio->write('hello');
8989
$stdio->write(" world\n");
9090
```
9191

92-
The `overwrite($text)` method can be used to overwrite/replace the last
92+
[Deprecated] The `overwrite($text)` method can be used to overwrite/replace the last
9393
incomplete line with the given text:
9494

9595
```php
9696
$stdio->write('Loading…');
97+
// deprecated
9798
$stdio->overwrite('Done!');
9899
```
99100

src/Stdio.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ public function writeln($line)
167167
$this->write($line . PHP_EOL);
168168
}
169169

170+
/**
171+
* @deprecated
172+
*/
170173
public function overwrite($data = '')
171174
{
172175
if ($this->incompleteLine !== '') {

0 commit comments

Comments
 (0)