Skip to content

PsySH v0.10.3

Compare
Choose a tag to compare
@bobthecow bobthecow released this 07 Apr 06:54

This one's almost too big for a point release!

New:

  • New command line options:
    • --interactive and --no-interactive, to explicitly enable or disable interactive mode.
    • --verbose, --quiet and -v/-vv/-vvv for output verbosity. This one kind of worked before, but only sometimes, and only kind of :)
    • ... and a bunch of aliases, for those familiar with Symfony, Composer and other tools.
  • New and improved command line option handling, making it easier for libraries that wrap PsySH to support the same options as psysh does!
  • New configuration options:
    • verbosity, equivalent to the -v, -vv, -vvv and --silent command line options.
    • interactiveMode, equivalent to --interactive and --no-interactive command line options.
    • formatterStyles, for overriding command line colors.
  • Default to non-interactive mode when input is coming from a pipe.
  • Cleaner output when using --raw-output, or STDOUT is redirected.
  • Exceptions and errors are now written to STDERR not STDOUT, which makes it easier to split them off from desired output.
  • Brand new shiny code formatter. It's more consistent between different commands, the colors match class and method signatures in ls and elsewhere, the line numbers are the same style and colors as in history, etc.
  • Tab completion for interfaces, as well as classes (Thanks @GrahamCampbell!)
  • The ls command can now list namespaces! This means, for example, that ls --classes Psy will return all known classes inside the Psy namespace. This works for constants, functions, interfaces and traits as well.
  • The show command now shows files! Try show __DIR__ . '/vendor/autoload.php'. This is super handy when combined with the $__file magic variable set by ls and doc :)

Improved:

  • Support redisplay in HOA/Console readline (Thanks @zonuexe!)
  • The show command now includes doc comments for classes, interfaces, traits, functions and methods.
  • The whereami command now has a --file option for showing the entire file.
  • Set the PsySH process title without the proctitle extension.
  • Fix an issue with pre-packaged phar releases which added a couple of unnecessary functions to the global namespace.
  • Fix a bug parsing single-line docblocks for the doc command.
  • Fix a small bug parsing code in sudo, parse and throwup commands.
  • A bunch of housekeepking and general cleanup (Thanks @GrahamCampbell!)
  • Modernize some code.