Skip to content

Commit

Permalink
Revert "[2.x] Add after loop callback to Tinker (laravel#112)" (larav…
Browse files Browse the repository at this point in the history
…el#113)

This reverts commit 371df34.
  • Loading branch information
paras-malhotra committed Oct 1, 2020
1 parent 371df34 commit a25e3d7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 28 deletions.
3 changes: 1 addition & 2 deletions src/Console/TinkerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ public function handle()
$this->getCasters()
);

$shell = $this->getLaravel()->make(Shell::class, [$config]);

$shell = new Shell($config);
$shell->addCommands($this->getCommands());
$shell->setIncludes($this->argument('include'));

Expand Down
18 changes: 0 additions & 18 deletions src/Shell/TinkerShell.php

This file was deleted.

9 changes: 1 addition & 8 deletions src/TinkerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@

namespace Laravel\Tinker;

use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Foundation\Application as LaravelApplication;
use Illuminate\Support\ServiceProvider;
use Laravel\Lumen\Application as LumenApplication;
use Laravel\Tinker\Console\TinkerCommand;
use Laravel\Tinker\Shell\TinkerShell;
use Psy\Shell;

class TinkerServiceProvider extends ServiceProvider implements DeferrableProvider
{
Expand Down Expand Up @@ -38,10 +35,6 @@ public function boot()
*/
public function register()
{
$this->app->bind(Shell::class, function (Container $app, array $params) {
return new TinkerShell($params[0] ?? null);
});

$this->app->singleton('command.tinker', function () {
return new TinkerCommand;
});
Expand All @@ -56,6 +49,6 @@ public function register()
*/
public function provides()
{
return [Shell::class, 'command.tinker'];
return ['command.tinker'];
}
}

0 comments on commit a25e3d7

Please sign in to comment.