A powerful composable menu builder for CakePHP

Every CakePHP project I’ve ever opened has the same file. It’s called something like MenuHelper.php or Navigation.php , it lives somewhere in src/View/Helper/ , and it grows a new if ($this->request->getParam('controller') === ...) branch every quarter. By the time anyone notices, the helper is doing three jobs at once — declaring the tree, deciding which entry is active, and emitting the markup —…