Page MenuHomePhabricator

DivinerGenerateWorkflow::getDivinerAtomWorldVersion has wrong behavior after ClassMapQuery change
Closed, ResolvedPublic

Description

Stack trace:

PHP Fatal error:  Cannot use object of type DivinerArticleAtomizer as array in /core/lib/phabricator/src/applications/diviner/workflow/DivinerGenerateWorkflow.php on line 423
 at [<phutil>/src/future/exec/ExecFuture.php:416]
libcore(), phutil(head=stable, ref.master=92882eb9404d, ref.stable=d266f8554c45)
  #0 ExecFuture::resolvex() called at [<libcore>/workflow/host/CoreHostRestartWorkflow.php:216]
  #1 CoreHostRestartWorkflow::restartDiviner(string) called at [<libcore>/workflow/host/CoreHostRestartWorkflow.php:44]
  #2 CoreHostRestartWorkflow::restartInstance(string, PhutilArgumentParser, string) called at [<libcore>/workflow/host/CoreHostRestartWorkflow.php:26]
  #3 CoreHostRestartWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:406]
  #4 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:301]
  #5 PhutilArgumentParser::parseWorkflows(array) called at [/core/scripts/host.php:19]

Relevant snippet:

...
    $atomizers = id(new PhutilClassMapQuery())
      ->setAncestorClass('DivinerAtomizer')
      ->execute();

    $atomizer_versions = array();
    foreach ($atomizers as $atomizer) {
      $atomizer_versions[$atomizer['name']] = call_user_func(
...