Skip to content

Commit f7eba20

Browse files
Fix psysh upgrade
1 parent 9cd2ea8 commit f7eba20

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"monolog/monolog": "~1.11",
2727
"mtdowling/cron-expression": "~1.0",
2828
"nesbot/carbon": "~1.19",
29-
"psy/psysh": "0.5.*",
29+
"psy/psysh": "~0.5.1",
3030
"swiftmailer/swiftmailer": "~5.1",
3131
"symfony/console": "2.7.*",
3232
"symfony/css-selector": "2.7.*",

src/Illuminate/Foundation/Console/Tinker/IlluminateCaster.php

+13-12
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
namespace Illuminate\Foundation\Console\Tinker\Casters;
44

55
use Exception;
6-
use Illuminate\Database\Eloquent\Model;
7-
use Illuminate\Foundation\Application;
86
use Illuminate\Support\Collection;
9-
use Symfony\Component\VarDumper\Caster\Caster;
7+
use Illuminate\Foundation\Application;
8+
use Illuminate\Database\Eloquent\Model;
109
use Symfony\Component\VarDumper\Cloner\Stub;
10+
use Symfony\Component\VarDumper\Caster\Caster;
1111

1212
class FoundationCaster
1313
{
1414
/**
15-
* Illuminate Application methods to include in the presenter.
15+
* Illuminate application methods to include in the presenter.
1616
*
1717
* @var array
1818
*/
@@ -34,9 +34,9 @@ class FoundationCaster
3434
];
3535

3636
/**
37-
* Get an array representing the properties of an Application object.
37+
* Get an array representing the properties of an application.
3838
*
39-
* @param Application $value
39+
* @param \Illuminate\Foundation\Application $app
4040
* @param array $a
4141
* @param Stub $stub
4242
* @param bool $isNested
@@ -49,21 +49,22 @@ public static function castApplication(Application $app, array $a, Stub $stub, $
4949

5050
foreach (self::$appProperties as $property) {
5151
try {
52-
$val = $value->$property();
53-
if ( ! is_null($val)) {
52+
$val = $app->$property();
53+
if (!is_null($val)) {
5454
$a[Caster::PREFIX_VIRTUAL . $property] = $val;
5555
}
5656
} catch (Exception $e) {
57+
//
5758
}
5859
}
5960

6061
return $a;
6162
}
6263

6364
/**
64-
* Get an array representing the properties of a Collection.
65+
* Get an array representing the properties of a collection.
6566
*
66-
* @param Collection $value
67+
* @param \Illuminate\Support\Collection $value
6768
* @param array $a
6869
* @param Stub $stub
6970
* @param bool $isNested
@@ -78,9 +79,9 @@ public static function castCollection(Collection $coll, array $a, Stub $stub, $i
7879
}
7980

8081
/**
81-
* Get an array representing the properties of a Model object.
82+
* Get an array representing the properties of a model.
8283
*
83-
* @param Application $value
84+
* @param \Illuminate\Database\Eloquent\Model $model
8485
* @param array $a
8586
* @param Stub $stub
8687
* @param bool $isNested

src/Illuminate/Foundation/Console/TinkerCommand.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ protected function getCommands()
7373
}
7474

7575
/**
76-
* Get an array of Laravel tailored Casters.
76+
* Get an array of Laravel tailored casters.
7777
*
7878
* @return array
7979
*/
8080
protected function getCasters()
8181
{
8282
return [
83-
'Illuminate\Foundation\Application' => 'Illuminate\Foundation\Console\Tinker\IlluminateCaster::castApplication',
84-
'Illuminate\Support\Collection' => 'Illuminate\Foundation\Console\Tinker\IlluminateCaster::castCollection',
83+
'Illuminate\Foundation\Application' => 'Illuminate\Foundation\Console\Tinker\IlluminateCaster::castApplication',
84+
'Illuminate\Support\Collection' => 'Illuminate\Foundation\Console\Tinker\IlluminateCaster::castCollection',
8585
'Illuminate\Database\Eloquent\Model' => 'Illuminate\Foundation\Console\Tinker\IlluminateCaster::castModel',
8686
];
8787
}

0 commit comments

Comments
 (0)