Skip to content

Releases: prateekbhujel/php-terminal

v0.5.0

18 Jun 04:07
72df612

Choose a tag to compare

Release v0.5.0

v0.4.1

06 Jun 09:41
36c91d9

Choose a tag to compare

v0.4.1

v0.4.0

06 Jun 09:25
964513b

Choose a tag to compare

v0.4.0

v0.3.0

02 Jun 09:46
1f4c950

Choose a tag to compare

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, and TERMINAL_STDERR constants.

Added

  • Terminal\Terminal as the public API surface.
  • Terminal\Backend, Terminal\Stream, and Terminal\Key enums.
  • Terminal\Terminal::readKey() now returns Terminal\Key cases 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.php with the built module reported version 0.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

01 Jun 04:34
a67a803

Choose a tag to compare

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.php to 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

24 May 16:02
efa3f46

Choose a tag to compare

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