Skip to content
Merged
Changes from all commits
Commits
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
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ The first cut stays small on purpose. It exposes the pieces that are awkward to

Created and maintained by Pratik Bhujel.

Current release: `v0.4.1`.
Current release: `v0.5.0`.

`v0.4.1` keeps the `Terminal\Terminal` class and enum API from `v0.3.0`, replaces raw-mode string handles with `Terminal\ModeToken`, and hardens key reads, resize handling, ANSI detection, and terminal-size fallbacks. The older `v0.2.0` release used the first procedural `terminal_*()` API.
`v0.5.0` keeps the `Terminal\Terminal` class and enum API from `v0.3.0`, and the `Terminal\ModeToken` raw-mode handles from `v0.4.0`. It hardens raw-mode loops, fixes ANSI detection edge cases, normalizes Unix F1-F12 keys, and pins exact `getSize()` keys. The older `v0.2.0` release used the first procedural `terminal_*()` API.

## Why this exists

Expand Down Expand Up @@ -82,7 +82,7 @@ The earlier procedural API was removed while the project is still pre-1.0 so the

The 0.1.x procedural API and `TERMINAL_*` constants were removed in favor of the namespaced class and enum API.

| 0.1.x | 0.4.1 |
| 0.1.x | 0.5.0 |
| --- | --- |
| `terminal_backend()` | `Terminal\Terminal::getBackend()` |
| `terminal_is_tty(TERMINAL_STDOUT)` | `Terminal\Terminal::isTty(Terminal\Stream::Stdout)` |
Expand Down Expand Up @@ -140,11 +140,11 @@ extension=terminal
extension=php_terminal.dll
```

## Installing v0.4.1
## Installing v0.5.0

The `v0.4.1` release is available at:
The `v0.5.0` release is available at:

https://github.com/prateekbhujel/php-terminal/releases/tag/v0.4.1
https://github.com/prateekbhujel/php-terminal/releases/tag/v0.5.0

Windows builds are attached for PHP 8.2-8.5, x64, TS/NTS. These are native Windows builds for normal Windows PHP runtimes, not WSL. Pick the zip that matches your PHP version and thread-safety mode, copy `php_terminal.dll` into your PHP extension directory, and enable it with:

Expand All @@ -157,7 +157,7 @@ Build from source on Unix-like systems:
```sh
git clone https://github.com/prateekbhujel/php-terminal.git
cd php-terminal
git checkout v0.4.1
git checkout v0.5.0
phpize
./configure --enable-terminal
make
Expand All @@ -174,7 +174,7 @@ For installed builds, use your normal `extension=terminal` configuration instead

### Build current main from source

To test unreleased changes after `v0.4.1`:
To test unreleased changes after `v0.5.0`:

```sh
phpize
Expand Down Expand Up @@ -212,9 +212,9 @@ set PHP_BIN=C:\xampp\php\php.exe

Download the matching zip from the release page. For example:

- PHP 8.2, thread safety disabled: `php_terminal-v0.4.1-8.2-nts-vs16-x86_64.zip`
- PHP 8.2, thread safety enabled: `php_terminal-v0.4.1-8.2-ts-vs16-x86_64.zip`
- PHP 8.4, thread safety disabled: `php_terminal-v0.4.1-8.4-nts-vs17-x86_64.zip`
- PHP 8.2, thread safety disabled: `php_terminal-v0.5.0-8.2-nts-vs16-x86_64.zip`
- PHP 8.2, thread safety enabled: `php_terminal-v0.5.0-8.2-ts-vs16-x86_64.zip`
- PHP 8.4, thread safety disabled: `php_terminal-v0.5.0-8.4-nts-vs17-x86_64.zip`

Copy `php_terminal.dll` into that PHP installation's extension directory, for example:

Expand Down Expand Up @@ -350,7 +350,7 @@ Until Laravel Prompts has that adapter, existing Laravel Prompts releases will s

The bundled `examples/prompt.php` file is intentionally small so framework authors can see the shape without reading a full TUI library.

Future Laravel Prompts adapter work should target the `Terminal\Terminal` and enum API from `v0.4.1`.
Future Laravel Prompts adapter work should target the `Terminal\Terminal` and enum API from `v0.5.0`.

For release feedback, open a new issue with the OS, terminal, PHP version, extension version, what you tried, and the behavior you expected.

Expand Down