Skip to content

Commit

Permalink
Prepare v1.1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed Nov 1, 2017
1 parent bd60c1b commit f574375
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 10 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## 1.1.0 (2017-11-01)

* Feature: Explicitly end stream on CTRL+D and emit final data on EOF without EOL
(#56 by @clue)

* Feature: Support running on non-TTY and closing STDIN and STDOUT streams
(#57 by @clue)

* Feature / Fix: Restore blocking mode before closing and restore TTY mode on unclean shutdown
(#58 by @clue)

* Improve documentation to detail why async console I/O is not supported on Microsoft Windows
(#54 by @clue)

* Improve test suite by adding PHPUnit to require-dev,
fix HHVM build for now again and ignore future HHVM build errors and
lock Travis distro so future defaults will not break the build
(#46, #48 and #52 by @clue)

## 1.0.0 (2017-01-08)

* First stable release, now following SemVer
Expand Down
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# clue/stdio-react [![Build Status](https://travis-ci.org/clue/php-stdio-react.svg?branch=master)](https://travis-ci.org/clue/php-stdio-react)

Async, event-driven and UTF-8 aware console input & output (STDIN, STDOUT), built on top of for React PHP
Async, event-driven and UTF-8 aware console input & output (STDIN, STDOUT),
built on top of for [ReactPHP](https://reactphp.org).

**Table of Contents**
**Table of contents**

* [Quickstart example](#quickstart-example)
* [Usage](#usage)
Expand Down Expand Up @@ -64,14 +65,14 @@ $stdio = new Stdio($loop);

See below for waiting for user input and writing output.
Alternatively, the `Stdio` is also a well-behaving duplex stream
(implementing React's `DuplexStreamInterface`) that emits each complete
(implementing ReactPHP's `DuplexStreamInterface`) that emits each complete
line as a `data` event (including the trailing newline). This is considered
advanced usage.

#### Output

The `Stdio` is a well-behaving writable stream
implementing React's `WritableStreamInterface`.
implementing ReactPHP's `WritableStreamInterface`.

The `writeln($line)` method can be used to print a line to console output.
A trailing newline will be added automatically.
Expand Down Expand Up @@ -102,7 +103,7 @@ You can `pipe()` any readable stream into this stream.
#### Input

The `Stdio` is a well-behaving readable stream
implementing React's `ReadableStreamInterface`.
implementing ReactPHP's `ReadableStreamInterface`.

It will emit a `line` event for every line read from console input.
The event will contain the input buffer as-is, without the trailing newline.
Expand Down Expand Up @@ -143,7 +144,7 @@ $readline = $stdio->getReadline();

See above for waiting for user input.
Alternatively, the `Readline` is also a well-behaving readable stream
(implementing React's `ReadableStreamInterface`) that emits each complete
(implementing ReactPHP's `ReadableStreamInterface`) that emits each complete
line as a `data` event (without the trailing newline). This is considered
advanced usage.

Expand Down Expand Up @@ -547,13 +548,24 @@ ob_start(function ($chunk) use ($stdio) {
The recommended way to install this library is [through Composer](https://getcomposer.org).
[New to Composer?](https://getcomposer.org/doc/00-intro.md)

This project follows [SemVer](http://semver.org/).
This will install the latest supported version:

```bash
$ composer require clue/stdio-react:^1.0
$ composer require clue/stdio-react:^1.1
```

More details and upgrade guides can be found in the [CHANGELOG](CHANGELOG.md).
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.

This project aims to run on any platform and thus does not require any PHP
extensions and supports running on legacy PHP 5.3 through current PHP 7+ and
HHVM.
It's *highly recommended to use PHP 7+* for this project.

Internally, it will use the `ext-mbstring` to count and measure string sizes.
If this extension is missing, then this library will use a slighty slower Regex
work-around that should otherwise work equally well.
Installing `ext-mbstring` is highly recommended.

Note that *Microsoft Windows is not supported*.
Due to platform inconsistencies, PHP does not provide support for reading from
Expand All @@ -571,7 +583,7 @@ See also [#18](https://github.com/clue/php-stdio-react/issues/18) for more detai
## Tests

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

```bash
$ composer install
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clue/stdio-react",
"description": "Async, event-driven console input & output (STDIN, STDOUT), built on top of React PHP",
"description": "Async, event-driven console input & output (STDIN, STDOUT), built on top of ReactPHP",
"keywords": ["stdio", "stdin", "stdout", "readline", "autocomplete", "autocompletion", "history", "ReactPHP", "async"],
"homepage": "https://github.com/clue/php-stdio-react",
"license": "MIT",
Expand Down

0 comments on commit f574375

Please sign in to comment.