Skip to content

Conversation

@symfonyaml
Copy link

Issue

As a dummy symfony user, when I don't use the MinkExtension correctly with the following config

# behat.yml.dist
...
    extensions:
        Behat\MinkExtension: ~   # <---- empty invalid config

we have the following PHP fatal error :

PHP Fatal error: Uncaught TypeError: array_key_exists():
Argument #2 ($array) must be of type array, null given in MinkExtension.php:120

Reproduce

composer create-project symfony/symfony-demo mink-reproduce-bug
cd ./mink-reproduce-bug
composer require --dev behat/behat friends-of-behat/symfony-extension friends-of-behat/mink-extension
echo "        Behat\MinkExtension: ~" >> behat.yml.dist
vendor/bin/behat

Solution

Checking that the config is an array, so we get this error instead :
mink

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant