behat/gherkin
behat/gherkin is a PHP library for parsing the Gherkin language used in BDD. Read and tokenize feature files, build an AST, and integrate with Behat or other test runners to execute human-readable scenarios in your test suite.
@ (e.g. wip&&~slow instead of [@wip](https://github.com/wip)&&~[@slow](https://github.com/slow)).
This syntax was never officially supported, but previously worked and was broken by 4.16.0. We have temporarily
fixed this, but it is deprecated and will be removed in the next major version. By @acoulton in #407gherkin-32 compatibility mode is enabled:
Stringable to classes implementing __toString() by @acoulton in #402#language:no-such) and falls back to the default language (e.g. en). Previously, the resultant FeatureNode::getLanguage() would return the original invalid value from the feature file - it will now return the language that was actually used for parsing. By @stof in #350GherkinCompatibilityMode to control how gherkin files are parsed. In the default legacy mode, there is no change to parsing. In the new experimental gherkin-32 mode, files will in future be parsed consistently with the official cucumber/gherkin parsers. This mode is not yet complete - in this first release:
\n literals in table cells will be parsed as newlines by @stof in #359 and #391ru (Russian) and af (Afrikaans) from cucumber/gherkin in #381 and #386behat/gherkin version is unknown by @uuf6429 in #370Scenario and Scenario Outline as synonyms depending on the presence (or not) of an Examples: keyword.
by @acoulton in #316 and #324.feature file that does not contain a Feature by @acoulton in #340| (instead of throwing) by @acoulton in #341Yaml::parseFile API to handle Yaml files by @stof in #335to use thei18n.php` file without depending on paths to other files in this repo. By @uuf6429 in #288amh (Amharic), be (Belarusian) and ml (Malayalam) from cucumber/gherkin in #306ga (Irish), it (Italian), ja (Japanese), ka (Georgian) and ko (Korean) from cucumber/gherkin in #306CachedArrayKeywords::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. by @carlos-granados in #290ExampleNode::getTitle() and ScenarioNode::getTitle() in favour of new methods with clearer meaning.
by @uuf6429 in #271(ExampleNode|ScenarioNode)::getName() to access human-readable names for examples and scenarios,
and ExampleNode::getExampleText() for the string content of the example table row.
by @uuf6429 in #271\ as an escape character, which must be escaped (\\) to use it as a
literal value. Historically, this was not being parsed correctly. This release fixes that bug,
but means that if your scenarios currently use unescaped \ you will need to replace each one
with \\ to achieve the same parsed result.
By @everzet in 5a0836d.Note: 4.10.0 was actually released by @everzet on 2024-10-19, but just as a bare git tag - I've just marked it up as an official github release to avoid confusion,
Full Changelog: https://github.com/Behat/Gherkin/compare/v4.8.0...v4.9.0
How can I help you explore Laravel packages today?