1 | <?php |
||
9 | class MigrateOrganise extends BaseCommand |
||
10 | { |
||
11 | /** |
||
12 | * The console command name. |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $name = 'migrate:organise'; |
||
17 | |||
18 | /** |
||
19 | * The console command description. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $description = 'Move migrations into a yyyy/mm folder structure'; |
||
24 | |||
25 | /** |
||
26 | * The migrator instance. |
||
27 | * |
||
28 | * @var \Jaybizzle\MigrationsOrganiser\Migrator |
||
29 | */ |
||
30 | protected $migrator; |
||
31 | |||
32 | /** |
||
33 | * The filesystem instance. |
||
34 | * |
||
35 | * @var \Illuminate\Filesystem\Filesystem |
||
36 | */ |
||
37 | protected $files; |
||
38 | |||
39 | /** |
||
40 | * Create a new migrator instance. |
||
41 | * |
||
42 | * @param \Illuminate\Filesystem\Filesystem $files |
||
43 | * @param \Illuminate\Database\Migrations\Migrator $migrator |
||
44 | */ |
||
45 | public function __construct(Filesystem $files, Migrator $migrator) |
||
51 | |||
52 | /** |
||
53 | * Fire the command. (Compatibility for < 5.5) |
||
54 | */ |
||
55 | public function fire() |
||
59 | |||
60 | /** |
||
61 | * Create date folder structure and move migrations into. |
||
62 | * |
||
63 | * @return void |
||
64 | */ |
||
65 | public function handle() |
||
91 | } |
||
92 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: