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
bundle in your kernel.
Upgrade existing packages¶
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
|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.
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.
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\NetgenCoreUIBundlebundle 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:importcommand, import type, was removed. Now the first (and only) argument is the path to file to import data from.
Netgen\BlockManager\Parameters\ParameterTypeInterface::getIdentifiermethod has been declared static. Make the method static on your custom parameter types to migrate.
Netgen\BlockManager\Layout\Resolver\TargetTypeInterface::getTypemethod has been declared static. Make the method static on your custom target types to migrate.
Netgen\BlockManager\Layout\Resolver\ConditionTypeInterface::getTypemethod has been declared static. Make the method static on your custom condition types to migrate.
Netgen\BlockManager\Block\BlockDefinition\ContainerDefinitionHandlerabstract class has been removed since it was made obsolete in previous versions of Netgen Layouts. Implement
ContainerDefinitionHandlerInterfaceinterface from the same namespace directly in your handlers. Also, if you referenced this class in your block plugins in
getExtendedHandlermethod, replace it also with
Netgen\BlockManager\Block\BlockDefinition\Handler\PluginInterface::getExtendedHandlermethod has been renamed to
getExtendedHandlersand 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::loadByRemoteIdmethods for your custom value loaders have been changed to return
nullif the value cannot be loaded. To migrate, remove throwing of
ItemExceptionand simply return
netgen_block_manager.items.value_typesconfiguration has been renamed to
netgen_block_manager.value_types. To migrate your custom value types, just delete the
itemskey and move
value_typesconfig directly below
# Before netgen_block_manager: items: value_types: my_type: name: 'My type'
# After netgen_block_manager: value_types: my_type: name: 'My type'