Skip to content

Conversation

@VadymHrechukha
Copy link

This PR fixes an issue in Behat\Behat\Gherkin\ServiceContainer\GherkinExtension::getLibPath(), where the method incorrectly assumes the path to the Gherkin library using '/../../../'.

After Behat/Gherkin#288, the CachedArrayKeywords.php file was relocated, making the hardcoded path incorrect. This caused issues with loading Gherkin keyword data, leading to errors like:

PHP Fatal error:  Uncaught TypeError: Behat\Gherkin\Keywords\ArrayKeywords::__construct(): 
Argument #1 ($keywords) must be of type array, false given...

Changes:

  • Updated getLibPath() to use '/../' instead of '/../../../' to correctly resolve the library path.

Impact:

  • Fixes Behat execution errors caused by the incorrect path resolution.
  • Ensures compatibility with the latest Behat/Gherkin restructuring.

@carlos-granados
Copy link
Contributor

Closed in favour of #1604

@acoulton
Copy link
Contributor

@VadymHrechukha thanks for highlighting this issue and the excellent issue / PR description 😄

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.

3 participants