- 
                Notifications
    You must be signed in to change notification settings 
- Fork 315
Config options
| Option | Description | 
|---|---|
| 
 | PsySH uses symfony/var-dumper’s casters for presenting scalars, resources, arrays and objects. You can enable additional casters, or write your own! See caster documentation. Default:  | 
| 
 | Provide a custom CodeCleaner instance or configuration to modify how user input is validated and transformed before execution. This is an advanced option for customizing PsySH's code transformation pipeline. Default: Default CodeCleaner with standard passes | 
| 
 | By default, output contains colors if support for them is detected. To override, use  Default:  | 
| 
 | While PsySH ships with a bunch of great commands, it's possible to add your own for even more awesome. Any Psy command added here will be available in your Psy shell sessions. Default:  | 
| 
 | Override the configuration directory location. By default, PsySH follows the XDG Base Directory specification ( Default: follows XDG specification | 
| 
 | Override the data directory location where PsySH stores history and other persistent data. By default, follows the XDG Base Directory specification ( Default: follows XDG specification | 
| 
 | "Default includes" will be included once at the beginning of every PsySH session. This is a good place to add autoloaders for your favorite libraries. Default:  | 
| 
 | If set to true, the history will not keep duplicate entries. Newest entries override oldest. This is the equivalent of the  Default:  | 
| 
 | While PsySH respects the current  Default:  | 
| 
 | Always show array indexes (even for numeric arrays) Default:  | 
| 
 | Override output formatting colors. These have been replaced by 🎨 Themes. To migrate existing settings change them from  'formatterStyles' => [
  // name => [foreground, background, [options]],
  'error' => ['black', 'red', ['bold']],
],… to custom  'theme' => [
  'styles' => [
    // name => [foreground, background, [options]],
    'error' => ['black', 'red', ['bold']],
  ],
],Default:  | 
| 
 | Sets the maximum number of entries the history can contain. If set to zero, the history size is unlimited. Default:  | 
| 
 | Automatically add use statements for unqualified class references. When you reference a class by its short name (e.g.,  Works great with  'implicitUse' => [
    'includeNamespaces' => ['App\\'],
    'excludeNamespaces' => ['App\\Legacy\\'],
],Default:  | 
| 
 | PsySH defaults to interactive mode in a terminal, and non-interactive mode when input is coming from a pipe. To override, use  Default:  | 
| 
 | Log user input, commands, and executed code to a PSR-3 compatible logger or callback. Useful for audit trails and debugging. // Simple callback
'logging' => function ($kind, $data) {
    file_put_contents('/tmp/psysh.log', "[$kind] $data\n", FILE_APPEND);
},
// PSR-3 logger with defaults (input=info, command=info, execute=debug)
'logging' => $psrLogger,
// Set a single log level for everything
'logging' => [
    'logger' => $psrLogger,
    'level' => 'info',
],
// Granular control per event type
'logging' => [
    'logger' => $psrLogger,
    'level' => [
        'input'   => 'info',   // User code input
        'command' => false,    // Disable command logging
        'execute' => 'debug',  // Cleaned code before execution
    ],
],Default:  | 
| 
 | Override the location of the PHP manual database file used by the  Default:  | 
| 
 | You can write your own tab completion matchers, too! Here are some that enable tab completion for MongoDB database and collection names: [
  new \Psy\TabCompletion\Matcher\MongoClientMatcher,
  new \Psy\TabCompletion\Matcher\MongoDatabaseMatcher,
]Default:  | 
| 
 | If this is not set, it falls back to  If you want to use a different pager only for Psy shell sessions, you can override it here. Default:  | 
| 
 | Specify a custom prompt. This has been replaced by 🎨 Themes. To migrate existing settings change this from  'prompt' => '$> ',… to custom  'theme' => [
  'prompt' => '$> ',
], | 
| 
 | Print  Default:  | 
| 
 | PsySH automatically inserts semicolons at the end of input if a statement is missing one. To disable this, set  Default:  | 
| 
 | Set the shell's temporary directory location. Defaults to   Default: follows XDG runtimeDir specification. | 
| 
 | Display an additional startup message. You can color and style the message thanks to the Symfony Console tags. See coloring docs for more details. Default:  | 
| 
 | Enforce strict types by default. When enabled, all code executed in PsySH will run with  'strictTypes' => true,Default:  | 
| 
 | PsySH supports output themes, which control prompt strings, formatter styles and colors, and compact output. Available options are  'theme' => 'modern',Default:  | 
| 
 | Frequency of update checks when starting an interactive shell session. Valid options are  To disable update checks entirely, set to  Default:  | 
| 
 | Frequency of PHP manual update checks. Valid options are  'updateManualCheck' => 'monthly',Default:  | 
| 
 | Enable bracketed paste support. If you use PHP built with readline (not libedit) and a relatively modern terminal, enable this. Default:  | 
| 
 | By default, PsySH will use a 'forking' execution loop if pcntl is installed. This is by far the best way to use it, but you can override the default by explicitly disabling this functionality here. Default:  | 
| 
 | PsySH uses readline if you have it installed, because interactive input is pretty awful without it. But you can explicitly disable it if you hate yourself or something. If readline is disabled (or unavailable) then terminal input is subject to the line discipline provided for TTYs by the OS, which may impose a maximum line size (4096 chars in GNU/Linux, for example) with larger lines being truncated before reaching PsySH. Default:  | 
| 
 | You can disable tab completion if you want to. Not sure why you’d want to. Default:  | 
| 
 | PsySH uses a couple of UTF-8 characters in its own output. These can be disabled, mostly to work around code page issues. Because Windows. Note that this does not disable Unicode output in general, it just makes it so PsySH won’t output any itself. Default:  | 
| 
 | Change output verbosity. This is equivalent to the  
 Default:  | 
| 
 | Enable autoload warming to improve command support and tab completion. When enabled PsySH will pre-load classes at startup, making them available to tab completion and the namespace-aware  This is equivalent to the  Enable with defaults (autoload projects classes only, and skip tests): 'warmAutoload' => true,Advanced configuration: 'warmAutoload' => [
    // Include vendor packages
    'includeVendor' => true,
    // Include test classes
    'includeTests' => true,
    // Include only specific namespaces
    'includeNamespaces' => ['App\\', 'Lib\\'],
    // Exclude specific namespaces
    'excludeNamespaces' => ['App\\Legacy\\'],
    // Include specific vendor namespaces
    'includeVendorNamespaces' => ['Symfony\\Component\\', 'Doctrine\\'],
    // Exclude specific namespaces
    'excludeVendorNamespaces' => ['Symfony\\VarDumper\\'],
    // Provide custom warmers
    'warmers' => [new MyCustomWarmer()],
],Default:  | 
| 
 | If multiple versions of the same configuration or data file exist, PsySH will use the file with highest precedence, and will silently ignore all others. With this enabled, a warning will be emitted (but not an exception thrown) if multiple configuration or data files are found. This will default to true in a future release, but is false for now. Default:  | 
| 
 | Run PsySH without input validation. You don't want this. Default:  |