Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
9df6fe7
Add Io\Terminal native terminal primitives
prateekbhujel Sep 26, 2026
9b9aa8b
Align terminal size behavior with RFC
prateekbhujel Sep 27, 2026
49c66cd
Test native-only terminal size lookup
prateekbhujel Sep 27, 2026
ef3776c
Update reflection test for Io Terminal classes
prateekbhujel Sep 27, 2026
8ebce64
Fix terminal size test namespace
prateekbhujel Sep 27, 2026
a2ca812
Address Io Terminal core review
prateekbhujel Sep 27, 2026
7f801cb
Harden terminal input and mode restoration
prateekbhujel Sep 27, 2026
79f267e
Test terminal escape sequence handling
prateekbhujel Sep 27, 2026
61aa7a4
Preserve stream validation errors
prateekbhujel Sep 27, 2026
8c3bfc5
Keep unsupported terminal sequences raw
prateekbhujel Sep 27, 2026
307d97a
Keep terminal sequence test within defined keys
prateekbhujel Sep 27, 2026
23a3ffd
Reset queued input before secret reads
prateekbhujel Sep 27, 2026
f32986c
Address terminal review feedback
prateekbhujel Sep 27, 2026
7467c4b
Address remaining terminal review feedback
prateekbhujel Sep 27, 2026
533172f
Address follow-up terminal review feedback
prateekbhujel Sep 27, 2026
587dd6d
Fix terminal reflection test expectation
prateekbhujel Sep 27, 2026
7850ba6
Address terminal review feedback and fix macOS pty test
prateekbhujel Sep 27, 2026
52c4409
Harden Io\Terminal mode ownership, resize handling, and input validation
prateekbhujel Sep 28, 2026
415f353
Fix SIGWINCH handler sentinel checks
prateekbhujel Sep 28, 2026
667d382
Fix SIGWINCH handler sentinel checks
prateekbhujel Sep 28, 2026
8638e35
Fix SIGWINCH handler sentinel checks
prateekbhujel Sep 28, 2026
b0fd3c6
Address Io\Terminal discussion feedback
prateekbhujel Sep 28, 2026
b30e6e5
Use shared raw-mode ownership for terminals
prateekbhujel Sep 28, 2026
115437f
Fix terminal_read_key_contracts expectation on Linux PTY EIO
prateekbhujel Sep 28, 2026
648114b
Address Io\Terminal review feedback and harden terminal contracts
prateekbhujel Sep 28, 2026
4b40d2a
Implement Io\Terminal mockable contracts, monotonic deadlines, and se…
prateekbhujel Sep 29, 2026
4a4c3ad
Fix terminal timeout edge cases
prateekbhujel Sep 29, 2026
eb26b13
Stabilize readSecret PTY tests
prateekbhujel Sep 29, 2026
085eddf
Address terminal review feedback
prateekbhujel Sep 29, 2026
dd4ac16
Keep braced terminal namespace
prateekbhujel Sep 29, 2026
7ad394a
Fix UTF-8 readKey timeout handling
prateekbhujel Sep 29, 2026
7502311
Refine terminal contracts and add line input
prateekbhujel Sep 30, 2026
858feb1
Fix Windows readLine console mode restore and UTF-8 conversion checks
prateekbhujel Sep 30, 2026
a0f464b
Handle Linux PTY master EIO as EOF during terminal readLine
prateekbhujel Sep 30, 2026
1f6502a
Fix EAGAIN/EWOULDBLOCK compile portability in POSIX readLine
prateekbhujel Sep 30, 2026
a2b9c5e
Fix stale token cleanup on readLine and increase UTF-8 retain timeout
prateekbhujel Sep 30, 2026
c6f5815
Clean restoreMode comment type names and assert no-arg stale restoreMode
prateekbhujel Sep 30, 2026
8d04993
Wait for readability on EAGAIN in POSIX readLine to preserve submitte…
prateekbhujel Sep 30, 2026
2f8dca9
Io\Terminal: Align API to lease model and harden cross-platform strea…
prateekbhujel Oct 5, 2026
6d40d5e
test(terminal): Fix GNU stty output parsing and eliminate PTY EOF rac…
prateekbhujel Oct 5, 2026
e89db35
fix(terminal): Suppress plain_wrapper stream notices on terminal EOF …
prateekbhujel Oct 6, 2026
cf68743
fix(terminal): Narrow stream notice suppression to the POSIX byte reads
prateekbhujel Oct 6, 2026
0923fe7
fix(terminal): Align ordinary-stream readKey EOF to RFC and complete …
prateekbhujel Oct 6, 2026
cf865fc
test(terminal): Use bounded PTY observation instead of fixed sleep in…
prateekbhujel Oct 6, 2026
812baac
test(terminal): Fix 32-bit intdiv TypeError in terminal_raw_mode_isig…
prateekbhujel Oct 6, 2026
73428c2
Fix zero-timeout escape decoding and preserve pending resize across g…
prateekbhujel Oct 24, 2026
b02f458
Fix terminal readKey EOF handling for incomplete UTF-8
prateekbhujel Oct 24, 2026
ffbcfa9
Warn when an Io\Terminal raw-mode token is discarded
prateekbhujel Nov 6, 2026
52f4aa4
Rename Io\Terminal\TerminalSize to Dimensions and getSize() to getDim…
prateekbhujel Nov 9, 2026
6292563
Address inline review feedback in io_terminal.c and terminal tests
prateekbhujel Nov 9, 2026
d90d6ea
Fix logical-op warning in php_io_terminal_is_callable_handler
prateekbhujel Nov 9, 2026
350a80a
Support sequenceTimeout parameter in Terminal::readSecret()
prateekbhujel Nov 9, 2026
acec629
Rename Io\Terminal\Dimensions $cols to $columns
prateekbhujel Nov 20, 2026
c7c1ca0
Add Io\Terminal\EofException for terminal input stream termination
prateekbhujel Nov 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ Io\Poll\InactiveWatcherException
Io\Poll\InvalidHandleException
Io\Poll\PollException
Io\Poll\Watcher
Io\Terminal\Dimensions
Io\Terminal\EofException
Io\Terminal\Key
Io\Terminal\ModeToken
Io\Terminal\Terminal
Io\Terminal\TerminalException
RoundingMode
SortDirection
StreamBucket
Expand Down
4 changes: 4 additions & 0 deletions ext/standard/basic_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
BASIC_MINIT_SUBMODULE(standard_filters)
BASIC_MINIT_SUBMODULE(user_filters)
BASIC_MINIT_SUBMODULE(poll)
BASIC_MINIT_SUBMODULE(terminal)
BASIC_MINIT_SUBMODULE(password)
BASIC_MINIT_SUBMODULE(image)

