|
13 | 13 |
|
14 | 14 | use FriendsOfHyperf\Tinker\ClassAliasAutoloader; |
15 | 15 | use FriendsOfHyperf\WebTinker\OutputModifiers\OutputModifier; |
16 | | -use Hyperf\Collection\Collection; |
17 | | -use Hyperf\Database\Model\Model; |
18 | 16 | use Psy\Configuration; |
19 | 17 | use Psy\Shell; |
20 | | -use Symfony\Component\Console\Application; |
21 | 18 | use Symfony\Component\Console\Output\BufferedOutput; |
22 | 19 |
|
23 | 20 | use function Hyperf\Collection\collect; |
@@ -75,10 +72,16 @@ protected function createShell(BufferedOutput $output): Shell |
75 | 72 | $config->setHistoryFile(defined('PHP_WINDOWS_VERSION_BUILD') ? 'null' : '/dev/null'); |
76 | 73 |
|
77 | 74 | $config->getPresenter()->addCasters([ |
78 | | - Collection::class => 'FriendsOfHyperf\Tinker\TinkerCaster::castCollection', |
79 | | - Model::class => 'FriendsOfHyperf\Tinker\TinkerCaster::castModel', |
80 | | - Application::class => 'FriendsOfHyperf\Tinker\TinkerCaster::castApplication', |
81 | | - ]); |
| 75 | + 'Hyperf\Collection\Collection' => 'FriendsOfHyperf\Tinker\TinkerCaster::castCollection', |
| 76 | + 'Hyperf\DbConnection\Model\Model' => 'FriendsOfHyperf\Tinker\TinkerCaster::castModel', |
| 77 | + 'Hyperf\Redis\Redis' => 'FriendsOfHyperf\Tinker\TinkerCaster::castRedis', |
| 78 | + 'Hyperf\Support\Fluent' => 'FriendsOfHyperf\Tinker\TinkerCaster::castFluent', |
| 79 | + 'Hyperf\Support\MessageBag' => 'FriendsOfHyperf\Tinker\TinkerCaster::castMessageBag', |
| 80 | + 'Hyperf\ViewEngine\HtmlString' => 'FriendsOfHyperf\Tinker\TinkerCaster::castHtmlString', |
| 81 | + 'Stringable' => 'FriendsOfHyperf\Tinker\TinkerCaster::castStringable', |
| 82 | + 'Symfony\Component\Console\Application' => 'FriendsOfHyperf\Tinker\TinkerCaster::castApplication', |
| 83 | + 'FriendsOfHyperf\ValidatedDTO\SimpleDTO' => 'FriendsOfHyperf\Tinker\TinkerCaster::castSimpleDTO', |
| 84 | + ] + config('tinker.casters', [])); |
82 | 85 |
|
83 | 86 | $shell = new Shell($config); |
84 | 87 |
|
|
0 commit comments