Skip to content

Commit fbe3c11

Browse files
Update CHANGELOG
1 parent 98b0144 commit fbe3c11

File tree

1 file changed

+52
-6
lines changed

1 file changed

+52
-6
lines changed

CHANGELOG.md

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,76 +2,114 @@
22

33
All notable changes to `menu` will be documented in this file.
44

5+
## 3.1.0 - 2023-03-10
6+
7+
### What's Changed
8+
9+
- typofix in item-attributes.md by @davidjr82 in https://github.com/spatie/menu/pull/138
10+
- Add PHP 8.2 Support by @patinthehat in https://github.com/spatie/menu/pull/141
11+
- Refactor tests to pest by @AyoobMH in https://github.com/spatie/menu/pull/142
12+
- Add `id` attribute for menu by @milwad-dev in https://github.com/spatie/menu/pull/143
13+
14+
### New Contributors
15+
16+
- @davidjr82 made their first contribution in https://github.com/spatie/menu/pull/138
17+
- @AyoobMH made their first contribution in https://github.com/spatie/menu/pull/142
18+
- @milwad-dev made their first contribution in https://github.com/spatie/menu/pull/143
19+
20+
**Full Changelog**: https://github.com/spatie/menu/compare/3.0.1...3.1.0
21+
522
## 3.0.0 - 2021-03-24
623

724
- Support PHP 8+
825
- Drop support for PHP 7.x
926
- Use PHP 8 syntax where possible
1027

1128
## 2.10.3 - 2021-03-16
29+
1230
- Ensure `Items` are transformed to string before prepending or appending
1331

1432
## 2.10.2 - 2020-12-02
33+
1534
- Fix `methods_exists` check in PHP8
1635

1736
## 2.10.1 - 2020-12-02
37+
1838
- Ensure the necessary methods exist to check if a menu is active
1939

2040
## 2.10.0 - 2020-12-02
41+
2142
- Support `Item` instances in `Menu::prepend` so headers can be set active
2243

2344
## 2.9.0 - 2020-11-06
45+
2446
- Drop support for versions older than PHP 7.1
2547

2648
## 2.8.0 - 2018-11-05
49+
2750
- Add `exact-active` class to links that exactly match the current URL. This is accompanied by a `setExactActiveClass(string $class)` method to set the class name
2851

2952
## 2.7.0 - 2018-10-23
53+
3054
- Add `IteratorAggregate` interface to `Menu` class
3155

3256
## 2.6.0 - 2018-09-10
57+
3358
- Add `beforeRender` and `willRender` hooks that are called when an item is rendered
3459

3560
## 2.5.0 - 2018-03-02
61+
3662
- This release adds a few methods to create non-`ul` menus, which allows for Bootstrap 4 compatibility
3763
- Added `Menu::setWrapperTag` and `Menu::withoutWrapperTag` to set a custom wrapper tag name for the menu list. Default: `ul`
3864
- Added `Menu::setParentTag` & `Menu::withoutParentTag` to determine which tag should be used for the item's parent element. Default: `li`
3965
- Added `Menu::setActiveClassOnLink` and `Menu::setActiveClassOnParent` to determine where the active class should be applied
4066

4167
## 2.4.1 - 2017-11-13
68+
4269
- Allow invokable classes as callbacks
4370

4471
## 2.4.0 - 2017-10-17
72+
4573
- Added `Menu::empty` and `Html::empty` method for adding empty list items
4674

4775
## 2.3.1 - 2017-08-29
76+
4877
- Extracted a `ActiveUrlChecker` class for public use
4978

5079
## 2.3.0 - 2017-08-28
80+
5181
- Added `append` and `prepend` methods to `Link`
5282

5383
## 2.2.2 - 2017-07-11
84+
5485
- Fixed returning a menu instance is now optional with `fill` and `build`
5586

5687
## 2.2.1 - 2017-03-07
88+
5789
- Fixed setting items active with urls that start with the same string
5890

5991
## 2.2.0 - 2017-02-09
92+
6093
- Added `if` function
6194

6295
## 2.1.3
96+
6397
- Fixed setting an active url when the url is exactly the same
6498

6599
## 2.1.1
100+
66101
- Added the request root path when setting the active path
67102

68103
## 2.1.0
104+
69105
- Added optional third `$initial` parameter in `Menu::build`
70106

71107
## 2.0.1
108+
72109
- Fixed require `^1.0.0` of spatie/url
73110

74111
## 2.0.0
112+
75113
- Added added the static `Menu::build` and non-static `Menu::fill` methods to create menu's from arrays.
76114
- Added the `setActive` method on `Activatable` now also accepts a non-strict boolean or callable parameter to set `$active` to true or false.
77115
- Added `Menu::html` and `Menu::htmlIf` now accept a `$parentAttributes` array as their second arguments.
@@ -81,31 +119,39 @@ All notable changes to `menu` will be documented in this file.
81119
- Removed the `prefixLinks` and `prefixUrls` methods have been removed because they were too unpredictable in some case. There currently isn't an alternative for these, besides writing your own logic and applying it with `applyToAll`.
82120

83121
## 1.4.0
122+
84123
- Added a `HasUrl` trait
85124
- Deprecated `prefixLinks` in favor of `prefixUrls`
86125

87126
## 1.3.0
127+
88128
- Added `submenuIf`
89129

90130
## 1.2.1
131+
91132
- Internal refactors
92133

93134
## 1.2.0
135+
94136
- New methods on `Menu`:
95-
- `submenu` for submenus with optional headers
96-
- `void` and `voidIf` for empty list items
97-
- `wrap` to wrap the menu in an html tag with optional attributes
98-
- A `blueprint` method to copy the menu without it's contents
99-
- Html item convenience methods: `addItemClass`, `setItemAttribute`
100-
- Html parent convenience methods: `addItemParentClass`, `setItemParentAttribute`
137+
- - `submenu` for submenus with optional headers
138+
- - `void` and `voidIf` for empty list items
139+
- - `wrap` to wrap the menu in an html tag with optional attributes
140+
- - A `blueprint` method to copy the menu without it's contents
141+
- - Html item convenience methods: `addItemClass`, `setItemAttribute`
142+
- - Html parent convenience methods: `addItemParentClass`, `setItemParentAttribute`
143+
-
101144
- Added `HasHtmlAttributes` and `HasParentAttributes` interfaces
102145
- `HtmlAttributes` and `ParentAttributes` now also have a `setAttributes` method
103146

104147
## 1.1.1
148+
105149
- Fixed `setActive` when setting active from a URL
106150

107151
## 1.1.0
152+
108153
- Added conditional `add` functions, `addIf`, `linkIf` and `htmlIf`
109154

110155
## 1.0.0
156+
111157
- First release

0 commit comments

Comments
 (0)