drupal-console icon indicating copy to clipboard operation
drupal-console copied to clipboard

Return value of "Drupal\Console\Command\Config\ImportSingleCommand::execute()" should always be of the type int since Symfony 4.4, NULL returned.

Open Bladedu opened this issue 3 years ago • 0 comments

Issue title

This method should always return an int value.

Problem/Motivation

When the command executes successfully, no value is returned (NULL).

How to reproduce

This snippet will trigger the deprecation warning on Drupal 9.1.8: $config_name = 'dummy_config'; $singleImporter = new ImportSingleCommand( $this->container->get('config.storage'), $this->container->get('config.manager') ); $input = new StringInput('--file="../config/' . $config_name . '.yml"'); $output = new BufferedOutput(); $res = $singleImporter->run($input, $output);

  • Drupal: 9.1.8
  • drupal/console: 1.9.7

Solution

return 0 when execute has succeded.

Bladedu avatar May 07 '21 08:05 Bladedu