diff --git a/Core/Executor/UserManager.php b/Core/Executor/UserManager.php index 3eb1324..9beddd0 100644 --- a/Core/Executor/UserManager.php +++ b/Core/Executor/UserManager.php @@ -6,6 +6,7 @@ use Kaliop\eZMigrationBundle\API\Collection\UserCollection; use Kaliop\eZMigrationBundle\API\Exception\InvalidStepDefinitionException; use Kaliop\eZMigrationBundle\API\Exception\MigrationBundleException; +use Kaliop\eZMigrationBundle\Core\Matcher\RoleMatcher; use Kaliop\eZMigrationBundle\Core\Matcher\UserGroupMatcher; use Kaliop\eZMigrationBundle\Core\Matcher\UserMatcher; @@ -21,10 +22,13 @@ class UserManager extends RepositoryExecutor protected $userGroupMatcher; - public function __construct(UserMatcher $userMatcher, UserGroupMatcher $userGroupMatcher) + protected $roleMatcher; + + public function __construct(UserMatcher $userMatcher, UserGroupMatcher $userGroupMatcher, RoleMatcher $roleMatcher) { $this->userMatcher = $userMatcher; $this->userGroupMatcher = $userGroupMatcher; + $this->roleMatcher = $roleMatcher; } /** diff --git a/Resources/config/services.yml b/Resources/config/services.yml index f9d8215..8edb1fb 100644 --- a/Resources/config/services.yml +++ b/Resources/config/services.yml @@ -507,6 +507,7 @@ services: arguments: - '@ez_migration_bundle.user_matcher' - '@ez_migration_bundle.user_group_matcher' + - '@ez_migration_bundle.role_matcher' calls: - ['setReferenceMatcher', ['@ez_migration_bundle.reference_matcher']] tags: diff --git a/WHATSNEW.md b/WHATSNEW.md index 3a8fb14..cae2946 100644 --- a/WHATSNEW.md +++ b/WHATSNEW.md @@ -1,3 +1,9 @@ +Version: 1.0.5 +============== + +* Fixed: Crash when using `roles` in `user/create` migrations (Issue #4) + + Version: 1.0.4 ==============