Debian Codegraph @

vendor/clue/stdio-react/CHANGELOG.md

raw
1 # Changelog
2
3 ## 2.7.0 (2026-06-14)
4
5 * Feature: Improve PHP 8.5+, PHP 8.4+, PHP 8.3+ and PHP 8.2+ support and update test environment.
6 (#112, #109 and #103 by @clue, #107 by @SimonFrings and #106 by @yadaiio)
7
8 * Minor documentation improvements.
9 (#105 by @yadaiio)
10
11 * Improve test suite to ensure 100% code coverage, skip flaky tests and fix legacy tests.
12 (#108, #113 and #111 by @clue and #102 by @SimonFrings)
13
14 ## 2.6.0 (2022-03-18)
15
16 * Feature: Full support for PHP 8.1 release.
17 (#101 by @cdosoftei)
18
19 ## 2.5.0 (2021-10-25)
20
21 * Feature: Simplify usage by supporting new default loop.
22 (#99 by @clue)
23
24 ```php
25 // old (still supported)
26 $stdio = new Clue\React\Stdio\Stdio($loop);
27
28 // new (using default loop)
29 $stdio = new Clue\React\Stdio\Stdio();
30 ```
31
32 * Improve code examples and documentation.
33 (#100 by @clue and #98 by @PaulRotmann)
34
35 * Use GitHub actions for continuous integration (CI).
36 (#97 by @SimonFrings)
37
38 ## 2.4.0 (2020-11-20)
39
40 * Fix: Refactor executing functional tests without ext-readline.
41 (#95 by @clue)
42
43 * Improve test suite and add `.gitattributes` to exclude dev files from export.
44 Prepare PHP 8 support, update to PHPUnit 9 and simplify test matrix.
45 (#93 and #94 by @SimonFrings)
46
47 ## 2.3.0 (2019-08-28)
48
49 * Feature: Emit audible/visible BELL signal when using a disabled function.
50 (#86 and #87 by @clue)
51
52 By default, this project will emit an audible/visible BELL signal when the user
53 tries to execute an otherwise disabled function, such as using the
54 <kbd>left</kbd> or <kbd>backspace</kbd> keys when already at the beginning of the line.
55
56 * Deprecated: Deprecate `Readline` class and move all methods to `Stdio`.
57 (#84 by @clue)
58
59 ```php
60 // deprecated:
61 $stdio->getReadline()->setPrompt('> ');
62
63 // recommended alternative:
64 $stdio->setPrompt('> ');
65 ```
66
67 * Fix: Fix closing to emit final `close` event and clean up all listeners.
68 (#88 by @clue)
69
70 * Improve test suite to test against legacy PHP 5.3 through PHP 7.3 and support PHPUnit 7.
71 (#85 by @clue)
72
73 ## 2.2.0 (2018-09-03)
74
75 * Feature / Fix: Accept CR as an alias for LF to support more platforms.
76 (#79 by @clue)
77
78 The <kbd>enter</kbd> key will usually end the line with a `\n` (LF)
79 character on most Unix platforms. Common terminals also accept the
80 <kbd>^M</kbd> (CR) key in place of the <kbd>^J</kbd> (LF) key.
81
82 By now allowing CR as an alias for LF in this library, we can significantly
83 improve compatibility with this common usage pattern and improve platform
84 support. In particular, some platforms use different TTY settings (`icrnl`,
85 `igncr` and family) and depending on these settings emit different EOL
86 characters. This fixes issues where <kbd>enter</kbd> was not properly
87 detected when using `ext-readline` on Mac OS X, Android and others.
88
89 * Fix: Fix and simplify restoring TTY mode when `ext-readline` is not in use.
90 (#74 and #78 by @clue)
91
92 * Update project homepage, minor code style improvements and sort dependencies.
93 (#72 and #81 by @clue and #75 by @localheinz)
94
95 ## 2.1.0 (2018-02-05)
96
97 * Feature: Add support for binding custom functions to any key code.
98 (#70 by @clue)
99
100 ```php
101 $readline->on('?', function () use ($stdio) {
102 $stdio->write('Do you need help?');
103 });
104 ```
105
106 * Feature: Add `addInput()` helper method.
107 (#69 by @clue)
108
109 ```php
110 $readline->addInput('hello');
111 $readline->addInput(' world');
112 ```
113
114 ## 2.0.0 (2018-01-24)
115
116 A major compatibility release to update this package to support all latest
117 ReactPHP components!
118
119 This update involves a minor BC break due to dropped support for legacy
120 versions. We've tried hard to avoid BC breaks where possible and minimize impact
121 otherwise. We expect that most consumers of this package will actually not be
122 affected by any BC breaks, see below for more details.
123
124 * BC break: Remove all deprecated APIs (individual `Stdin`, `Stdout`, `line` etc.)
125 (#64 and #68 by @clue)
126
127 > All of this affects only what is considered "advanced usage".
128 If you're affected by this BC break, then it's recommended to first
129 update to the intermediary v1.2.0 release, which provides alternatives
130 to all deprecated APIs and then update to this version without causing a
131 BC break.
132
133 * Feature / BC break: Consistently emit incoming "data" event with trailing newline
134 unless stream ends without trailing newline (such as when piping).
135 (#65 by @clue)
136
137 * Feature: Forward compatibility with upcoming Stream v1.0 and EventLoop v1.0
138 and avoid blocking when `STDOUT` buffer is full.
139 (#68 by @clue)
140
141 ## 1.2.0 (2017-12-18)
142
143 * Feature: Optionally use `ext-readline` to enable raw input mode if available.
144 This extension is entirely optional, but it is more efficient and reliable
145 than spawning the external `stty` command.
146 (#63 by @clue)
147
148 * Feature: Consistently return boolean success from `write()` and
149 avoid sending unneeded control codes between writes.
150 (#60 by @clue)
151
152 * Deprecated: Deprecate input helpers and output helpers and
153 recommend using `Stdio` as a normal `DuplexStreamInterface` instead.
154 (#59 and #62 by @clue)
155
156 ```php
157 // deprecated
158 $stdio->on('line', function ($line) use ($stdio) {
159 $stdio->writeln("input: $line");
160 });
161
162 // recommended alternative
163 $stdio->on('data', function ($line) use ($stdio) {
164 $stdio->write("input: $line");
165 });
166 ```
167
168 * Improve test suite by adding forward compatibility with PHPUnit 6.
169 (#61 by @carusogabriel)
170
171 ## 1.1.0 (2017-11-01)
172
173 * Feature: Explicitly end stream on CTRL+D and emit final data on EOF without EOL.
174 (#56 by @clue)
175
176 * Feature: Support running on non-TTY and closing STDIN and STDOUT streams.
177 (#57 by @clue)
178
179 * Feature / Fix: Restore blocking mode before closing and restore TTY mode on unclean shutdown.
180 (#58 by @clue)
181
182 * Improve documentation to detail why async console I/O is not supported on Microsoft Windows.
183 (#54 by @clue)
184
185 * Improve test suite by adding PHPUnit to require-dev,
186 fix HHVM build for now again and ignore future HHVM build errors and
187 lock Travis distro so future defaults will not break the build.
188 (#46, #48 and #52 by @clue)
189
190 ## 1.0.0 (2017-01-08)
191
192 * First stable release, now following SemVer.
193
194 > Contains no other changes, so it's actually fully compatible with the v0.5.0 release.
195
196 ## 0.5.0 (2017-01-08)
197
198 * Feature: Add history support.
199 (#40 by @clue)
200
201 * Feature: Add autocomplete support.
202 (#41 by @clue)
203
204 * Feature: Suggest using ext-mbstring, otherwise use regex fallback.
205 (#42 by @clue)
206
207 * Remove / BC break: Remove undocumented and low quality skeletons/helpers for
208 `Buffer`, `ProgressBar` and `Spinner` (mostly dead code).
209 (#39, #43 by @clue)
210
211 * First class support for PHP 5.3 through PHP 7 and HHVM.
212 (#44 by @clue)
213
214 * Simplify and restructure examples.
215 (#45 by @clue)
216
217 ## 0.4.0 (2016-09-27)
218
219 * Feature / BC break: The `Stdio` is now a well-behaving duplex stream.
220 (#35 by @clue)
221
222 * Feature / BC break: The `Readline` is now a well-behaving readable stream.
223 (#32 by @clue)
224
225 * Feature: Add `Readline::getPrompt()` helper.
226 (#33 by @clue)
227
228 * Feature / Fix: All unsupported special keys, key codes and byte sequences will now be ignored.
229 (#36, #30, #19, #38 by @clue)
230
231 * Fix: Explicitly redraw prompt on empty input.
232 (#37 by @clue)
233
234 * Fix: Writing data that contains multiple newlines will no longer end up garbled.
235 (#34, #35 by @clue)
236
237 ## 0.3.1 (2015-11-26)
238
239 * Fix: Support calling `Readline::setInput()` during `line` event.
240 (#28)
241
242 ```php
243 $stdio->on('line', function ($line) use ($stdio) {
244 $stdio->getReadline()->setInput($line . '!');
245 });
246 ```
247
248 ## 0.3.0 (2015-05-18)
249
250 * Feature: Support multi-byte UTF-8 characters and account for cell width.
251 (#20)
252
253 * Feature: Add support for HOME and END keys.
254 (#22)
255
256 * Fix: Clear readline input and restore TTY on end.
257 (#21)
258
259 ## 0.2.0 (2015-05-17)
260
261 * Feature: Support echo replacements (asterisk for password prompts).
262 (#11)
263
264 ```php
265 $stdio->getReadline()->setEcho('*');
266 ```
267
268 * Feature: Add accessors for text input buffer and current cursor position.
269 (#8 and #9)
270
271 ```php
272 $stdio->getReadline()->setInput('hello');
273 $stdio->getReadline()->getCursorPosition();
274 ```
275
276 * Feature: All setters now return self to allow easy method chaining.
277 (#7)
278
279 ```php
280 $stdio->getReadline()->setPrompt('Password: ')->setEcho('*')->setInput('secret');
281 ```
282
283 * Feature: Only redraw() readline when necessary.
284 (#10 and #14)
285
286 ## 0.1.0 (2014-09-08)
287
288 * First tagged release.
289
290 ## 0.0.0 (2013-08-21)
291
292 * Initial concept.