Skip to content

Commit aa7a467

Browse files
authored
Merge pull request #98 from laravel/input-options
[2.x] Forward input options to psysh
2 parents d462d76 + 6a0428f commit aa7a467

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
"illuminate/console": "^6.0|^7.0|^8.0",
1515
"illuminate/contracts": "^6.0|^7.0|^8.0",
1616
"illuminate/support": "^6.0|^7.0|^8.0",
17-
"psy/psysh": "^0.9|^0.10",
18-
"symfony/var-dumper": "^4.0|^5.0"
17+
"psy/psysh": "^0.10.3",
18+
"symfony/var-dumper": "^4.3|^5.0"
1919
},
2020
"require-dev": {
2121
"mockery/mockery": "^1.3.1",
22-
"phpunit/phpunit": "^8.0|^9.0"
22+
"phpunit/phpunit": "^8.4|^9.0"
2323
},
2424
"suggest": {
2525
"illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0)."

src/Console/TinkerCommand.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
namespace Laravel\Tinker\Console;
44

55
use Illuminate\Console\Command;
6+
use Illuminate\Support\Env;
67
use Laravel\Tinker\ClassAliasAutoloader;
78
use Psy\Configuration;
89
use Psy\Shell;
10+
use Psy\VersionUpdater\Checker;
911
use Symfony\Component\Console\Input\InputArgument;
1012
use Symfony\Component\Console\Input\InputOption;
1113

@@ -43,9 +45,8 @@ public function handle()
4345
{
4446
$this->getApplication()->setCatchExceptions(false);
4547

46-
$config = new Configuration([
47-
'updateCheck' => 'never',
48-
]);
48+
$config = Configuration::fromInput($this->input);
49+
$config->setUpdateCheck(Checker::NEVER);
4950

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

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

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

0 commit comments

Comments
 (0)