Skip to content

Conversation

W0rma
Copy link
Contributor

@W0rma W0rma commented Mar 30, 2025

Fixes #6833

Replaces #6836

I overlooked that the release notes https://github.com/Behat/Gherkin/releases/tag/v4.12.0 already suggest a simple way to load the keywords independently from the file path:

Provide CachedArrayKeywords::withDefaultKeywords() to create an instance without an external dependency on the path to the i18n.php file in this repo. NOTE that paths to source files will change in the next Gherkin release - use the new constructor to avoid any impact.

This PR uses this approach and bumps the minimum version of behat/gherkin to 4.12 which should be okay because this version does still support PHP 8.1 which is also the case for codeception v5.

@W0rma W0rma changed the title Fix loading keywords in behat/gherkin v12 Fix loading keywords in behat/gherkin v4.12 Mar 30, 2025
@W0rma W0rma marked this pull request as ready for review March 30, 2025 18:37
@TavoNiievez TavoNiievez merged commit d7b88e7 into Codeception:main Apr 1, 2025
10 checks passed
@TavoNiievez
Copy link
Member

Thank you @W0rma

@W0rma W0rma deleted the gherkin-v12 branch April 2, 2025 04:22
@francislavoie
Copy link

@TavoNiievez can we get a release for this? I'd rather not have to stick a crappy workaround in my composer.json :(

@TavoNiievez
Copy link
Member

@francislavoie If there are no unforeseen events I will release version 5.3.0 before the end of the week.

@TavoNiievez
Copy link
Member

TavoNiievez commented May 6, 2025

I released Codeception version 5.3.0, with these changes included,

but, a few hours ago a new version of Gherkin 4.13 was also released which seems to be giving problems again.

cc. @W0rma

@francislavoie
Copy link

Thanks, 5.3.0 seems to work fine for me (I don't use Gherkin at all)

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.

Incorrect path for behat i18n.php file
3 participants