update2
This commit is contained in:
parent
98419bd18d
commit
8a69e45efa
4919 changed files with 28311 additions and 224136 deletions
17
pfosten/vendor/laravel/tinker/src/Console/TinkerCommand.php
vendored
Executable file → Normal file
17
pfosten/vendor/laravel/tinker/src/Console/TinkerCommand.php
vendored
Executable file → Normal file
|
|
@ -5,6 +5,7 @@ namespace Laravel\Tinker\Console;
|
|||
use Psy\Shell;
|
||||
use Psy\Configuration;
|
||||
use Illuminate\Console\Command;
|
||||
use Laravel\Tinker\ClassAliasAutoloader;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
|
||||
class TinkerCommand extends Command
|
||||
|
|
@ -37,7 +38,7 @@ class TinkerCommand extends Command
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
public function fire()
|
||||
public function handle()
|
||||
{
|
||||
$this->getApplication()->setCatchExceptions(false);
|
||||
|
||||
|
|
@ -53,7 +54,15 @@ class TinkerCommand extends Command
|
|||
$shell->addCommands($this->getCommands());
|
||||
$shell->setIncludes($this->argument('include'));
|
||||
|
||||
$shell->run();
|
||||
$path = $this->getLaravel()->basePath('vendor/composer/autoload_classmap.php');
|
||||
|
||||
$loader = ClassAliasAutoloader::register($shell, $path);
|
||||
|
||||
try {
|
||||
$shell->run();
|
||||
} finally {
|
||||
$loader->unregister();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -71,6 +80,10 @@ class TinkerCommand extends Command
|
|||
}
|
||||
}
|
||||
|
||||
foreach (config('tinker.commands', []) as $command) {
|
||||
$commands[] = $this->getApplication()->resolve($command);
|
||||
}
|
||||
|
||||
return $commands;
|
||||
}
|
||||
|
||||
|
|
|
|||
0
pfosten/vendor/laravel/tinker/src/TinkerCaster.php
vendored
Executable file → Normal file
0
pfosten/vendor/laravel/tinker/src/TinkerCaster.php
vendored
Executable file → Normal file
20
pfosten/vendor/laravel/tinker/src/TinkerServiceProvider.php
vendored
Executable file → Normal file
20
pfosten/vendor/laravel/tinker/src/TinkerServiceProvider.php
vendored
Executable file → Normal file
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
namespace Laravel\Tinker;
|
||||
|
||||
use Illuminate\Foundation\Application as LaravelApplication;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Laravel\Lumen\Application as LumenApplication;
|
||||
use Laravel\Tinker\Console\TinkerCommand;
|
||||
|
||||
class TinkerServiceProvider extends ServiceProvider
|
||||
|
|
@ -14,6 +16,24 @@ class TinkerServiceProvider extends ServiceProvider
|
|||
*/
|
||||
protected $defer = true;
|
||||
|
||||
/**
|
||||
* Boot the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$source = realpath($raw = __DIR__ . '/../config/tinker.php') ?: $raw;
|
||||
|
||||
if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {
|
||||
$this->publishes([$source => config_path('tinker.php')]);
|
||||
} elseif ($this->app instanceof LumenApplication) {
|
||||
$this->app->configure('tinker');
|
||||
}
|
||||
|
||||
$this->mergeConfigFrom($source, 'tinker');
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue