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 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
Full Changelog: https://github.com/KnpLabs/KnpMenu/compare/v3.5.0...v3.6.0
Full Changelog: https://github.com/KnpLabs/KnpMenu/compare/v3.4.0...v3.5.0
addVoter by @magdicom in https://github.com/KnpLabs/KnpMenu/pull/364Full Changelog: https://github.com/KnpLabs/KnpMenu/compare/v3.3.0...v3.4.0
Allow Symfony 6
Minor tweaks to coding standard and configurations
currentAsLink not working when determining state via votersnull name anymoreDeprecate passing a null name to MenuItem
depth ancestor of the knp_menu_ancestor Twig testknplabs/knp-menu-silex package instead.MenuMatcher::addVoter. Inject voters in the constructor insteadknp_menu_get_current_itemknp_menu_get_breadcrumbs_arrayknp_menu_as_stringknp_menu_current, knp_menu_ancestorIntegration namespace and removed the Silex one.Knp\Menu\Matcher\Voter\RegexVoter[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 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.Knp\Menu\ItemInterface::getCurrentItem as deprecatedknp_menu_get() in Twig templatesfromArray (the key is used instead)How can I help you explore Laravel packages today?