Remove old OC_Hook for OC_Group events#24041
Merged
juliusknorr merged 1 commit intomasterfrom Nov 11, 2020
Merged
Conversation
Those mappings exist and we will remove the first ones (labeled as `old`):
old: `\OC_Hook::listen('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid));`
since OC 8 (owncloud/core#12618): `$groupManager->listen('\OC\Group', 'preCreate', function ($gid) { ... });`
since NC 17 (#18350): `OCP\Group\Events\BeforeGroupCreatedEvent`
old: `\OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $gid->getGID()));`
since OC 8 (owncloud/core#12618): `$groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $gid) { ... });`
since NC 17 (#18350): `OCP\Group\Events\GroupCreatedEvent`
old: `\OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID()));`
since OC 8 (owncloud/core#12618): `$groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) { ... });`
since NC 17 (#18350): `OCP\Group\Events\BeforeGroupDeletedEvent`
old: `\OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID()));`
since OC 8 (owncloud/core#12618): `$groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) { ... });`
since NC 17 (#18350): `OCP\Group\Events\GroupDeletedEvent`
old: `\OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID()));`
since OC 8 (owncloud/core#12618): `$groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { ... });`
since NC 17 (#18350): `OCP\Group\Events\BeforeUserAddedEvent`
old: `\OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));`
since OC 8 (owncloud/core#12618): `$groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { ... });`
since NC 17 (#18350): `OCP\Group\Events\UserAddedEvent`
Signed-off-by: Morris Jobke <[email protected]>
skjnldsv
approved these changes
Nov 11, 2020
Member
Author
|
Added to #23210 |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Those mappings exist and we will remove the first ones (labeled as
old):old:
\OC_Hook::listen('OC_Group', 'pre_createGroup', ...);since OC 8 (owncloud/core#12618):
$groupManager->listen('\OC\Group', 'preCreate', ...);since NC 17 (#18350):
OCP\Group\Events\BeforeGroupCreatedEventold:
\OC_Hook::emit('OC_User', 'post_createGroup', ...);since OC 8 (owncloud/core#12618):
$groupManager->listen('\OC\Group', 'postCreate', ...);since NC 17 (#18350):
OCP\Group\Events\GroupCreatedEventold:
\OC_Hook::emit('OC_Group', 'pre_deleteGroup', ...);since OC 8 (owncloud/core#12618):
$groupManager->listen('\OC\Group', 'preDelete', ...);since NC 17 (#18350):
OCP\Group\Events\BeforeGroupDeletedEventold:
\OC_Hook::emit('OC_User', 'post_deleteGroup', ...);since OC 8 (owncloud/core#12618):
$groupManager->listen('\OC\Group', 'postDelete', ...);since NC 17 (#18350):
OCP\Group\Events\GroupDeletedEventold:
\OC_Hook::emit('OC_Group', 'pre_addToGroup', ...);since OC 8 (owncloud/core#12618):
$groupManager->listen('\OC\Group', 'preAddUser', ...);since NC 17 (#18350):
OCP\Group\Events\BeforeUserAddedEventold:
\OC_Hook::emit('OC_Group', 'post_addToGroup', ...);since OC 8 (owncloud/core#12618):
$groupManager->listen('\OC\Group', 'postAddUser', ...);since NC 17 (#18350):
OCP\Group\Events\UserAddedEventI only found the circles app to still use them: nextcloud/circles#515