Skip to content

Commit 87a937f

Browse files
authored
Complete doc for upgrade to v5 (#33)
Complete doc for upgrade to v5 + Add link to core changelog
1 parent ac21a38 commit 87a937f

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

docs/upgrade_v5.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ If you are using Cucumber Scala 4.7.x and want to upgrade to 5.x, please note th
55
Starting from version 5.x, Cucumber Scala will try to be as close as possible to the Cucumber Java implementation while remaining Scala oriented.
66
This means that package names, parameters order, internal code... will be more consistent with the Java implementation.
77

8+
See also the [CHANGELOG](https://github.com/cucumber/cucumber-jvm/blob/master/CHANGELOG.md) from Cucumber Core.
9+
810
## Packages
911

1012
All Cucumber Scala classes are now under `io.cucumber.scala` package instead of `cucumber.api.scala`.
@@ -14,7 +16,7 @@ All Cucumber Scala classes are now under `io.cucumber.scala` package instead of
1416
The `Before`, `BeforeStep`, `After` and `AfterStep` definitions have slightly changed:
1517
- to apply only to scenarios with some tags, the `String*` parameter is replaced by a single tag expression of type `String`.
1618
This changes comes from Cucumber itself.
17-
- if providing both an order and a tag expression, the order is now the second parameter instead of the first.
19+
- if providing both an _order_ and a _tag expression_, the _order_ is now the second parameter instead of the first.
1820
This is more consistent with the Java implementation.
1921

2022
For instance, the following code:
@@ -33,4 +35,19 @@ Before("@tag1 or @tag2", 1) { _ =>
3335
}
3436
```
3537

36-
See also the [Hooks documentation](hooks.md).
38+
### Other changes
39+
40+
As a side effect the following usage no longer compiles:
41+
```scala
42+
Before() { _ =>
43+
// Do something
44+
}
45+
```
46+
It can be replaced with:
47+
```scala
48+
Before { _ =>
49+
// Do something
50+
}
51+
```
52+
53+
See also the [Hooks documentation](hooks.md).

0 commit comments

Comments
 (0)