Releases: Behat/Gherkin
Releases · Behat/Gherkin
v4.14.0
Changed
- Throw ParserException if file ends with tags by @acoulton in #313
- Throw ParserException if Background comes after first Scenario by @acoulton in #343
- For compatibility with the official cucumber/gherkin parsers, we now accept some gherkin syntax that would previously have triggered a ParserException. Users may wish to consider running a tool like gherkin-lint in CI to detect incomplete feature files or valid-but-unusual gherkin syntax. The specific changes are:
- Parse
Scenario
andScenario Outline
as synonyms depending on the presence (or not) of anExamples:
keyword.
by @acoulton in #316 and #324 - Do not throw on some unexpected Feature / Language tags by @acoulton in #323
- Do not throw on
.feature
file that does not contain a Feature by @acoulton in #340 - Ignore content after table right-hand
|
(instead of throwing) by @acoulton in #341
- Parse
- Remove the line length from the NewLine token value by @stof in #338
- Added precise PHPStan type information by @stof in #332, #333, #339 and #334
Internal
- Make private props readonly; fix tests by @uuf6429 in #319
- Use the
Yaml::parseFile
API to handle Yaml files by @stof in #335 - test: Make CucumberND name reading consistent by @uuf6429 in #309
- test: Use vfsStream to simplify / improve filesystem-related tests by @uuf6429 in #298
- test: Handle optional tableHeader when loading NDJson examples by @uuf6429 in #294
- test: Refactor valid ParserExceptionsTest examples into cucumber/gherkin testdata by @acoulton in #322
- test: Compare step arguments when checking gherkin parity by @acoulton in #325
- test: Use a custom object comparator to ignore the keywordType of StepNode by @stof in #331
- ci: Add conventional title to gherkin update, error on missing asserts by @acoulton in #314
- Assert that preg_split does not fail when splitting a table row by @stof in #337
- Add assertions in the parser to reflect the structure of tokens by @stof in #342
- style: Define and change phpdoc order coding style by @uuf6429 in #345
v4.13.0
Changed
- Files have been moved to flatten paths into a PSR-4 structure (instead of the previous PSR-0). This may affect users who are requiring files directly rather than using the composer autoloader as expected. See the 4.12.0 release for the new CachedArrayKeywords::withDefaultKeywords()
to use the
i18n.php` file without depending on paths to other files in this repo. By @uuf6429 in #288
Added
- ExampleTableNode now implements TaggedNodeInterface. Also refactored node tag handling methods. By @uuf6429 in #289
- Improve some exceptions thrown when parsing invalid feature files. Also increased test coverage. By @uuf6429 in #295
- New translations for
amh
(Amharic),be
(Belarusian) andml
(Malayalam) from cucumber/gherkin in #306 - Improved translations / whitespace for
ga
(Irish),it
(Italian),ja
(Japanese),ka
(Georgian) andko
(Korean) from cucumber/gherkin in #306
Internal
- Fix & improve automatic CI updates to newer cucumber/gherkin test data and translations. By @acoulton in #300, #302, #304, #305
- Update code style and resolve PHPStan warnings (up to level 9) in tests and CI scripts. By @uuf6429 in #296, #297 and #307
- Make tests that expect exceptions more explicit by @uuf6429 in #310
- Improve CI workflows and integrate Codecov reporting by @uuf6429 in #299 and #301
- Refactor tag filtering implementation by @uuf6429 in #308
- Update cucumber/gherkin parity tests to v32.1.1 in #306
v4.12.0
Changed
- Gherkin::VERSION is deprecated and will not be updated, use the composer runtime API if you need to identify the running version. This also changes the value used to namespace cached feature files. by @acoulton in #279
Added
- Provide
CachedArrayKeywords::withDefaultKeywords()
to create an instance without an external dependency on the path to thei18n.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 #290
Internal
- Upgrade to phpunit 10 by @uuf6429 in #275
- Remove redundant files by @uuf6429 in #278
- Update documentation by @uuf6429 in #274
- Adopt PHP CS Fixer and apply code styles by @uuf6429 in #277
- Add PHPStan and improve / fix docblock annotations and type-safety within methods to achieve level 5 by @uuf6429 in #276, #281, #282, and #287
v4.11.0
Changed
- Drop support for PHP < 8.1, Symfony < 5.4 and Symfony 6.0 - 6.3. In future we will drop support for PHP and symfony
versions as they reach EOL. by @acoulton in #272 - Deprecated
ExampleNode::getTitle()
andScenarioNode::getTitle()
in favour of new methods with clearer meaning.
by @uuf6429 in #271
Added
- Added
(ExampleNode|ScenarioNode)::getName()
to access human-readable names for examples and scenarios,
andExampleNode::getExampleText()
for the string content of the example table row.
by @uuf6429 in #271
Internal
v4.10.0
Changed
- ⚠ Backslashes in feature files must now be escaped
Gherkin syntax treats\
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.
Added
- Symfony 6 and 7 thanks to @tacman in #257
- PHP 8.4 support thanks to @heiglandreas in #258 and @jrfnl in #262
Fixed
Internal
- Sync teststuite with Cucumber 24.1.0
- Fix PHPUnit 10 deprecation messages
- A lot of great CI work by @heiglandreas and @jrfnl
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,
v4.9.0
What's Changed
- Simplify the boolean condition for the tag matching by @stof in #219
- Remove symfony phpunit bridge by @ciaranmcnulty in #220
- Ignore the bin folder in archives by @stof in #226
- Cast table node exceptions into ParserExceptions when throwing by @ciaranmcnulty in #216
- Cucumber changelog in PRs and using correct hash by @ciaranmcnulty in #225
- Support alternative docstrings format (```) by @ciaranmcnulty in #214
- Fix DocBlocks (Boolean -> bool) by @simonhammes in #237
- Tag parsing by @ciaranmcnulty in #215
- Remove test - cucumber added an example with Rule which is not supported by @ciaranmcnulty in #239
- Add PHP 8.1 support by @javer in #242
- Fix main branch alias version by @mvorisek in #244
New Contributors
- @simonhammes made their first contribution in #237
- @javer made their first contribution in #242
- @mvorisek made their first contribution in #244
Full Changelog: v4.8.0...v4.9.0
v4.8.0
- Drop support for PHP before version 7.2
v4.7.3
- Refactored comments parsing to avoid Maximum function nesting level errors
v4.7.2
- Issue where Scenario Outline title was not populated into Examples
- Updated translations from cucumber 16.0.0
v4.7.1
- Fixes issue parsing comments before scenarios when following an Examples table