I have an error if launch drush update-migration-config:

 [error]  Error: Call to undefined function Drupal\entity_staging\Commands\_drush_log_drupal_messages() in Drupal\entity_staging\Commands\EntityStagingCommands->migrationConfig() (line 60 of /project/web/modules/contrib/entity_staging/src/Commands/EntityStagingCommands.php) #0 [internal function]: Drupal\entity_staging\Commands\EntityStagingCommands->migrationConfig(Array)
#1 /project/vendor/consolidation/annotated-command/src/CommandProcessor.php(235): call_user_func_array(Array, Array)
#2 /project/vendor/consolidation/annotated-command/src/CommandProcessor.php(181): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#3 /project/vendor/consolidation/annotated-command/src/CommandProcessor.php(150): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#4 /project/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(404): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#5 /project/vendor/symfony/console/Command/Command.php(252): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /project/vendor/symfony/console/Application.php(964): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /project/vendor/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /project/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /project/vendor/drush/drush/src/Runtime/Runtime.php(112): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /project/vendor/drush/drush/src/Runtime/Runtime.php(41): Drush\Runtime\Runtime->doRun(Array)
#11 /project/vendor/drush/drush/drush.php(66): Drush\Runtime\Runtime->run(Array)
#12 /project/vendor/drush/drush/drush(4): require('/project/vendor...')
#13 {main}. 
Error: Call to undefined function Drupal\entity_staging\Commands\_drush_log_drupal_messages() in /project/web/modules/contrib/entity_staging/src/Commands/EntityStagingCommands.php on line 60 #0 [internal function]: Drupal\entity_staging\Commands\EntityStagingCommands->migrationConfig(Array)
#1 /project/vendor/consolidation/annotated-command/src/CommandProcessor.php(235): call_user_func_array(Array, Array)
#2 /project/vendor/consolidation/annotated-command/src/CommandProcessor.php(181): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#3 /project/vendor/consolidation/annotated-command/src/CommandProcessor.php(150): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#4 /project/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(404): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#5 /project/vendor/symfony/console/Command/Command.php(252): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /project/vendor/symfony/console/Application.php(964): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /project/vendor/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /project/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /project/vendor/drush/drush/src/Runtime/Runtime.php(112): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /project/vendor/drush/drush/src/Runtime/Runtime.php(41): Drush\Runtime\Runtime->doRun(Array)
#11 /project/vendor/drush/drush/drush.php(66): Drush\Runtime\Runtime->run(Array)
#12 /project/vendor/drush/drush/drush(4): require('/project/vendor...')
#13 {main}
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

liber_t created an issue. See original summary.

liber_t’s picture

DrDam’s picture

Patch works fine.
Ok to RTBC

DrDam’s picture

Status: Active » Reviewed & tested by the community
6lv1’s picture

Patch working fine for me too.

GoZ’s picture

Status: Reviewed & tested by the community » Needs work

Thanks, but you should check function exists and call it only if it exists. People using Drush 8.x or Drush < 9.6.0-beta3 still needs it.

Florent Jousseaume’s picture

FileSize
881 bytes

With function_exists() check.

GoZ’s picture

Good thing to take care of compatibility.

Otherwise, function_exists should take the function name without ().

  • GoZ committed 7b3c207 on 8.x-1.x authored by liber_t
    Issue #2973904 by liber_t, Florent Jousseaume, DrDam, GoZ: Call to...
GoZ’s picture

Status: Needs work » Fixed

Thanks all

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.