Skip to content

Commit 7fcd967

Browse files
committed
Remove temporary refactor code
Want to see where this fails so we can update it in the right places
1 parent 6d43954 commit 7fcd967

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

packages/framework/src/Framework/Features/Navigation/NavigationMenuGenerator.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use function collect;
1818
use function in_array;
1919
use function strtolower;
20-
use function trigger_deprecation;
2120

2221
/**
2322
* @experimental This class may change significantly before its release.
@@ -82,15 +81,8 @@ protected function generate(): void
8281
$this->items->push(NavigationItem::create(DocumentationPage::home()));
8382
}
8483
} else {
85-
collect(Config::getArray('hyde.navigation.custom', []))->each(function (NavigationItem|array $item): void {
86-
// In preparation of refactor:
87-
// @codeCoverageIgnoreStart
88-
if (is_array($item)) {
89-
$item = NavigationItem::create($item['destination'], $item['label'] ?? null, $item['priority'] ?? null);
90-
} else {
91-
trigger_deprecation('hydephp/hyde', '2.0', 'Passing a NavigationItem instance directly to the navigation menu is deprecated. Use the array format instead. (Replace with \Navigation::item(...))');
92-
}
93-
// @codeCoverageIgnoreEnd
84+
collect(Config::getArray('hyde.navigation.custom', []))->each(function (array $item): void {
85+
$item = NavigationItem::create($item['destination'], $item['label'] ?? null, $item['priority'] ?? null);
9486

9587
// Since these were added explicitly by the user, we can assume they should always be shown
9688
$this->items->push($item);

0 commit comments

Comments
 (0)