1 | <?php |
||
20 | class SetupIndexCommand extends ContainerAwareCommand |
||
21 | { |
||
22 | /** |
||
23 | * @var SearchConfigurationChain |
||
24 | */ |
||
25 | private $configurationChain; |
||
26 | |||
27 | public function __construct(/* SearchConfigurationChain */ $configurationChain = null) |
||
28 | { |
||
29 | parent::__construct(); |
||
30 | |||
31 | if (!$configurationChain instanceof SearchConfigurationChain) { |
||
32 | @trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version symfony 3.4 and will be removed in symfony 4.0. If the command was registered by convention, make it a service instead. ', __METHOD__), E_USER_DEPRECATED); |
||
|
|||
33 | |||
34 | $this->setName(null === $configurationChain ? 'kuma:search:setup' : $configurationChain); |
||
35 | |||
36 | return; |
||
37 | } |
||
38 | |||
39 | $this->configurationChain = $configurationChain; |
||
40 | } |
||
41 | |||
42 | protected function configure() |
||
48 | |||
49 | /** |
||
50 | * @param InputInterface $input |
||
51 | * @param OutputInterface $output |
||
52 | * |
||
53 | * @return null|int null or 0 if everything went fine, or an error code |
||
54 | */ |
||
55 | protected function execute(InputInterface $input, OutputInterface $output) |
||
84 | } |
||
85 |
If you suppress an error, we recommend checking for the error condition explicitly: