Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.x] Forward input options to psysh #98

Merged
merged 2 commits into from
Apr 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
"illuminate/console": "^6.0|^7.0|^8.0",
"illuminate/contracts": "^6.0|^7.0|^8.0",
"illuminate/support": "^6.0|^7.0|^8.0",
"psy/psysh": "^0.9|^0.10",
"symfony/var-dumper": "^4.0|^5.0"
"psy/psysh": "^0.10.3",
"symfony/var-dumper": "^4.3|^5.0"
},
"require-dev": {
"mockery/mockery": "^1.3.1",
"phpunit/phpunit": "^8.0|^9.0"
"phpunit/phpunit": "^8.4|^9.0"
},
"suggest": {
"illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0)."
Expand Down
13 changes: 5 additions & 8 deletions src/Console/TinkerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
namespace Laravel\Tinker\Console;

use Illuminate\Console\Command;
use Illuminate\Support\Env;
use Laravel\Tinker\ClassAliasAutoloader;
use Psy\Configuration;
use Psy\Shell;
use Psy\VersionUpdater\Checker;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;

Expand Down Expand Up @@ -43,9 +45,8 @@ public function handle()
{
$this->getApplication()->setCatchExceptions(false);

$config = new Configuration([
'updateCheck' => 'never',
]);
$config = Configuration::fromInput($this->input);
GrahamCampbell marked this conversation as resolved.
Show resolved Hide resolved
$config->setUpdateCheck(Checker::NEVER);

$config->getPresenter()->addCasters(
$this->getCasters()
Expand All @@ -55,11 +56,7 @@ public function handle()
$shell->addCommands($this->getCommands());
$shell->setIncludes($this->argument('include'));

if (isset($_ENV['COMPOSER_VENDOR_DIR'])) {
$path = $_ENV['COMPOSER_VENDOR_DIR'];
} else {
$path = $this->getLaravel()->basePath().DIRECTORY_SEPARATOR.'vendor';
}
$path = Env::get('COMPOSER_VENDOR_DIR', $this->getLaravel()->basePath().DIRECTORY_SEPARATOR.'vendor');

$path .= '/composer/autoload_classmap.php';

Expand Down