File tree Expand file tree Collapse file tree 1 file changed +33
-1
lines changed Expand file tree Collapse file tree 1 file changed +33
-1
lines changed Original file line number Diff line number Diff line change 3
3
This document serves as a reference to upgrade your current cli-menu installation if improvements, deprecations
4
4
or backwards compatibility (BC) breakages occur.
5
5
6
+ ## 4.0.0
7
+
8
+ ### BC breaks
9
+
10
+ * Trait ` PhpSchool\CliMenu\MenuItem\SelectableTrait ` was removed. Copy the old code into your menu item
11
+ if you need it.
12
+ * Methods ` PhpSchool\CliMenu\Builder\CliMenuBuilder#setUnselectedMarker() ` & ` PhpSchool\CliMenu\Builder\CliMenuBuilder#setSelectedMarker() ` were removed.
13
+ Customise markers on the individual item styles:
14
+
15
+ ``` php
16
+ <?php
17
+
18
+ use PhpSchool\CliMenu\Builder\CliMenuBuilder;
19
+ use PhpSchool\CliMenu\Style\SelectableStyle;
20
+
21
+ $menu = (new CliMenuBuilder)
22
+ ->modifySelectableStyle(function (SelectableStyle $style) {
23
+ $style->setUnselectedMarker('❅ ')
24
+ ->setSelectedMarker('✏ ')
25
+
26
+ // disable unselected marker
27
+ ->setUnselectedMarker('')
28
+ ;
29
+ })
30
+ ->build();
31
+ ```
32
+ * Method getStyle() was added to interface PhpSchool\CliMenu\MenuItem\MenuItemInterface. Items must now implement this
33
+ method. For selectable items use ` \PhpSchool\CliMenu\Style\SelectableStyle ` or a subclass of. For static items use
34
+ ` \PhpSchool\CliMenu\Style\DefaultStyle ` or a subclass of.
35
+ * ` PhpSchool\CliMenu\MenuStyle ` marker methods have been removed. If you were using these directly. Operate on the item
36
+ style object instead.
37
+
6
38
## 3.0.0
7
39
8
40
### BC breaks
@@ -78,4 +110,4 @@ $menu = (new CliMenuBuilder)
78
110
->build();
79
111
80
112
$menu->open();
81
- ```
113
+ ```
You can’t perform that action at this time.
0 commit comments