Changelog History
Page 1
-
v0.12.23 Changes
May 23, 2026π Bug fixes
- π Fix interactive readline bracket matching inside interpolated strings. Fixes #930
- π» Avoid infinite recursion in
ShellOutputwrite tracking (e.g.print_ron anExceptionwithzend.exception_ignore_args = Off). Fixes #934 - Include
--warm-autoloadin project trust restrictions - Exclude Symfony Console DI components from the autoload warmer (they're an optional dependency and blow up when not installed)
Under the hood
- Tighter callable types throughout
- β Added MediaWiki downstream smoke tests, updated to 8.3
- π Fixed Drush downstream tests
-
v0.12.22 Changes
March 22, 2026β Runtime config and clipboard support
β‘οΈ PsySH has a new
configcommand for inspecting and updating runtime-configurable settings during the current session. You can tweak things likepager,theme,verbosity,useSuggestions,useSyntaxHighlighting,clipboardCommand, andsemicolonsSuppressReturnwithout restarting the shell. Fixes #361Thereβs also a new
copycommand for copying the last result ($_) or any expression to your clipboard. Works with system clipboard commands, or via OSC 52 for SSH and remote terminals.π§ Configure with
clipboardCommandoruseOsc52Clipboardin your config.Semicolon-based return suppression
π Optionally suppress return values by ending a statement with
;, similar to MATLAB/Octave behavior. Supports a'double'mode requiring;;for suppression (ifrequireSemicolonsis also enabled, bothtrueand'double'require;;).'semicolonsSuppressReturn'=> true,'semicolonsSuppressReturn'=>'double',// Always require ;; to suppressπ» Output and exception display improvements
Strings are now valid PHP!
- π PsySH now preserves backslashes and other characters it previously mangled in a few cases. Fixes #351, #568
- π Multiline strings are rendered using heredoc-style output rather than triple-quoted strings
""". The old format is available viauseDeprecatedMultilineStringsuntil the next major release.
π Providing an
exceptionDetailscallback via config renders additional context about exceptions (e.g. validation errors) alongside the error message. Fixes #648A few other improvements:
- More consistent compact (and non-compact) output spacing.
- π± Responsive
helplayout adapts to terminal width.
π Better completion for everyone
π Legacy readline now shares PsySHβs newer completion engine, which brings much better parity between ext-readline/libedit and experimental interactive readline. Command argument completion, better multiline buffering, and a handful of command-dispatch edge cases now work much more consistently outside experimental readline too.
Commands can now define their own argument completions via
CommandArgumentCompletionAware.π Interactive readline polish
π New in the experimental interactive readline:
- Live syntax highlighting β code is highlighted as you type. Can be disabled via
useSyntaxHighlightingif you don't like colors, I guess. - π Allman-style indenting β opening brackets on a new line get proper indentation.
- π Improved auto-dedent β closing brackets automatically reduce indentation.
psy\info()and--infoalso report more detail about readline and autocomplete state.β Run psysh with
--experimental-readlineand try it out. It's getting kind of awesome!Compatibility note
Bare
configandcopyat the prompt now resolve to PsySH commands before PHP function calls. Prefix ambiguous input with;to force PHP execution.π Bug fixes
- π Use aliases are now tracked by import type (class vs function vs constant), fixing resolution bugs with
use functionanduse conststatements. - π Fix pager pipe warnings when user quits pager early
- π Fix eval error messages incorrectly suppressing PsySH file paths
- π Improve terminal width check on oldest supported Symfony versions
- π Fix a code cleaner bug with
throw new Exceptionin PHP 7.4
π Improvements
- β Added
--pager/--no-pagerCLI options - Richer
psy\info()/--infooutput with interactive completion - β Added hermetic test bootstrap, PTY smoketests, and additional downstream/composer-repl coverage
- Ctrl-C now interrupts the
editcommand instead of waiting for the editor to close
-
v0.12.21 Changes
March 06, 2026β Added an experimental interactive readline: a from-scratch pure-PHP readline replacement built specifically for PsySH. Instead of delegating to
ext-readlineorext-libedit, this gives PsySH full control over input, editing, completion, and rendering.This is opt-in and experimental. Default behavior is completely unchanged. Enable it in your config or from the command line:
'useExperimentalReadline'=> true, psysh --experimental-readlineπ See the interactive readline wiki page for more!
Completions that actually understand your code
The new completion engine is syntax-aware, type-aware, and runtime-value-aware. It parses your input, resolves types from live objects in scope, and completes based on what your code actually is, not just string matching on symbol names.
π Type
$user->and see that object's actual methods and properties. Chain through$repo->find(1)->and get completions for the return type. Fuzzy matching meansasumfindsarray_sumandstlfindsstrtolower. Completions show in a navigable multi-column menu.Multi-line editing
Press Enter on an incomplete statement and the input continues on the next line with proper indentation. Closing brackets auto-dedent. Shift+Enter always inserts a newline. No more fighting the shell to write a multi-line closure.
History
- Reverse history search (Ctrl+R) with an overlay showing match highlighting, smart-case filtering, deduplication, and keyboard navigation.
- Filtered history navigation: type part of a previous command, then press Up/Down to cycle through matching history entries.
And more
- π
Fish-style inline autosuggestions from your history. This one's still a bit rough; enable it separately with
'useSuggestions' => true. - Bracket and quote auto-pairing with smart backspace.
- Bracketed paste mode: pastes multi-line code verbatim without executing line-by-line.
- No
ext-readlineorext-libeditrequired. Works with any terminal. - Ctrl+L to clear the screen.
This addresses a bunch of long-standing issues: #234, #254, #309, #346, #506, #561, #668, #732, #769, #869.
0οΈβ£ We'd love your feedback! Give it a try, and let us know what works and what doesn't. The goal is to make this the default. Help us get it there. π§ͺ
-
v0.12.20 Changes
February 11, 2026π Project trust edge case fixes
π Fixed several edge cases with the Restricted Mode introduced in v0.12.19 where non-interactive contexts (piped input,
execute()calls, Composer proxy scripts) could incorrectly trigger trust prompts or restrict trusted functionality.π Fixes #913
π Commands work better outside the shell
Decoupled commands from
ShellOutputvia a newShellOutputAdapter, so commands degrade gracefully when used in non-interactive contexts rather than failing on missing shell features.π Improvements
- β Added downstream compatibility tests for local and CI workflows
- π Moved internal helper scripts from
bin/toscripts/
-
v0.12.19 Changes
January 30, 2026π β οΈ Security fix
π Fixed a CWD configuration poisoning vulnerability (CVE-2026-25129) where a malicious
.psysh.phpfile in an attacker-writable directory could execute arbitrary code when a victim runs PsySH from that directory. This affects all versions prior to v0.12.19 and v0.11.23, including downstream consumers like Laravel Tinker, when invoked from an attacker-writable CWD.π Fixed in v0.12.19 and v0.11.23. Upgrade ASAP.
Restricted Mode
PsySH now requires explicit trust before loading project-local config (
.psysh.php), local PsySH binaries, or Composer autoloads from untrusted projects. Trust decisions are persisted per-project intrusted_projects.json.π§ Configure with
trustProject:'trustProject'=>'prompt',// default β ask interactively'trustProject'=>'always',// trust all projects'trustProject'=>'never',// always run restrictedOr use
--trust-project/--no-trust-projectCLI flags, or thePSYSH_TRUST_PROJECTenv var.β Non-interactive sessions automatically skip untrusted features with a warning.
π Magic method and property support πͺ
Tab completion,
ls,doc, andshowcommands now recognize@methodand@propertydocblock tags. Magic members display in magenta so you can tell them apart from real methods and properties.Inheritance works as expected β magic members from parent classes, interfaces, and traits are included, with child declarations taking precedence.
π Also fixes parsing of generic types (e.g.,
array<int, string>) in docblock tags, which previously broke on whitespace inside angle brackets.π See #905
π Improvements
- π Excluded a few unnecessary files and folders from release source zips (Thanks @reedy!)
- π Fixed
--cwdto actually change the working directory. Previously it only affected discovery for autoload/config, so relative paths and other directory-dependent behavior didnβt work as expected inside the shell. - π Significantly improved memory usage with older php-parser versions (pre-v4.18.0)
-
v0.12.18 Changes
December 17, 2025- π Fix
exit()not working when uopz extension is loaded - Don't reopen pager if user closes it early
- βͺ Ensure stty state is restored before exiting PsySH (fixes an issue where
Ctrl-Cmight be incorrectly handled after exiting)
- π Fix
-
v0.12.17 Changes
December 15, 2025Hot code reloading!!?!?1?
Install the uopz extension (5.0+) and PsySH will automatically reload modified files during your session. Edit code, switch back to PsySH, and your changes are liveβno restart needed!
What gets reloaded
- Method bodies (including private/protected)
- Function implementations (and new functions!)
- Class and global constants
What can't be reloaded
- π New class methods
- Class properties, inheritance, or interfaces
- Method signatures
0οΈβ£ PsySH skips "risky" reloads by default (conditional definitions, static variables). Use the new
yolocommand to bypass safety checks:>>> my_helper() Warning: Skipped conditional: if (...) { function my_helper() ... } >>> yolo !! => "result"π See the documentation for more details.
π Bug fixes
- π Fix "array offset on null" warning on
Ctrl-Cβ plays nicer with Laravel + PHP 8.5 - π Work around O(nΒ²) performance in Symfony OutputFormatter
-
v0.12.16 Changes
December 07, 2025π A quick release adding support for Symfony Console v7.4+ and v8.x.
-
v0.12.15 Changes
November 28, 2025βͺ Abbreviated output reverted
βͺ The abbreviated return value output introduced in v0.12.13 has been reverted. This feature attempted to show shorter output for statements that looked like they were trying to take an action (like assignments and method calls with side effects) while preserving full output for inspection-like statements. Unfortunately, this version of the feature just ... wasn't it.
π Thanks to everyone who provided feedback. If you've got thoughts on approaches that could make this better, please share them in #512!
β‘οΈ In-shell manual updates
β‘οΈ You can now update the PHP manual directly from inside the shell! Run
doc --update-manualto fetch the latest manual version.More robust manual handling
- β Log a warning (and continue) when trying to read from an invalid manual file
- π Show invalid manual info in
--infoand\Psy\info() - β‘οΈ Prompt to clean up invalid manual files when running
--update-manual - β‘οΈ Prompt to upgrade to v3 manual (preserving language selection!) when running
--update-manualwith an existing sqlite manual - β‘οΈ Preserve legacy manuals when updating to v3, supporting systems with multiple PsySH versions installed
π Bug fixes
- π Fix namespace and use statement edge cases where aliases weren't properly tracked across REPL inputs
- π Fix
historycommand filtering and--head/--tailinteraction to apply filters first - π Fix E_STRICT warning in PHP 8.4
- π Fix ParseCommand parsing (you had one job ΰ² _ΰ² )
Other improvements
- β Add a hint about
doc foowhenhelp foodoesn't match a known command - π Don't call deprecated
curl_close()on PHP >= 8.0.0 (thanks @mpesari!) - π Lock phar build dependencies for reproducible builds
- π Improve PHP 8.5 support
- π Improve test coverage
-
v0.12.14 Changes
October 27, 2025π² Logging support
π² Log user input, command invocations, and executed code to a PSR-3 logger or callback.
// Simple callback$config->setLogging(function($kind,$data) {file\_put\_contents('/tmp/psysh.log',"[$kind] $data\n",FILE\_APPEND); });// PSR-3 logger with granular control$config->setLogging(['logger'=>$psrLogger,'level'=> ['input'=>'info','command'=>false,// disable'execute'=>'debug', ], ]);π This has been one of our longest-requested features (π) and it fixes #821, #651, and #565.
π Huge documentation improvements!
π This release adds a new PHP-based manual data format (v3), replacing the previously used sqlite db. The new format:
- π Allows runtime formatting (especially wrapping) rather than pre-rendering at build time.
- β Adds OSC 8 links to php.net!
- Is smaller, faster, and more flexible than the sqlite format.
- π ... and no longer requires sqlite support to use!
β‘οΈ The phar builds now bundle the PHP manual, so these changes work out of the box. There are also automatic update notifications, an an
--update-manualcommand to keep docs current.β‘οΈ If you've already got a manual file installed, remove it then run
psysh --update-manual(orpsysh --update-manual=LANG) after upgrading!Other improvements
- Prettier formatting for
--helpoutput - π¨ Standardized user-facing path pretty printing