Releases: prateekbhujel/php-terminal
v0.5.0
v0.4.1
v0.4.1
v0.4.0
v0.4.0
v0.3.0
v0.3.0
Core-oriented API release for PHP CLI terminal helpers.
Breaking
- Removed the pre-1.0 procedural
terminal_*()public API. - Removed public
TERMINAL_STDIN,TERMINAL_STDOUT, andTERMINAL_STDERRconstants.
Added
Terminal\Terminalas the public API surface.Terminal\Backend,Terminal\Stream, andTerminal\Keyenums.Terminal\Terminal::readKey()now returnsTerminal\Keycases for special keys and strings for printable input.
Clarified
- Printable Unicode input is returned as the next encoded code point from the terminal, not as a full grapheme cluster.
- Laravel Prompts and similar adapter work should target the new class/enum API.
Windows binaries
Attached builds cover PHP 8.2, 8.3, 8.4, and 8.5 on x64, TS and NTS.
Verification
- Local XAMPP PHP 8.2.4 x86_64 build: 11/11 tests passed.
examples/doctor.phpwith the built module reported version0.3.0.pear package-validate package.xml: 0 errors, 0 warnings.- GitHub CI for PR #25 passed on Unix PHP 8.2, 8.3, 8.4, 8.5, nightly.
- GitHub CI for PR #25 passed on Windows PHP 8.2, 8.3, 8.4, 8.5, master, TS/NTS x64.
- Release workflow built and uploaded all Windows DLL zips.
Note
This intentionally breaks the old pre-1.0 API so the package can follow the PHP-core discussion direction cleanly.
v0.2.0
v0.2.0
Production-oriented release for PHP CLI prompt/framework integration.
Added
terminal_enable_ansi()for ANSI/VT output enablement.terminal_read_secret()for hidden password/secret input.examples/doctor.phpto verify extension loading, TTY detection, ANSI support, terminal size, key reads, and secret input.CHANGELOG.md.
Improved
- Raw mode keeps normal prompt output usable while input is read one key at a time.
- Windows key reads restore console mode after each read.
- POSIX key reads return complete UTF-8 sequences.
- Stream writes are hardened against zero-byte progress and partial Windows writes.
- PHPT coverage now includes common keys, UTF-8 keys, raw-mode output processing, and secret input.
Windows binaries
Attached builds cover PHP 8.2, 8.3, 8.4, and 8.5 on x64, TS and NTS.
Verification
- Local XAMPP PHP 8.2.4 x86_64 build: 9/9 tests passed.
- GitHub CI passed on Unix PHP 8.2, 8.3, 8.4, 8.5, nightly.
- GitHub CI passed on Windows PHP 8.2, 8.3, 8.4, 8.5, master, TS/NTS x64.
- Release workflow built and uploaded all Windows DLL zips.
Note
Windows is CI build-validated. Real interactive console testing in PowerShell, Cmd, and Windows Terminal is still useful for final field confidence.
v0.1.0
First alpha release of terminal, a small PHP extension for cross-platform CLI terminal helpers.
Included API:
terminal_backend()terminal_is_tty()terminal_supports_ansi()terminal_get_size()terminal_write()terminal_enable_raw_mode()/terminal_restore_mode()terminal_read_key()
Windows DLL artifacts are attached for PHP 8.2-8.5, x64, TS/NTS. Unix-like users can build from source with phpize, ./configure --enable-terminal, make, and make test.
This is intentionally small and experimental. The main thing to test is whether the raw-mode and key-input API is useful for simple prompt-style CLI flows without depending on ncurses.
Feedback issue: #16