Expand Down Expand Up @@ -383,6 +384,7 @@ PHP_MSHUTDOWN_FUNCTION(basic) /* {{{ */
BASIC_MSHUTDOWN_SUBMODULE(crypt)
BASIC_MSHUTDOWN_SUBMODULE(password)
BASIC_MSHUTDOWN_SUBMODULE(image)
BASIC_MSHUTDOWN_SUBMODULE(terminal)

return SUCCESS;
}
Expand Down Expand Up @@ -414,6 +416,7 @@ PHP_RINIT_FUNCTION(basic) /* {{{ */
PHP_RINIT(filestat)(INIT_FUNC_ARGS_PASSTHRU);
BASIC_RINIT_SUBMODULE(dir)
BASIC_RINIT_SUBMODULE(url_scanner_ex)
BASIC_RINIT_SUBMODULE(terminal)

/* Initialize memory for last http headers */
ZVAL_UNDEF(&BG(last_http_headers));
Expand Down Expand Up @@ -470,6 +473,7 @@ PHP_RSHUTDOWN_FUNCTION(basic) /* {{{ */

BASIC_RSHUTDOWN_SUBMODULE(user_filters)
BASIC_RSHUTDOWN_SUBMODULE(browscap)
BASIC_RSHUTDOWN_SUBMODULE(terminal)

/* Free last http headers */
zval_ptr_dtor(&BG(last_http_headers));
Expand Down
4 changes: 4 additions & 0 deletions ext/standard/basic_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ PHP_MINFO_FUNCTION(basic);
ZEND_API void php_get_highlight_struct(zend_syntax_highlighter_ini *syntax_highlighter_ini);

PHP_MINIT_FUNCTION(poll);
PHP_MINIT_FUNCTION(terminal);
PHP_MSHUTDOWN_FUNCTION(terminal);
PHP_RINIT_FUNCTION(terminal);
PHP_RSHUTDOWN_FUNCTION(terminal);
PHP_MINIT_FUNCTION(user_filters);
PHP_RSHUTDOWN_FUNCTION(user_filters);
PHP_RSHUTDOWN_FUNCTION(browscap);
Expand Down
1 change: 1 addition & 0 deletions ext/standard/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ PHP_NEW_EXTENSION([standard], m4_normalize([
incomplete_class.c
info.c
io_poll.c
io_terminal.c
iptc.c
levenshtein.c
libavifinfo/avifinfo.c
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ EXTENSION("standard", "array.c base64.c basic_functions.c browscap.c \
crypt_sha512.c php_crypt_r.c " + (TARGET_ARCH != 'arm64'? " crc32_x86.c" : "") + " \
datetime.c dir.c dl.c dns.c dns_win32.c exec.c \
file.c filestat.c formatted_print.c fsock.c head.c html.c image.c \
info.c io_poll.c iptc.c link.c mail.c math.c md5.c metaphone.c microtime.c \
info.c io_poll.c io_terminal.c iptc.c link.c mail.c math.c md5.c metaphone.c microtime.c \
net.c pack.c pageinfo.c quot_print.c soundex.c \
string.c scanf.c syslog.c type.c uniqid.c url.c var.c \
versioning.c assert.c strnatcmp.c levenshtein.c incomplete_class.c \
Expand Down
Loading
Loading