NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #805 most downloaded on Packagist
An object oriented menu library
Latest stable
v3.8.0
Last release 1 years ago
13 Jun 2025
Release timing varies
gaps range from 2 months to 1.6 years
Most releases are documented
notes for 25 of 30 stable releases
Nothing withdrawn
no release was ever pulled
15 years old
33 releases · first in 2011
Drag across the ruler to compare, or tap a release to open it.
Fix twig runtime extension last modification time detection by @daniser in #405
Full Changelog: v3.7.0...v3.8.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Full Changelog: https://github.com/KnpLabs/KnpMenu/compare/v3.7.0...v3.8.0
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 shoul…
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 #399
Full Changelog: https://github.com/KnpLabs/KnpMenu/compare/v3.6.0...v3.7.0
fix test deprecations by @garak in https://github.com/KnpLabs/KnpMenu/pull/402
Full Changelog: https://github.com/KnpLabs/KnpMenu/compare/v3.5.0...v3.6.0
chore: bump github action versions to fix ci deprecations by @Chris53897 in https://github.com/KnpLabs/KnpMenu/pull/389
Full Changelog: https://github.com/KnpLabs/KnpMenu/compare/v3.4.0...v3.5.0
Correct spelling in docs by @gnito-org in https://github.com/KnpLabs/KnpMenu/pull/358
addVoter by @magdicom in https://github.com/KnpLabs/KnpMenu/pull/364Full Changelog: https://github.com/KnpLabs/KnpMenu/compare/v3.3.0...v3.4.0
* Added support for Symfony 6
Enforce phpstan rules (max level)
Co-authored-by: Alexander M. Turek me@derrabus.de
Co-authored-by: Alexander M. Turek me@derrabus.de
Minor tweaks to coding standard and configurations
Minor tweaks to coding standard and configurations
fixed currentAsLink not working when determining state via voters
currentAsLink not working when determining state via votersRemoved support for unsupported Symfony versions (4.0 and 4.1)
Nothing published for this version
Nothing published for this version
Nothing published for this version
[BC break] Removed all features deprecated in version 2. Specifically, MenuFactory and MenuItem are not accepting a null name anymore
null name anymorenull name anymoreCo-authored-by: Alexander M. Turek me@derrabus.de
Co-authored-by: Alexander M. Turek me@derrabus.de
Nothing published for this version
Deprecate passing a null name to MenuItem
Deprecate passing a null name to MenuItem
Nothing published for this version
fixed Twig deprecations https://github.com/KnpLabs/KnpMenu/commit/bda9826d188409f275d24404b5072421f99ae55f
Deprecated the Silex 1 KnpMenuServiceProvider. Use the knplabs/knp-menu-silex package instead.
depth ancestor of the knp_menu_ancestor Twig testknplabs/knp-menu-silex package instead.MenuMatcher::addVoter. Inject voters in the constructor insteadknplabs/knp-menu-silex package instead.Added a new function to twig: knp_menu_get_current_item
knp_menu_get_current_item* Made compatible with Symfony 3
Added a new function to twig: knp_menu_get_breadcrumbs_array
knp_menu_get_breadcrumbs_arrayknp_menu_as_stringknp_menu_current, knp_menu_ancestorFixed voter conventions on RouteVoter
[BC break] Clean code and removed the BC layer
[BC break] Added the new Integration namespace and removed the Silex one.
Integration namespace and removed the Silex one.Knp\Menu\Matcher\Voter\RegexVoter[BC break compared to 2.0 alpha 1] The inheritance extension points introduced in alpha1 are deprecated in favor of extensions and will be removed bef…
[BC break] Changed the TwigRenderer to accept a menu template only as a string
[BC break] Refactored the way of rendering twig templates. Every template should extends
the knp_menu.html.twig template.
Introduced extension points in the MenuFactory through Knp\Menu\Factory\ExtensionInterface
[BC break compared to 2.0 alpha 1] The inheritance extension points introduced in alpha1 are deprecated in favor of extensions and will be removed before the stable release.
Knp\Menu\Silex\RouterAwareFactory is deprecated in favor of Knp\Menu\Silex\RoutingExtension.
[BC break] Deprecated the methods createFromArray and createFromNode in the MenuFactory and
removed them from Knp\Menu\FactoryInterface. Use Knp\Menu\Loader\ArrayLoader and
Knp\Menu\Loader\NodeLoader instead.
[BC break] Deprecated the methods moveToPosition, moveToFirstPosition, moveToLastPosition,
moveChildToPosition, callRecursively, toArray, getPathAsString and getBreadcrumbsArray
in the MenuItem and removed them from Knp\Menu\ItemInterface. Use Knp\Menu\Util\MenuManipulator
instead.
Made the RouterVoter compatible with SensioFrameworkExtraBundle param converters
Added the possibility to match routes using a regex on their name in the RouterVoter
[BC break compared to 2.0 alpha 1] Refactored the RouterVoter to make it more flexible The way to pass routes in the item extras has changed.
Before:
'extras' => array(
'routes' => array('foo', 'bar'),
'routeParameters' => array('foo' => array('id' => 4)),
)
After:
'extras' => array(
'routes' => array(
array('route' => 'foo', 'parameters' => array('id' => 4)),
'bar',
)
)
The old syntax is kept until the final release, but using it will trigger a E_USER_DEPRECATED error.
This alpha release does not represent the final feature set of 2.0. As the development of 2.0 hanged for a while, many people are already using the cu
This alpha release does not represent the final feature set of 2.0. As the development of 2.0 hanged for a while, many people are already using the current state of the code so this alpha release allows them to lock it if they cannot update for the new changes.
buildOptions and configureItem in the MenuFactory as extension point by inheritancesetCurrentUri, getCurrentUri and getCurrentItem have been removed from the ItemInterface.
Determining the current items is now delegated to a matcher, and the default implementation
uses voters to apply the matching. Getting the current items can be done thanks to the CurrentItemFilterIterator.label, uri and item.Updated the Silex service provider for the change in the interface
Added the children attributes and the extras in the array export
Marked Knp\Menu\ItemInterface::getCurrentItem as deprecated
Knp\Menu\ItemInterface::getCurrentItem as deprecatedknp_menu_get() in Twig templatesfromArray (the key is used instead)Added more flexible list element blocks
One column per quarter.