Skip to content

Conversation

@jawira
Copy link
Contributor

@jawira jawira commented Jun 12, 2020

I added "return 0" to fix this error message:

$ vendor/bin/behat --debug

behat version 3.7.0

--- configuration
    environment variable (BEHAT_PARAMS): none
    configuration file: /home/jawira/PhpstormProjects/xxxxxxxx/behat.yml

--- extensions
    extensions loaded: api_extension

PHP Fatal error:  Uncaught TypeError: Return value of "Behat\Testwork\Cli\DebugCommand::execute()" must be of the type int, NULL returned. in /home/jawira/PhpstormProjects/xxxxxxxx/vendor/symfony/console/Command/Command.php:258
Stack trace:
#0 /home/jawira/PhpstormProjects/xxxxxxxx/vendor/symfony/console/Application.php(912): Symfony\Component\Console\Command\Command->run()
#1 /home/jawira/PhpstormProjects/xxxxxxxx/vendor/symfony/console/Application.php(264): Symfony\Component\Console\Application->doRunCommand()
#2 /home/jawira/PhpstormProjects/xxxxxxxx/vendor/behat/behat/src/Behat/Testwork/Cli/Application.php(124): Symfony\Component\Console\Application->doRun()
#3 /home/jawira/PhpstormProjects/xxxxxxxx/vendor/symfony/console/Application.php(140): Behat\Testwork\Cli\Application->doRun()
#4 /home/jawira/PhpstormProjects/xxxxxxxx/vendor/behat/behat/bin/behat(34): Symfony\Component\Console\Application->run()
#5 {main}
  thrown in /home/jawira/PhpstormProjects/xxxxxxxx/vendor/symfony/console/Command/Command.php on line 258

@stof
Copy link
Member

stof commented Jun 12, 2020

is it the only command having this bug ?

@jawira
Copy link
Contributor Author

jawira commented Jun 12, 2020

Yes, other commands are ok :)

@ciaranmcnulty
Copy link
Contributor

Makes me think this isn't covered by a test?

Copy link
Member

@pamil pamil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test for it to avoid regressions?

Scenario: Debug
    When I run "behat --debug"
    Then it should pass

@jawira
Copy link
Contributor Author

jawira commented Jun 18, 2020

@pamil So I created debug.feature, I'm open to any comments.

@pamil pamil added the Bug label Jun 18, 2020
@pamil pamil merged commit 9720591 into Behat:master Jun 18, 2020
@pamil
Copy link
Member

pamil commented Jun 18, 2020

Thanks, @jawira! 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants