Skip to content

v0.9.0 - Core Alignment Refactor

Choose a tag to compare

@prateekbhujel prateekbhujel released this 19 Sep 04:49
· 18 commits to main since this release
6be66dc

Core Alignment Refactor (Tim Düsterhus Review)

  • Stream Unification: Unified separate stream descriptors into a cohesive terminal session handle via Terminal::open(), Terminal::create(), and Terminal::fromStreams($input, $output). Removed fragmented stdin(), stdout(), and stderr() constructors.
  • Pure OO Architecture: Eliminated duplicate top-level procedural functions in Io\Terminal, making the extension strictly object-oriented to enforce RAII destructor cleanup safety.
  • Dimension Value Object: Introduced Io\Terminal\TerminalSize ($cols, $rows, $width, $height, toArray()) returned by $term->getSize(). Removed redundant getWidth() and getHeight() methods from Io\Terminal\Terminal.
  • Stream Accessors: Added getInputStream() and getOutputStream() accessors to Io\Terminal\Terminal.
  • Backward Compatibility: Preserved 100% backward compatibility via Terminal\* legacy facades and class aliases for seamless userland migration.
  • Full Test Suite: All 49 PHPT tests pass cleanly across PHP 8.1 through 8.5.