Skip to content

Commit 0233e6f

Browse files
committed
Minor documentation improvements
1 parent 0ad2b9e commit 0233e6f

File tree

2 files changed

+26
-27
lines changed

2 files changed

+26
-27
lines changed

README.md

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# clue/reactphp-stdio
22

33
[![CI status](https://github.com/clue/reactphp-stdio/workflows/CI/badge.svg)](https://github.com/clue/reactphp-stdio/actions)
4-
[![Packagist downloads](https://img.shields.io/packagist/dt/clue/stdio-react?color=blue&label=installs)](https://packagist.org/packages/clue/stdio-react)
4+
[![installs on Packagist](https://img.shields.io/packagist/dt/clue/stdio-react?color=blue&label=installs%20on%20Packagist)](https://packagist.org/packages/clue/stdio-react)
55

66
Async, event-driven and UTF-8 aware console input & output (STDIN, STDOUT) for
7-
truly interactive CLI applications, built on top of [ReactPHP](https://reactphp.org).
7+
truly interactive CLI applications, built on top of [ReactPHP](https://reactphp.org/).
88

99
You can use this library to build truly interactive and responsive command
1010
line (CLI) applications, that immediately react when the user types in
@@ -18,18 +18,18 @@ without requiring any extensions or special installation.
1818
* [Support us](#support-us)
1919
* [Quickstart example](#quickstart-example)
2020
* [Usage](#usage)
21-
* [Stdio](#stdio)
22-
* [Output](#output)
23-
* [Input](#input)
24-
* [Prompt](#prompt)
25-
* [Echo](#echo)
26-
* [Input buffer](#input-buffer)
27-
* [Cursor](#cursor)
28-
* [History](#history)
29-
* [Autocomplete](#autocomplete)
30-
* [Keys](#keys)
31-
* [Bell](#bell)
32-
* [Readline](#readline)
21+
* [Stdio](#stdio)
22+
* [Output](#output)
23+
* [Input](#input)
24+
* [Prompt](#prompt)
25+
* [Echo](#echo)
26+
* [Input buffer](#input-buffer)
27+
* [Cursor](#cursor)
28+
* [History](#history)
29+
* [Autocomplete](#autocomplete)
30+
* [Keys](#keys)
31+
* [Bell](#bell)
32+
* [~~Readline~~](#readline)
3333
* [Pitfalls](#pitfalls)
3434
* [Install](#install)
3535
* [Tests](#tests)
@@ -570,7 +570,9 @@ enable or disable emitting the BELL signal when using a disabled function:
570570
$stdio->setBell(false);
571571
```
572572

573-
### Readline
573+
### ~~Readline~~
574+
575+
> Deprecated since v2.3.0, see [`Stdio`](#stdio) instead.
574576
575577
The deprecated `Readline` class is responsible for reacting to user input and
576578
presenting a prompt to the user. It does so by reading individual bytes from the
@@ -633,7 +635,7 @@ ob_start(function ($chunk) use ($stdio) {
633635

634636
## Install
635637

636-
The recommended way to install this library is [through Composer](https://getcomposer.org).
638+
The recommended way to install this library is [through Composer](https://getcomposer.org/).
637639
[New to Composer?](https://getcomposer.org/doc/00-intro.md)
638640

639641
This project follows [SemVer](https://semver.org/).
@@ -648,7 +650,7 @@ See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
648650
This project aims to run on any platform and thus does not require any PHP
649651
extensions and supports running on legacy PHP 5.3 through current PHP 8+ and
650652
HHVM.
651-
It's *highly recommended to use PHP 7+* for this project.
653+
It's *highly recommended to use the latest supported PHP version* for this project.
652654

653655
Internally, it will use the `ext-mbstring` to count and measure string sizes.
654656
If this extension is missing, then this library will use a slighty slower Regex
@@ -663,22 +665,19 @@ Input line editing is handled entirely within this library and does not rely on
663665
Installing `ext-readline` is entirely optional.
664666

665667
Note that *Microsoft Windows is not supported*.
666-
Due to platform inconsistencies, PHP does not provide support for reading from
667-
standard console input without blocking.
668+
Due to platform constraints, PHP does not provide support for reading from
669+
standard console input without blocking on Windows.
668670
Unfortunately, until the underlying PHP feature request is implemented (which
669671
is unlikely to happen any time soon), there's little we can do in this library.
670-
A work-around for this remains unknown.
671-
Your only option would be to entirely
672-
[disable interactive input for Microsoft Windows](https://github.com/clue/psocksd/commit/c2f2f90ffc8ebf8233839ba2f3553f2698930125).
673-
However this package does work on [`Windows Subsystem for Linux`](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux)
674-
(or WSL) without issues. We suggest [installing WSL](https://msdn.microsoft.com/en-us/commandline/wsl/install_guide)
672+
However, this package does work on Windows Subsystem for Linux (or WSL) without
673+
issues. We suggest [installing WSL](https://msdn.microsoft.com/en-us/commandline/wsl/install_guide)
675674
when you want to run this package on Windows.
676675
See also [#18](https://github.com/clue/reactphp-stdio/issues/18) for more details.
677676

678677
## Tests
679678

680679
To run the test suite, you first need to clone this repo and then install all
681-
dependencies [through Composer](https://getcomposer.org):
680+
dependencies [through Composer](https://getcomposer.org/):
682681

683682
```bash
684683
$ composer install
@@ -687,7 +686,7 @@ $ composer install
687686
To run the test suite, go to the project root and run:
688687

689688
```bash
690-
$ php vendor/bin/phpunit
689+
$ vendor/bin/phpunit
691690
```
692691

693692
## License

src/Readline.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use React\Stream\WritableStreamInterface;
1212

1313
/**
14-
* @deprecated use Stdio instead
14+
* @deprecated 2.3.0 Use `Stdio` instead
1515
* @see Stdio
1616
*/
1717
class Readline extends EventEmitter implements ReadableStreamInterface

0 commit comments

Comments
 (0)