Aggiornato Composer
This commit is contained in:
16
vendor/laravel/tinker/composer.json
vendored
16
vendor/laravel/tinker/composer.json
vendored
@@ -11,18 +11,19 @@
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.2.5|^8.0",
|
||||
"illuminate/console": "^6.0|^7.0|^8.0|^9.0",
|
||||
"illuminate/contracts": "^6.0|^7.0|^8.0|^9.0",
|
||||
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
|
||||
"psy/psysh": "^0.10.4|^0.11.1",
|
||||
"symfony/var-dumper": "^4.3.4|^5.0|^6.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",
|
||||
"psy/psysh": "^0.11.1|^0.12.0",
|
||||
"symfony/var-dumper": "^4.3.4|^5.0|^6.0|^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "~1.3.3|^1.4.2",
|
||||
"phpstan/phpstan": "^1.10",
|
||||
"phpunit/phpunit": "^8.5.8|^9.3.3"
|
||||
},
|
||||
"suggest": {
|
||||
"illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0)."
|
||||
"illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0)."
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@@ -37,9 +38,6 @@
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.x-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Laravel\\Tinker\\TinkerServiceProvider"
|
||||
|
||||
@@ -52,6 +52,10 @@ class TinkerCommand extends Command
|
||||
$this->getCasters()
|
||||
);
|
||||
|
||||
if ($this->option('execute')) {
|
||||
$config->setRawOutput(true);
|
||||
}
|
||||
|
||||
$shell = new Shell($config);
|
||||
$shell->addCommands($this->getCommands());
|
||||
$shell->setIncludes($this->argument('include'));
|
||||
@@ -127,6 +131,10 @@ class TinkerCommand extends Command
|
||||
$casters['Illuminate\Database\Eloquent\Model'] = 'Laravel\Tinker\TinkerCaster::castModel';
|
||||
}
|
||||
|
||||
if (class_exists('Illuminate\Process\ProcessResult')) {
|
||||
$casters['Illuminate\Process\ProcessResult'] = 'Laravel\Tinker\TinkerCaster::castProcessResult';
|
||||
}
|
||||
|
||||
if (class_exists('Illuminate\Foundation\Application')) {
|
||||
$casters['Illuminate\Foundation\Application'] = 'Laravel\Tinker\TinkerCaster::castApplication';
|
||||
}
|
||||
|
||||
18
vendor/laravel/tinker/src/TinkerCaster.php
vendored
18
vendor/laravel/tinker/src/TinkerCaster.php
vendored
@@ -94,6 +94,22 @@ class TinkerCaster
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an array representing the properties of a process result.
|
||||
*
|
||||
* @param \Illuminate\Process\ProcessResult $result
|
||||
* @return array
|
||||
*/
|
||||
public static function castProcessResult($result)
|
||||
{
|
||||
return [
|
||||
Caster::PREFIX_VIRTUAL.'output' => $result->output(),
|
||||
Caster::PREFIX_VIRTUAL.'errorOutput' => $result->errorOutput(),
|
||||
Caster::PREFIX_VIRTUAL.'exitCode' => $result->exitCode(),
|
||||
Caster::PREFIX_VIRTUAL.'successful' => $result->successful(),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an array representing the properties of a model.
|
||||
*
|
||||
@@ -113,7 +129,7 @@ class TinkerCaster
|
||||
$hidden = array_flip($model->getHidden());
|
||||
|
||||
$appends = (function () {
|
||||
return array_combine($this->appends, $this->appends);
|
||||
return array_combine($this->appends, $this->appends); // @phpstan-ignore-line
|
||||
})->bindTo($model, $model)();
|
||||
|
||||
foreach ($appends as $appended) {
|
||||
|
||||
@@ -20,7 +20,7 @@ class TinkerServiceProvider extends ServiceProvider implements DeferrableProvide
|
||||
$source = realpath($raw = __DIR__.'/../config/tinker.php') ?: $raw;
|
||||
|
||||
if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {
|
||||
$this->publishes([$source => config_path('tinker.php')]);
|
||||
$this->publishes([$source => $this->app->configPath('tinker.php')]);
|
||||
} elseif ($this->app instanceof LumenApplication) {
|
||||
$this->app->configure('tinker');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user