Upgrading from 0.11.0 to 0.12.0

Add additional packages

Content Browser integration into eZ Platform has been taken out of Netgen Content Browser core and moved to a separate package. The package will be automatically installed when upgrading to 0.12. To activate the package, you need to enable Netgen\Bundle\ContentBrowserEzPlatformBundle\NetgenContentBrowserEzPlatformBundle bundle in your kernel.

Upgrade existing packages

In your composer.json file, replace the package names for Netgen Layouts with the new package names. Refer to the table below to see the matching package names for packages listed in your composer.json file. If some of the packages do not have a matching new name, you can safely remove the package altogether.

Old package name

New package name













After changing the package names, upgrade the versions of all Netgen Layouts and Netgen Content Browser packages to ~0.12.0 and run the composer update command.

Database migration

Run the following command from the root of your installation to execute migration to version 0.12 of Netgen Layouts:

$ php bin/console doctrine:migrations:migrate --configuration=vendor/netgen/layouts-core/migrations/doctrine.yml

Upgrading Netgen Content Browser

Netgen Content Browser version 0.12 was also automatically installed. Be sure to read its upgrade instructions too, to make sure you custom code keeps working.

Breaking changes

  • Minimum required version of PHP is now 7.1

  • Scalar and return typehints have been added throughout the codebase. You will need to update your custom code to match the typehints from Netgen Layouts.

  • Layouts exported in Netgen Layouts 0.11 and lower cannot be imported into Netgen Layouts 0.12, due to updated specification.

  • Netgen\Bundle\CoreUIBundle\NetgenCoreUIBundle bundle has been removed. Remove it from your kernel class.

  • If running Netgen Layouts on top of eZ Platform and if you had an integration bundle for eZ Platform Admin UI activated (Netgen\Bundle\EzPlatformAdminUILayoutsBundle\NetgenEzPlatformAdminUILayoutsBundle), remove it from your kernel class, since the admin integration was moved to the main eZ Platform integration package.

  • First argument to ngbm:import command, import type, was removed. Now the first (and only) argument is the path to file to import data from.

  • Netgen\BlockManager\Parameters\ParameterTypeInterface::getIdentifier method has been declared static. Make the method static on your custom parameter types to migrate.

  • Netgen\BlockManager\Layout\Resolver\TargetTypeInterface::getType method has been declared static. Make the method static on your custom target types to migrate.

  • Netgen\BlockManager\Layout\Resolver\ConditionTypeInterface::getType method has been declared static. Make the method static on your custom condition types to migrate.

  • Netgen\BlockManager\Block\BlockDefinition\ContainerDefinitionHandler abstract class has been removed since it was made obsolete in previous versions of Netgen Layouts. Implement ContainerDefinitionHandlerInterface interface from the same namespace directly in your handlers. Also, if you referenced this class in your block plugins in getExtendedHandler method, replace it also with ContainerDefinitionHandlerInterface interface.

  • Netgen\BlockManager\Block\BlockDefinition\Handler\PluginInterface::getExtendedHandler method has been renamed to getExtendedHandlers and it should only return the array of FQCNs, as opposed to the old variant, which could return a single FQCN as well as an array. Rename the method and return the array of FQCNs to migrate.

  • Netgen\BlockManager\Item\ValueLoaderInterface::load and Netgen\BlockManager\Item\ValueLoaderInterface::loadByRemoteId methods for your custom value loaders have been changed to return null if the value cannot be loaded. To migrate, remove throwing of ItemException and simply return null instead.

  • netgen_block_manager.items.value_types configuration has been renamed to netgen_block_manager.value_types. To migrate your custom value types, just delete the items key and move value_types config directly below netgen_block_manager key.

    # Before
                    name: 'My type'
    # After
                name: 'My type'