Download Latest Version PsySH v0.12.13 source code.tar.gz (191.9 kB)
Email in envelope

Get an email when there's a new version of PsySH

Home / v0.12.13
Name Modified Size InfoDownloads / Week
Parent folder
composer-v0.12.13.lock 2025-10-20 107.2 kB
psysh-v0.12.13.tar.gz 2025-10-20 948.2 kB
PsySH v0.12.13 source code.tar.gz 2025-10-20 191.9 kB
PsySH v0.12.13 source code.zip 2025-10-20 365.8 kB
README.md 2025-10-20 2.3 kB
Totals: 5 Items   1.6 MB 0

... pushing the limits of what we can plausibly put in a point release.

Autoload warming

Added opt-in autoload warming to improve tab completion and command support. When enabled, PsySH pre-loads classes at startup, making them available to ls, doc, show, and tab completion.

:::php
// Enable with defaults (project classes only)
'warmAutoload' => true,

// Advanced configuration
'warmAutoload' => [
    'includeTests' => true,
    'excludeNamespaces' => ['App\Tests\'],
    'includeVendorNamespaces' => ['Symfony\', 'Doctrine\'],
],

Custom warmers can be implemented via AutoloadWarmerInterface. Fixes [#650]

Implicit use statements

Auto-adds use statements when you reference a class by its short name (and there's exactly one match in configured namespaces).

:::php
'implicitUse' => [
    'includeNamespaces' => ['App\'],
    'excludeNamespaces' => ['App\Legacy\'],
],

Works great with autoload warming to make class references feel natural.

Namespace-aware commands

doc, show, and ls commands now resolve class names using the current namespace and use statements, just like code execution does.

SIGINT handling

Hitting ctrl-c during long-running code now interrupts execution and returns to the prompt instead of exiting the shell entirely. Works with or without process forking (requires pcntl and posix support). Fixes [#154]

Exit status support

PsySH now properly handles exit status codes! Use exit(42) for non-zero status codes or exit('message') to print before exiting. Also exits with non-zero status on unrecoverable errors.

Class names, functions, interfaces, constants, and more in ls, doc, and show commands are now clickable links to php.net (requires Symfony 4.3+, PsySH manual installed, and OSC 8 compatible terminal).

Other improvements

  • Added --info CLI option
  • Added --warm-autoload CLI option
  • Included traits in ClassNamesMatcher tab completion
  • Print shorter return values for actions than inspection
  • Improved PHPStan coverage (levels 2 and 3)
  • More robust smoketests
Source: README.md, updated 2025-10-20