@dbu dbu released this Sep 22, 2016

  • Added a new function to twig: knp_menu_get_current_item



@dbu dbu released this Jan 8, 2016 · 16 commits to master since this release

prepare 2.1.1 release


2.1.0 (2015-09-20)

@stof stof released this Sep 20, 2015 · 19 commits to master since this release

  • 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 dperecated in favor of these new providers.


2.0.1 (2014-08-01)

@Nek- Nek- released this Aug 1, 2014 · 57 commits to master since this release

  • Fixed voter conventions on RouteVoter


2.0.0 (2014-07-18)

@Nek- Nek- released this Jul 18, 2014 · 61 commits to master since this release

  • [BC break] Clean code and removed the BC layer


2.0.0 beta 1 (2014-06-19)

@Nek- Nek- released this Jun 13, 2014 · 78 commits to master since this release

  • [BC break] Added the new Integration namespace and removed the Silex one.
  • Added a new Voter based on regular expression: Knp\Menu\Matcher\Voter\RegexVoter


2.0.0 alpha 2 (2014-05-01)

@Nek- Nek- released this May 1, 2014 · 99 commits to master since this release

  • [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

  • 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.


    'extras' => array(
        'routes' => array('foo', 'bar'),
        'routeParameters' => array('foo' => array('id' => 4)),


    'extras' => array(
        'routes' => array(
             array('route' => 'foo', 'parameters' => array('id' => 4)),

    The old syntax is kept until the final release, but using it will trigger a E_USER_DEPRECATED error.


2.0.0 alpha1 release

@stof stof released this Jun 23, 2013 · 147 commits to master since this release

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.


  • Added protected methods buildOptions and configureItem in the MenuFactory as extension point by inheritance
  • [BC break] Refactored the way to mark items as current
    setCurrentUri, 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.
  • [BC break] The signature of the CurrentItemFilterIterator constructor changed to accept the item matcher
  • [BC break] Changed the format of the breadcrumb array
    Instead of storing the elements with the label as key and the uri as value
    the array now stores an array of array elements with 3 keys: label, uri and item.


1.1.2 release

@stof stof released this Jun 10, 2012 · 199 commits to master since this release

  • Updated the Silex service provider for the change in the interface


1.1.1 release

@stof stof released this May 17, 2012 · 202 commits to master since this release

  • Added the children attributes and the extras in the array export