Closed Sut3kh closed 5 years ago
I think the problem you are facing is not due to Gherkin, but Behat (behat/behat). Specifically this change that appeared in 3.4 requires that you run Behat in the directory that you want to be the base path, rather than passing the path as an argument: https://github.com/Behat/Behat/commit/08802b7f2d736b88df339e5411a1c722e92adbe3
Seems like a bug to me, but I haven't had time to dig in.
Edit: this might be the actual bug report: https://github.com/Behat/Behat/issues/1076
And although the report is against behat, you might be right that the fix lies with Gherkin: https://github.com/Behat/Gherkin/pull/129
@jhedstrom this can probably be closed in favor of the upstream bug I linked above
@danepowell Thanks for interlinking the issues, I was not aware that this was also reported here.
For people landing here, there are instructions on both of the upstream tickets explaining how to patch your installation.
A fix for this has been posted around the time this issue was created but unfortunately it is still not committed upstream. Feel free to vote for the upstream issue to help get maintainer attention, or even better to review + approve the PR.
When upgrading to gherkin 4.5.1 if I run tests via paths (i.e.
behat features/my.feature
) then i get errors like:I'm not sure what has changed in gherkin but when it tries to validate the path the pwd is
DRUPAL_ROOT
and it fails (it is comparingfeatures/my.feature
toweb/features
). If i comment out the following line in Drupal/Driver/Cores/Drupal8.php:30 'chdir(DRUPAL_ROOT);
' then it works (but on an empty cache you get all sorts of weird issues when not inDRUPAL_ROOT
).The problem goes away if I force a downgrade via the following versions in composer:
Directory structure (using drupal-composer):
Major component versions when failing:
Major component versions when working: