diff --git a/composer.json b/composer.json index 827dd1d..4ecae52 100644 --- a/composer.json +++ b/composer.json @@ -11,9 +11,9 @@ ], "require": { "php": "^7.2.5|^8.0", - "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", - "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", - "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", "psy/psysh": "^0.11.1|^0.12.0", "symfony/var-dumper": "^4.3.4|^5.0|^6.0|^7.0" }, @@ -23,7 +23,7 @@ "phpunit/phpunit": "^8.5.8|^9.3.3" }, "suggest": { - "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0)." + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0)." }, "autoload": { "psr-4": { @@ -38,6 +38,9 @@ } }, "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + }, "laravel": { "providers": [ "Laravel\\Tinker\\TinkerServiceProvider" diff --git a/src/Console/TinkerCommand.php b/src/Console/TinkerCommand.php index 07ad30d..f0ddd6a 100644 --- a/src/Console/TinkerCommand.php +++ b/src/Console/TinkerCommand.php @@ -10,6 +10,7 @@ use Psy\VersionUpdater\Checker; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; +use Throwable; class TinkerCommand extends Command { @@ -73,7 +74,11 @@ public function handle() if ($code = $this->option('execute')) { try { $shell->setOutput($this->output); - $shell->execute($code); + $shell->execute($code, true); + } catch (Throwable $e) { + $shell->writeException($e); + + return 1; } finally { $loader->unregister(); }