All blocks tagged with sonata.block
will now be autoregistered into the sonata.block.loader.service
.
You can still override the block configuration with sonata_block.blocks
, e.g. to change the contexts.
Deprecated BlockServiceInterface::getJavascripts
and BlockServiceInterface::getStylesheets
.
Move your block assets to the template.
Defining menu blocks by using a <tag name="sonata.block.menu"/>
tag was removed, because it never worked properly.
Use the existing <tag name="knp_menu.menu" alias="app.main"/>
tag to define a menu block instead.
Since we require at least Symfony 2.8, this BC trick is not needed anymore.
The concerned class and interface should be internal, but as they was not marked like this, we will deprecate them.
Menus for the MenuBlockService
can now be defined by a <tag name="sonata.block.menu"/>
tag.
Defining the blocks via sonata_block.menus
is deprecated.
Injecting the block id into a service is deprecated and will be automatically set.
Instead, provide an empty argument:
<service id="acme.block.service" class="Acme\BlockBundle\AcmeBlockService">
<tag name="sonata.block"/>
<argument>acme.block.service</argument>
</service>
<service id="acme.block.service" class="Acme\BlockBundle\AcmeBlockService">
<tag name="sonata.block"/>
<argument/>
</service>
The Sonata\BlockBundle\Block\AbstractBlockService
and Sonata\BlockBundle\Block\BaseBlockService
classes are deprecated.
Use Sonata\BlockBundle\Block\Service\AbstractBlockService
for normal blocks
or Sonata\BlockBundle\Block\Service\AbstractAdminBlockService
for manageable blocks instead.
The interfaces Sonata\BlockBundle\Block\BlockServiceInterface
and Sonata\BlockBundle\Block\BlockAdminServiceInterface
are deprecated.
The Tests\Block\Service\FakeTemplating
class is deprecated. Use Test\FakeTemplating
instead.
This is introduced on 3.1.1 because of a forgotten needed Merge Request.
The Tests\Block\AbstractBlockServiceTest
class is deprecated. Use Test\AbstractBlockServiceTestCase
instead.
All files under the Tests
directory are now correctly handled as internal test classes.
You can't extend them anymore, because they are only loaded when running internal tests.
More information can be found in the composer docs.