Skip to content

Fire Local Get DB Reference Directory Creation Error #82

@hkorik

Description

@hkorik

As a developer attempting to setup a site for the first time using the fire setup -y or fire local:build command, the process will fail. See below.

The sub command that fetches a copy of the remote DB as a zipped file and attempts to place the zipped file inside the ./reference directory, will fail after it creates that local directory, if the directory doesn't yet exist.

The empty directory gets created successfully but the following code execution fails to continue due to this error.

 [Exec] Running /REDACTED-WEB-ROOT/vendor/bin/fire local:get-db
PHP Fatal error:  Uncaught TypeError: Robo\Collection\CollectionBuilder::addTask(): Argument #1 ($task) must be of type Robo\Contract\TaskInterface, Robo\Result given, called in /REDACTED-WEB-ROOT/vendor/fourkitchens/fire/src/Robo/Plugin/Commands/GetDBCommand.php on line 33 and defined in /REDACTED-WEB-ROOT/vendor/consolidation/robo/src/Collection/CollectionBuilder.php:169
Stack trace:
#0 /REDACTED-WEB-ROOT/vendor/fourkitchens/fire/src/Robo/Plugin/Commands/GetDBCommand.php(33): Robo\Collection\CollectionBuilder->addTask(Object(Robo\Result))
#1 [internal function]: Fire\Robo\Plugin\Commands\GetDBCommand->getDB(Object(Robo\Symfony\ConsoleIO), Array, Array)
#2 /REDACTED-WEB-ROOT/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array(Array, Array)
#3 /REDACTED-WEB-ROOT/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#4 /REDACTED-WEB-ROOT/vendor/consolidation/annotated-command/src/CommandProcessor.php(175): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#5 /REDACTED-WEB-ROOT/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(387): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#6 /REDACTED-WEB-ROOT/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /REDACTED-WEB-ROOT/vendor/symfony/console/Application.php(1088): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /REDACTED-WEB-ROOT/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /REDACTED-WEB-ROOT/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /REDACTED-WEB-ROOT/vendor/consolidation/robo/src/Runner.php(282): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /REDACTED-WEB-ROOT/vendor/fourkitchens/fire/src/FireApp.php(102): Robo\Runner->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), Object(Symfony\Component\Console\Application), Array)
#12 /REDACTED-WEB-ROOT/vendor/fourkitchens/fire/bin/fire.php(39): Fire\FireApp->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /REDACTED-WEB-ROOT/vendor/fourkitchens/fire/bin/fire(4): require('/REDACTED-WEB-ROOT/...')
#14 /REDACTED-WEB-ROOT/vendor/bin/fire(119): include('/REDACTED-WEB-ROOT/...')
#15 {main}
  thrown in /REDACTED-WEB-ROOT/vendor/consolidation/robo/src/Collection/CollectionBuilder.php on line 169

Fatal error: Uncaught TypeError: Robo\Collection\CollectionBuilder::addTask(): Argument #1 ($task) must be of type Robo\Contract\TaskInterface, Robo\Result given, called in /REDACTED-WEB-ROOT/vendor/fourkitchens/fire/src/Robo/Plugin/Commands/GetDBCommand.php on line 33 and defined in /REDACTED-WEB-ROOT/vendor/consolidation/robo/src/Collection/CollectionBuilder.php:169
Stack trace:
#0 /REDACTED-WEB-ROOT/vendor/fourkitchens/fire/src/Robo/Plugin/Commands/GetDBCommand.php(33): Robo\Collection\CollectionBuilder->addTask(Object(Robo\Result))
#1 [internal function]: Fire\Robo\Plugin\Commands\GetDBCommand->getDB(Object(Robo\Symfony\ConsoleIO), Array, Array)
#2 /REDACTED-WEB-ROOT/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array(Array, Array)
#3 /REDACTED-WEB-ROOT/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#4 /REDACTED-WEB-ROOT/vendor/consolidation/annotated-command/src/CommandProcessor.php(175): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#5 /REDACTED-WEB-ROOT/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(387): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#6 /REDACTED-WEB-ROOT/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /REDACTED-WEB-ROOT/vendor/symfony/console/Application.php(1088): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /REDACTED-WEB-ROOT/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /REDACTED-WEB-ROOT/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /REDACTED-WEB-ROOT/vendor/consolidation/robo/src/Runner.php(282): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /REDACTED-WEB-ROOT/vendor/fourkitchens/fire/src/FireApp.php(102): Robo\Runner->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), Object(Symfony\Component\Console\Application), Array)
#12 /REDACTED-WEB-ROOT/vendor/fourkitchens/fire/bin/fire.php(39): Fire\FireApp->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /REDACTED-WEB-ROOT/vendor/fourkitchens/fire/bin/fire(4): require('/REDACTED-WEB-ROOT/...')
#14 /REDACTED-WEB-ROOT/vendor/bin/fire(119): include('/REDACTED-WEB-ROOT/...')
#15 {main}
  thrown in /REDACTED-WEB-ROOT/vendor/consolidation/robo/src/Collection/CollectionBuilder.php on line 169
 [Exec]  Exit code 255  Time 0.11s
 [Exec]  Exit code 255  Time 3.195s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions