PHPackages                             dama/menu-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. dama/menu-bundle

ActiveSymfony-bundle[Admin Panels](/categories/admin)

dama/menu-bundle
================

v5.7.1(5mo ago)1052.7k↓50%1MITPHPPHP &gt;=8.2

Since Jun 6Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/dmaicher/menu-bundle)[ Packagist](https://packagist.org/packages/dama/menu-bundle)[ Docs](https://github.com/dmaicher/menu-bundle)[ RSS](/packages/dama-menu-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (13)Versions (27)Used By (0)

dama/menu-bundle
================

[](#damamenu-bundle)

This bundle can be used to build dynamic menus based on granted permissions.

Step 1: create MenuTreeBuilder
------------------------------

[](#step-1-create-menutreebuilder)

```
class MainMenuTreeBuilder implements MenuTreeBuilderInterface
{
    public function buildTree(Node $root)
    {
        $root
            ->child('social_media')
                ->setAttr('id', 'main_menu_social_media')
                ->setRequiredPermissions(['ROLE_SOCIAL_MENU'])
                ->child('stream')
                    ->setRoute('social_media_stream')
                    ->setRequiredPermissions(['ROLE_SOCIAL_STREAM'])
                    ->setAdditionalActiveRequestMatcher(static function (Request $request): bool {
                        // additionally will mark node as active if the request path starts with '/foo_bar'
                        return str_starts_with($request->getPathInfo(), '/foo_bar');
                    })
                ->end()
                ->child('update_status')
                    ->setRoute('social_media_update_status')
                    ->setRequiredPermissions(['ROLE_SOCIAL_UPDATE_STATUS'])
                ->end()
                ->ifTrue($someCondition) // only add child node(s) inside if the condition is true
                    ->child('statistics')
                        ->setRoute('social_media_statistics')
                        ->setRequiredPermissions([new Expression("has_role('ROLE_USER')")])
                    ->end()
                ->endIf()
            ->end()
        ;
    }
}
```

Step 2: add config for your menu
--------------------------------

[](#step-2-add-config-for-your-menu)

```
dama_menu:
    menues:
        my_main_menu:
            tree_builder: Your\Namespace\MainMenuTreeBuilder #service ID OR FQCN and no constructor args
            twig_template: YourNamespace:my_main_menu.html.twig #optional

```

Step 3: render the menu
-----------------------

[](#step-3-render-the-menu)

```
{{ dama_menu_render('my_main_menu', {'collapse':true, 'nested':false}) }}
```

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance71

Regular maintenance activity

Popularity35

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 92.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~124 days

Recently: every ~116 days

Total

26

Last Release

162d ago

Major Versions

v1.3 → v2.0.02018-03-17

v2.1.0 → v3.0.02020-06-25

v3.1.0 → v4.0.02021-05-18

v4.2.1 → v5.0.02021-09-20

PHP version history (7 changes)v1.0PHP &gt;=5.6.0

v2.0.0PHP ^7.1

v2.1.0PHP ^7.2

v3.1.0PHP ^7.2 || ^8.0

v5.2.1PHP ^7.4 || ^8.0

v5.5.0PHP &gt;=8.1

v5.7.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/d4a4302004f70b830dcd915406f31086100c98c99855488e74066664a446b39c?d=identicon)[dmaicher](/maintainers/dmaicher)

---

Top Contributors

[![dmaicher](https://avatars.githubusercontent.com/u/921145?v=4)](https://github.com/dmaicher "dmaicher (77 commits)")[![garf](https://avatars.githubusercontent.com/u/1891709?v=4)](https://github.com/garf "garf (4 commits)")[![dbellettini](https://avatars.githubusercontent.com/u/325358?v=4)](https://github.com/dbellettini "dbellettini (1 commits)")[![dekey](https://avatars.githubusercontent.com/u/1561177?v=4)](https://github.com/dekey "dekey (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/dama-menu-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/dama-menu-bundle/health.svg)](https://phpackages.com/packages/dama-menu-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M310](/packages/easycorp-easyadmin-bundle)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
