knplabs/knp-menu
An object oriented menu library
v3.8.0
59M downloads/mo
#807 most downloaded on Packagist
KnpLabs/KnpMenu
What this package is like to depend on
Last release 1 years ago
13 Jun 2025
Release timing varies
gaps range from 2 months to 1.6 years
Some releases are documented
notes for 17 of 30 stable releases
Nothing withdrawn
no release was ever pulled
15 years old
33 releases · first in 2011
0 releases in the last 12 months
see the full history below
Release timeline
33 releases · Dec 2011 to Jun 2025Releases
latest 33-
v3.8.013 Jun 2025Release notes
Open source →What's Changed
- Fix twig runtime extension last modification time detection by @daniser in #405
- Add an attribute to mark menu builder methods by @stof in #406
- Improve type analysis by @stof in #407 and #409
- Use WeakMap instead of SplObjectStorage to avoid memory leak by @andrew-demb in #404
- Restrict the API surface with internal and final tags by @stof in #408
New Contributors
- @daniser made their first contribution in #405
- @andrew-demb made their first contribution in #404
Full Changelog: v3.7.0...v3.8.0
-
v3.7.028 Feb 2025Release notes
Open source →This release allows KnpMenu to work with the future release of Twig 4, by removing the deprecated spaceless filter.
This was done in a way which should be probably improved. For all the details about it, please check the discussions on PR #399What's Changed
Full Changelog: v3.6.0...v3.7.0
-
v3.6.020 Dec 2024Release notes
Open source →What's Changed
- add coding standard fixer for Twig templates by @garak in #394
- add Twig Runtime by @garak in #397
- ci: add test for PHP 8.4 by @Chris53897 in #401
- fix test deprecations by @garak in #402
Full Changelog: v3.5.0...v3.6.0
-
v3.5.023 Mar 2024Release notes
Open source →What's Changed
- chore: add ci tests for php 8.3 by @Chris53897 in #383
- drop $ so gitclip works by @tacman in #385
- allow Symfony 7 by @garak in #386
- Add callback voter by @Florin1 in #387
- docs: fix ci badge and https link to composer by @Chris53897 in #390
- chore: bump github action versions to fix ci deprecations by @Chris53897 in #389
- tests: make DataProviders static in preparation for PHPUnit 10 by @Chris53897 in #391
- feat: drop support for PHP < 8.1 by @Chris53897 in #392
New Contributors
Full Changelog: v3.4.0...v3.5.0
-
v3.4.017 May 2023Release notes
Open source →What's Changed
- Correct spelling in docs by @gnito-org in #358
- Removed undefined method
addVoterby @magdicom in #364 - Add support for query parameters matching to RouteVoter by @yguedidi in #366
- Add a CI job running phpstan by @stof in #367
- upgrade to php 7.4 by @stephanvierkant in #365
- fix error in baseline by @garak in #372
- chore: add ci tests for php 8.2, bump github actions versions by @Chris53897 in #373
- tests: make dataproviders static (part 1) by @Chris53897 in #377
- docs: fix internal link by @Chris53897 in #375
- feat: drop support of php 7.4 by @Chris53897 in #376
New Contributors
- @gnito-org made their first contribution in #358
- @magdicom made their first contribution in #364
- @yguedidi made their first contribution in #366
- @Chris53897 made their first contribution in #373
Full Changelog: v3.3.0...v3.4.0
-
v3.3.023 Oct 2021Nothing published for this version
-
v3.2.028 May 2021 -
v3.1.319 Feb 2021 -
v3.1.215 Aug 2020 -
v3.1.122 Apr 2020Nothing published for this version
-
v3.1.001 Dec 2019Nothing published for this version
-
v3.0.310 Oct 2019Nothing published for this version
-
v3.0.209 Oct 2019Nothing published for this version
-
v3.0.126 Sep 2019Nothing published for this version
-
v3.0.002 Sep 2019Nothing published for this version
-
2.6.119 Feb 2021 -
2.6.002 Sep 2019Nothing published for this version
-
2.5.023 Aug 2019Nothing published for this version
-
2.4.116 Aug 2019Nothing published for this version
-
2.4.029 Jul 2019Nothing published for this version
-
2.3.018 Nov 2017Nothing published for this version
-
2.2.022 Sep 2016Nothing published for this version
-
v2.1.108 Jan 2016 -
v2.1.020 Sep 2015Release notes
Open source →- Added a new function to twig:
knp_menu_get_breadcrumbs_array - Added a new filter to twig:
knp_menu_as_string - Added 2 new tests to twig:
knp_menu_current,knp_menu_ancestor - Made the templates compatible with Twig 2
- Add menu and renderer providers supporting any ArrayAccess implementations. The Pimple-based providers (supporting only Pimple 1) are deprecated in favor of these new providers.
- Added a new function to twig:
-
v2.0.101 Aug 2014 -
v2.0.018 Jul 2014 -
v2.0.0-beta113 Jun 2014 pre-releaseNothing published for this version
-
v2.0.0-alpha201 May 2014 pre-releaseNothing published for this version
-
v2.0.0-alpha123 Jun 2013 pre-releaseNothing published for this version
-
v1.1.210 Jun 2012 -
v1.1.117 May 2012 -
v1.1.017 May 2012Release notes
Open source →- Marked
Knp\Menu\ItemInterface::getCurrentItemas deprecated - Added a recursive filter iterator keeping only displayed items
- Added a filter iterator keeping only current items
- Added a recursive iterator for the item
- Fixed building an array of breadcrumbs when a label has only digits
- Added a way to mark a label as safe
- Refactored the ListRenderer to be consistent with the TwigRenderer and provide the same extension points
- Added a way to attach extra data to an item
- Removed unnecessary optimization in the TwigRenderer
- Added some whitespace control in the Twig template to ensure an empty rendering is really empty
- [BC break] Use the childrenAttributes for the root instead of the attributes
- Made the default options configurable for the TwigRenderer
- Added the support for menu registered as factory in PimpleProvider
- Added a way to use the options in
knp_menu_get()in Twig templates - Added an array of options for the MenuProviderInterface
- Added a template to render an ordered list
- Refactored the template a bit to make it easier to use an ordered list
- Allow omitting the name of the child in
fromArray(the key is used instead)
- Marked
-
v1.0.003 Dec 2011Release notes
Open source →- Add composer.json file
- Added more flexible list element blocks
- Add support for attributes on the children collection.
- Added a default renderer
- Added a ChainProvider for the menus.
- Added the Silex extension
- Added a RouterAwareFactory
- Added a helper to be able to reuse the logic more easily for other templating engines
- Added a way to retrieve an item using a path in a menu tree
- Changed the toArray method to use a depth instead of simply using a boolean flag
- Refactored the export to array and the creation from an array
- Added better support for encoding problems when escaping a string in the ListRenderer
- Added a Twig renderer
- Added missing escaping in the ListRenderer
- Renamed some methods in the ItemInterface
- Removed the configuration of the current item as link from the item
- Refactored the ListRenderer to use options
- Changed the interface of callRecursively
- Refactored the NodeInterface to be consistent
- Moved the creation of the item to the factory
- Added a Twig extension to render the menu easily
- Changed the menu provider interface with a pimple-based implementation
- Added a renderer provider to get a renderer by name and a Pimple-based implementation
- Removed the renderer from the menu
- Removed the num in the item by refactoring isLast and isFirst
- Changed the RendererInterface to accept an array of options to be more flexible
- Added an ItemInterface
- Initial import of KnpMenuBundle decoupled classes with a new namespace