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::loadRules
method. UseLayoutResolverService::loadRulesForLayout
orLayoutResolverService::loadRulesFromGroup
with root group (the one having a NIL UUID), depending on whether you used the$layout
argument or not, respectively. - Deprecated
LayoutResolverService::getRuleCount
method. UseLayoutResolverService::getRuleCountForLayout
orLayoutResolverService::getRuleCountFromGroup
with root group (the one having a NIL UUID), depending on whether you used the$layout
argument or not, respectively. - Deprecated
LayoutResolverService::loadCondition
method. UseLayoutResolverService::loadRuleCondition
method instead. - Deprecated
LayoutResolverService::loadConditionDraft
method. UseLayoutResolverService::loadRuleConditionDraft
method instead. - Deprecated
LayoutResolverService::createDraft
method. UseLayoutResolverService::createRuleDraft
method instead. - Deprecated
LayoutResolverService::discardDraft
method. UseLayoutResolverService::discardRuleDraft
method instead. - Deprecated
LayoutResolverService::restoreFromArchive
method. UseLayoutResolverService::restoreRuleFromArchive
method instead. - Deprecated
LayoutResolverService::addCondition
method. UseLayoutResolverService::addRuleCondition
method instead. - Deprecated
LayoutResolverService::updateCondition
method. UseLayoutResolverService::updatedRuleCondition
method instead. - Deprecated
Rule::getComment
method. UseRule::getDescription
instead. This deprecation also applies to using theRule
object in Twig templates: userule.description
instead ofrule.comment
. - Deprecated
RuleCreateStruct::$comment
property. UseRuleCreateStruct::$description
instead. Note that the$description
property does not acceptnull
as$comment
did. Use an empty string instead. - Deprecated
RuleUpdateStruct::$comment
property. UseRuleUpdateStruct::$description
instead. - Deprecated setting the value of
BlockCreateStruct::$name
property tonull
. Use an empty string instead. - Deprecated setting the value of
LayoutCreateStruct::$description
property tonull
. Use an empty string instead.
Breaking changes¶
There were no breaking changes in 1.3 version of Netgen Layouts.