Skip to content

Latest commit

 

History

History
87 lines (62 loc) · 2.24 KB

UPGRADE-4.0.md

File metadata and controls

87 lines (62 loc) · 2.24 KB

UPGRADE FROM 3.x to 4.0

Final classes

All classes that were marked as final in 3.x are now marked final in 4.0.

Deprecations

All the deprecated code introduced on 3.x is removed on 4.0.

Please read 3.x upgrade guides for more information.

See also the diff code.

Assets

Removed assets.stylesheets and assets.javascripts from sonata_page configuration

sonata_page:
-    assets:
-        stylesheets:
-            # Defaults:
-            - bundles/sonatapage/app.css
-        javascripts:

Template

Remove deprecate blocks from base_layout.html.twig

- {% block page_stylesheets %}
+ {% block sonata_page_stylesheets %}
...
- {% block page_javascripts  %}
+ {% block sonata_page_javascripts  %}
...
- {% block page_top_bar  %}
+ {% block sonata_page_top_bar  %}
...
- {% block page_container  %}
+ {% block sonata_page_container  %}
...
- {% block page_asset_footer  %}
+ {% block sonata_page_asset_footer  %}

Slugify Service

This config was removed from sonata page configuration, make sure that, you do not have this anymore into your configs.

- sonata_page:
-    slugify_service: sonata.page.slugify.cocur

BlockContextManager

The class Sonata\PageBundle\Block\BlockContextManager was removed.

Please be aware the config

- sonata_block:
-        context_manager: sonata.page.block.context_manager 

won't work anymore then. You should rely on the default value instead.

Route name and url changes

The following routes were changed:

  • Remove non working /view route for Block Admin
  • Rename compose preview url for Blocks from compose_preview to compose-preview
  • Rename shared block route name from block/shared to block_shared

Remove unused code

The following code has been removed since it is not used:

  • Sonata\PageBundle\Controller\AjaxController
  • Sonata\PageBundle\Controller\BlockController

Migration to Webpack

Please check the src/Resources/public and the documentation to see the used CSS and JavaScript.

If you are customising (specially removing standard JavaScript or CSS) assets, this will affect you.