Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-20224 - Cleanup internal event names #9943

Merged
merged 3 commits into from
Mar 7, 2017

Conversation

totten
Copy link
Member

@totten totten commented Mar 7, 2017

If you look at the list of events emitted through the EventDispatcher,
you'll find several different formats for the names:

  actionSchedule.getMappings
  actionSchedule.prepareMailingQuery
  api.authorize
  api.exception
  api.prepare
  api.resolve
  api.respond
  civi.core.install
  civi.token.eval
  civi.token.list
  civi.token.render
  DAO::post-delete
  DAO::post-insert
  DAO::post-update
  hook_civicrm_caseChange
  hook_civicrm_post::Activity
  hook_civicrm_post::Case
  hook_civicrm_unhandled_exception

These patches rename some of the events to follow the conventions described
in CRM-20224. For each one that's renamed, I've grepped universe to see
if any published extensions referenced these events using their internal
name. None did.

fetch-universe ~/buildkit/build/universe
grep -r 'api\.\(respond\|authorize\|prepare\|resolve\|respond\)' ~/buildkit/build/universe
grep -r 'actionSchedule\.' ~/buildkit/build/universe
grep -r 'DAO::post-' ~/buildkit/build/universe

totten added 3 commits March 7, 2017 00:47
…`civi.dao.fooBar`)

If you look at the list of events emitted through the EventDispatcher, you'll
find several different formats for the names:

```
   actionSchedule.getMappings
   actionSchedule.prepareMailingQuery
   api.authorize
   api.exception
   api.prepare
   api.resolve
   api.respond
   civi.core.install
   civi.token.eval
   civi.token.list
   civi.token.render
   DAO::post-delete
   DAO::post-insert
   DAO::post-update
   hook_civicrm_caseChange
   hook_civicrm_post::Activity
   hook_civicrm_post::Case
   hook_civicrm_unhandled_exception
```

This patch renames events using the `DAO::foo-bar` convention.  Based on
grepping universe, I don't believe any extensions rely on the `DAO::*`
events.
…ivi.api.foo`)

If you look at the list of events emitted through the EventDispatcher, you'll
find several different formats for the names:

```
   actionSchedule.getMappings
   actionSchedule.prepareMailingQuery
   api.authorize
   api.exception
   api.prepare
   api.resolve
   api.respond
   civi.core.install
   civi.token.eval
   civi.token.list
   civi.token.render
   DAO::post-delete
   DAO::post-insert
   DAO::post-update
   hook_civicrm_caseChange
   hook_civicrm_post::Activity
   hook_civicrm_post::Case
   hook_civicrm_unhandled_exception
```

This patch renames events using the `api.foo` convention.  Based on
grepping universe, I don't believe any extensions rely on the `DAO::*`
events.
…ionSchedule.fooBar` vs `civi.actionSchedule.fooBar`)

If you look at the list of events emitted through the EventDispatcher, you'll
find several different formats for the names:

```
   actionSchedule.getMappings
   actionSchedule.prepareMailingQuery
   api.authorize
   api.exception
   api.prepare
   api.resolve
   api.respond
   civi.core.install
   civi.token.eval
   civi.token.list
   civi.token.render
   DAO::post-delete
   DAO::post-insert
   DAO::post-update
   hook_civicrm_caseChange
   hook_civicrm_post::Activity
   hook_civicrm_post::Case
   hook_civicrm_unhandled_exception
```

This patch renames events using the `actionSchedule.fooBar` convention.  Based on
grepping universe, I don't believe any extensions rely on the `DAO::*`
events.
@eileenmcnaughton
Copy link
Contributor

This seems OK to me. They seem like recent additions so the checks seem good enough, and the changes are just hook names so I don't expect fall out

@eileenmcnaughton eileenmcnaughton merged commit 195aacf into civicrm:master Mar 7, 2017
@totten totten deleted the master-20224 branch March 8, 2017 05:35
monishdeb pushed a commit to monishdeb/civicrm-core that referenced this pull request May 2, 2017
CRM-20224 - Cleanup internal event names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants