acquia / blt-behat

Acquia BLT plugin providing integration with Behat
GNU General Public License v2.0
0 stars 16 forks source link

Errors when Running Init on new Project #10

Closed mikemadison13 closed 2 years ago

mikemadison13 commented 3 years ago

I ran the blt tests:behat:init command on a brand new project and got a ton of errors (see below). In retrospect, this is because I hadn't run the recipe first (because I didn't realize there was one). SO! At minimum, I'll put in a PR to update the README to instruct running the recipe upon adding to projects. It might also be wise to add additional error handling to the init command to either fail more gracefully and/or run the recipe automatically.

$ lando blt tests:behat

If you would like to customize the behavior of this message then check out:
https://docs.lando.dev/config/releases.html
[warning] Behat is not configured properly.
BLT can (re)generate tests/behat/local.yml using tests/behat/example.local.yml.
 Do you want (re)generate local Behat config in tests/behat/local.yml? (y/n) y
> tests:behat:init
Generating Behat configuration files...
PHP Warning:  file(/app/tests/behat/local.yml): Failed to open stream: No such file or directory in /app/vendor/acquia/blt/src/Robo/Config/BltConfig.php on line 20

Warning: file(/app/tests/behat/local.yml): Failed to open stream: No such file or directory in /app/vendor/acquia/blt/src/Robo/Config/BltConfig.php on line 20
PHP Fatal error:  Uncaught TypeError: Dflydev\DotAccessData\Data::__construct(): Argument #1 ($data) must be of type ?array, bool given, called in /app/vendor/grasmash/yaml-expander/src/Expander.php on line 51 and defined in /app/vendor/dflydev/dot-access-data/src/Dflydev/DotAccessData/Data.php:28
Stack trace:
#0 /app/vendor/grasmash/yaml-expander/src/Expander.php(51): Dflydev\DotAccessData\Data->__construct(false)
#1 /app/vendor/acquia/blt/src/Robo/Config/BltConfig.php(20): Grasmash\YamlExpander\Expander::expandArrayProperties(false, Array)
#2 /app/vendor/acquia/blt-behat/src/Blt/Plugin/Commands/BehatTestCommand.php(64): Acquia\Blt\Robo\Config\BltConfig->expandFileProperties('/app/tests/beha...')
#3 [internal function]: Acquia\BltBehat\Blt\Plugin\Commands\BehatTestCommand->setupBehat(Array)
#4 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#5 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#6 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#7 /app/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(313): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#8 /app/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /app/vendor/symfony/console/Application.php(1027): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /app/vendor/acquia/blt/src/Robo/Application.php(31): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /app/vendor/acquia/blt/src/Robo/Application.php(22): Acquia\Blt\Robo\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /app/vendor/acquia/blt/src/Robo/BltTasks.php(97): Acquia\Blt\Robo\Application->runCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /app/vendor/acquia/blt-behat/src/Blt/Wizards/TestsWizard.php(30): Acquia\Blt\Robo\BltTasks->invokeCommand('tests:behat:ini...')
#14 /app/vendor/acquia/blt-behat/src/Blt/Plugin/Commands/BehatTestCommand.php(103): Acquia\BltBehat\Blt\Wizards\TestsWizard->wizardConfigureBehat()
#15 [internal function]: Acquia\BltBehat\Blt\Plugin\Commands\BehatTestCommand->behat(Array)
#16 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#17 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#18 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#19 /app/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(313): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#20 /app/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /app/vendor/symfony/console/Application.php(1027): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /app/vendor/acquia/blt/src/Robo/Application.php(31): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /app/vendor/symfony/console/Application.php(273): Acquia\Blt\Robo\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /app/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /app/vendor/consolidation/robo/src/Runner.php(279): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 /app/vendor/acquia/blt/src/Robo/Blt.php(250): Robo\Runner->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), Object(Acquia\Blt\Robo\Application), Array)
#27 /app/vendor/acquia/blt/bin/blt-robo-run.php(35): Acquia\Blt\Robo\Blt->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#28 /app/vendor/acquia/blt/bin/blt-robo.php(15): require_once('/app/vendor/acq...')
#29 /app/vendor/acquia/blt/bin/blt(11): require_once('/app/vendor/acq...')
#30 {main}
  thrown in /app/vendor/dflydev/dot-access-data/src/Dflydev/DotAccessData/Data.php on line 28

Fatal error: Uncaught TypeError: Dflydev\DotAccessData\Data::__construct(): Argument #1 ($data) must be of type ?array, bool given, called in /app/vendor/grasmash/yaml-expander/src/Expander.php on line 51 and defined in /app/vendor/dflydev/dot-access-data/src/Dflydev/DotAccessData/Data.php:28
Stack trace:
#0 /app/vendor/grasmash/yaml-expander/src/Expander.php(51): Dflydev\DotAccessData\Data->__construct(false)
#1 /app/vendor/acquia/blt/src/Robo/Config/BltConfig.php(20): Grasmash\YamlExpander\Expander::expandArrayProperties(false, Array)
#2 /app/vendor/acquia/blt-behat/src/Blt/Plugin/Commands/BehatTestCommand.php(64): Acquia\Blt\Robo\Config\BltConfig->expandFileProperties('/app/tests/beha...')
#3 [internal function]: Acquia\BltBehat\Blt\Plugin\Commands\BehatTestCommand->setupBehat(Array)
#4 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#5 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#6 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#7 /app/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(313): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#8 /app/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /app/vendor/symfony/console/Application.php(1027): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /app/vendor/acquia/blt/src/Robo/Application.php(31): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /app/vendor/acquia/blt/src/Robo/Application.php(22): Acquia\Blt\Robo\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /app/vendor/acquia/blt/src/Robo/BltTasks.php(97): Acquia\Blt\Robo\Application->runCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /app/vendor/acquia/blt-behat/src/Blt/Wizards/TestsWizard.php(30): Acquia\Blt\Robo\BltTasks->invokeCommand('tests:behat:ini...')
#14 /app/vendor/acquia/blt-behat/src/Blt/Plugin/Commands/BehatTestCommand.php(103): Acquia\BltBehat\Blt\Wizards\TestsWizard->wizardConfigureBehat()
#15 [internal function]: Acquia\BltBehat\Blt\Plugin\Commands\BehatTestCommand->behat(Array)
#16 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#17 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#18 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#19 /app/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(313): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#20 /app/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /app/vendor/symfony/console/Application.php(1027): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /app/vendor/acquia/blt/src/Robo/Application.php(31): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /app/vendor/symfony/console/Application.php(273): Acquia\Blt\Robo\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /app/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /app/vendor/consolidation/robo/src/Runner.php(279): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 /app/vendor/acquia/blt/src/Robo/Blt.php(250): Robo\Runner->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), Object(Acquia\Blt\Robo\Application), Array)
#27 /app/vendor/acquia/blt/bin/blt-robo-run.php(35): Acquia\Blt\Robo\Blt->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#28 /app/vendor/acquia/blt/bin/blt-robo.php(15): require_once('/app/vendor/acq...')
#29 /app/vendor/acquia/blt/bin/blt(11): require_once('/app/vendor/acq...')
#30 {main}
  thrown in /app/vendor/dflydev/dot-access-data/src/Dflydev/DotAccessData/Data.php on line 28