Skip to content

Instantly share code, notes, and snippets.

@ihipop
Last active August 25, 2018 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ihipop/c6af6599a9470012bc599fab818f1bee to your computer and use it in GitHub Desktop.
Save ihipop/c6af6599a9470012bc599fab818f1bee to your computer and use it in GitHub Desktop.
psysh配置

~/.config/psysh/config.php

<?php
return call_user_func(function () {
    $defaultIncludes    = [];
    $composerAutoload   = [];
    $composerAutoload[] = (getenv("COMPOSER_HOME") ?: getenv("HOME") . '/.composer/') . '/vendor/autoload.php';
    $composerAutoload[] = getcwd() . DIRECTORY_SEPARATOR . '/vendor/autoload.php';
    foreach ($composerAutoload as $autoloader) {
        if (is_file($autoloader)) {
            $defaultIncludes[] = $autoloader;//加载composer的的autoloader
        }
    }

    return [
        'updateCheck'     => 'monthly',
        'defaultIncludes' => $defaultIncludes,
    ];
});

https://github.com/bobthecow/psysh/wiki/Config-options

https://github.com/bobthecow/psysh/wiki/Sample-config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment