1 | <?php |
||
23 | class MongodbMigrateCommand extends Command |
||
24 | { |
||
25 | /** |
||
26 | * @var ContainerInterface |
||
27 | */ |
||
28 | private $container; |
||
29 | |||
30 | /** |
||
31 | * @var Finder |
||
32 | */ |
||
33 | private $finder; |
||
34 | |||
35 | /** |
||
36 | * @var DocumentManagerHelper |
||
37 | */ |
||
38 | private $documentManager; |
||
39 | |||
40 | /** |
||
41 | * @var string |
||
42 | */ |
||
43 | private $databaseName; |
||
44 | |||
45 | /** |
||
46 | * @param ContainerInterface $container container instance for injecting into aware migrations |
||
47 | * @param Finder $finder finder that finds configs |
||
48 | * @param DocumentManagerHelper $documentManager dm helper to get access to db in command |
||
49 | * @param string $databaseName name of database where data is found in |
||
50 | */ |
||
51 | public function __construct( |
||
64 | |||
65 | /** |
||
66 | * setup command |
||
67 | * |
||
68 | * @return void |
||
69 | */ |
||
70 | protected function configure() |
||
76 | |||
77 | /** |
||
78 | * call execute on found commands |
||
79 | * |
||
80 | * @param InputInterface $input user input |
||
81 | * @param OutputInterface $output command output |
||
82 | * |
||
83 | * @return void |
||
84 | */ |
||
85 | public function execute(InputInterface $input, OutputInterface $output) |
||
123 | |||
124 | /** |
||
125 | * get configration object for migration script |
||
126 | * |
||
127 | * This is based on antromattr/mongodb-migartion code but extends it so we can inject |
||
128 | * non local stuff centrally. |
||
129 | * |
||
130 | * @param string $filepath path to configuration file |
||
131 | * @param Output $output ouput interface need by config parser to do stuff |
||
132 | * |
||
133 | * @return AntiMattr\MongoDB\Migrations\Configuration\Configuration |
||
134 | */ |
||
135 | private function getConfiguration($filepath, $output) |
||
157 | |||
158 | /** |
||
159 | * Injects the container to migrations aware of it |
||
160 | * |
||
161 | * @param ContainerInterface $container container to inject into container aware migrations |
||
162 | * @param array $versions versions that might need injecting a container |
||
163 | * |
||
164 | * @return void |
||
165 | */ |
||
166 | private static function injectContainerToMigrations(ContainerInterface $container, array $versions) |
||
175 | } |
||
176 |
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: