Fix loading keywords in behat/gherkin v4.12 by W0rma · Pull Request #6839 · Codeception/Codeception · GitHub
Skip to content

Fix loading keywords in behat/gherkin v4.12 - #6839

Merged
TavoNiievez merged 1 commit into
Codeception:mainfrom
W0rma:gherkin-v12
Apr 1, 2025
Merged

TavoNiievez merged 1 commit into
Codeception:mainfrom
W0rma:gherkin-v12

Conversation

@W0rma

@W0rma W0rma commented Mar 30, 2025

Copy link
Copy Markdown
Contributor

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
@TavoNiievez

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown

@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
Copy Markdown
Member

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

@TavoNiievez

TavoNiievez commented May 6, 2025 •

Copy link
Copy Markdown
Member

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
Copy Markdown

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