Upgrading from 1.2.0 to 1.3.0
Upgrade composer.json
In your composer.json file, upgrade the version of netgen/layouts-core
package and all other related packages (like netgen/layouts-standard,
netgen/layouts-ezplatform and others) to ~1.3.0 and run the
composer update command.
Database migration
Run the following command from the root of your installation to execute migration to version 1.3 of Netgen Layouts (if you’re using Doctrine Migrations v3):
$ php bin/console doctrine:migrations:migrate --configuration=vendor/netgen/layouts-core/migrations/doctrine.yaml
or in case of Doctrine Migrations v2:
$ php bin/console doctrine:migrations:migrate --configuration=vendor/netgen/layouts-core/migrations/doctrine2.yaml
Note
If the above commands fail with errors about unrecognized configuration keys, you most probably ran the command for the wrong version of Doctrine Migrations. In that case, just try running the other one to migrate correctly.
Upgrading Netgen Content Browser
Netgen Content Browser version 1.3 was also automatically installed. Be sure to read its upgrade instructions too.
Changelog
Major features
Added support for mapping groups (available only in Enterprise version)
Redesigned mapping admin interface in open source version to match the design of Enterprise version
Other changes
Minimum supported PHP version is now 7.4
Property typehints were added to all properties (private, protected, and public) in Netgen Layouts. Extreme care has been taken to make the property hints compatible with previously existing PHPDoc annotations. This makes sure that any properly used code from Netgen Layouts (e.g. public properties in create/update structs) will not result in breaking changes.
Added support for PHP 8. Note that parameter names are not part of the backwards compatibility rules. Using PHP 8’s named arguments feature might break your code when upgrading to newer Netgen Layouts versions.
Deprecations
Deprecated
LayoutResolverService::loadRulesmethod. UseLayoutResolverService::loadRulesForLayoutorLayoutResolverService::loadRulesFromGroupwith root group (the one having a NIL UUID), depending on whether you used the$layoutargument or not, respectively.Deprecated
LayoutResolverService::getRuleCountmethod. UseLayoutResolverService::getRuleCountForLayoutorLayoutResolverService::getRuleCountFromGroupwith root group (the one having a NIL UUID), depending on whether you used the$layoutargument or not, respectively.Deprecated
LayoutResolverService::loadConditionmethod. UseLayoutResolverService::loadRuleConditionmethod instead.Deprecated
LayoutResolverService::loadConditionDraftmethod. UseLayoutResolverService::loadRuleConditionDraftmethod instead.Deprecated
LayoutResolverService::createDraftmethod. UseLayoutResolverService::createRuleDraftmethod instead.Deprecated
LayoutResolverService::discardDraftmethod. UseLayoutResolverService::discardRuleDraftmethod instead.Deprecated
LayoutResolverService::restoreFromArchivemethod. UseLayoutResolverService::restoreRuleFromArchivemethod instead.Deprecated
LayoutResolverService::addConditionmethod. UseLayoutResolverService::addRuleConditionmethod instead.Deprecated
LayoutResolverService::updateConditionmethod. UseLayoutResolverService::updatedRuleConditionmethod instead.Deprecated
Rule::getCommentmethod. UseRule::getDescriptioninstead. This deprecation also applies to using theRuleobject in Twig templates: userule.descriptioninstead ofrule.comment.Deprecated
RuleCreateStruct::$commentproperty. UseRuleCreateStruct::$descriptioninstead. Note that the$descriptionproperty does not acceptnullas$commentdid. Use an empty string instead.Deprecated
RuleUpdateStruct::$commentproperty. UseRuleUpdateStruct::$descriptioninstead.Deprecated setting the value of
BlockCreateStruct::$nameproperty tonull. Use an empty string instead.Deprecated setting the value of
LayoutCreateStruct::$descriptionproperty tonull. Use an empty string instead.
Breaking changes
There were no breaking changes in 1.3 version of Netgen Layouts.