Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 1.22 KB

UPGRADE-3.x.md

File metadata and controls

41 lines (33 loc) · 1.22 KB

UPGRADE 3.x

UPGRADE FROM 3.2 to 3.3

BaseBreacrumbMenuBlockService changed its constructor

The base class for breadcrumb was broken since the release of 3.0. It was missing the EditableBlockService interface so it can be edited through SonataPageBundle and the best way to implement it was to change the constructor in order to inject the MenuBlockService from the SonataBlockBundle.

If you extend BaseBreacrumbMenuBlockService you need to change your service definition file.

Before:

    ->set('my_custom_breadcrumb_block_service', MyCustomBreadcrumbBlockService::class)
        ->public()
        ->tag('sonata.block')
        ->tag('sonata.breadcrumb')
        ->args([
            new ReferenceConfigurator('twig'),
            new ReferenceConfigurator('knp_menu.factory'),
        ]);

After:

    ->set('my_custom_breadcrumb_block_service', MyCustomBreadcrumbBlockService::class)
        ->public()
        ->tag('sonata.block')
        ->tag('sonata.breadcrumb')
        ->args([
            new ReferenceConfigurator('twig'),
            new ReferenceConfigurator('sonata.block.service.menu'),
            new ReferenceConfigurator('knp_menu.factory'),
        ]);