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

[dev.icinga.com #9685] Deprecate Module::registerHook() in favor of Hook::provideHook() #1861

Closed
icinga-migration opened this issue Jul 21, 2015 · 4 comments
Milestone

Comments

@icinga-migration
Copy link
Member

@icinga-migration icinga-migration commented Jul 21, 2015

This issue has been migrated from Redmine: https://dev.icinga.com/issues/9685

Created by tgelf on 2015-07-21 09:15:57 +00:00

Assignee: (none)
Status: Resolved (closed on 2015-12-21 09:35:04 +00:00)
Target Version: 2.1.1
Last Update: 2015-12-21 09:35:04 +00:00 (in Redmine)


As we cannot pass config to hook constructors I guess there is no way of "hooking" the same class twice in a meaningful way. Hooking multiple classes from the same module for the very same hook might however occur. There is no reason why we should force people to invent an immaginary key in that case. We should IMO discuss whether further improvements (pass the key to the constructor, allow for a way to defer loading of a specific config in an anonymous function) would make sense. What would then once again allow for registering the same class multiple times, as with different configs it might absolutely make sense.

Cheers,
Thomas

Changesets

2015-11-12 17:33:51 +00:00 by tgelf 6d186aa

Module::registerHook: use class as default key

refs #9685

2015-11-13 11:45:41 +00:00 by tgelf 3306a41

Module::registerHook: use class as default key

refs #9685

2015-11-13 16:37:02 +00:00 by tgelf 54db2c9

Module::registerHook: use class as default key

refs #9685

2015-12-21 09:30:40 +00:00 by elippmann 8835552

Deprecate Module::registerHook() in favor of Module::provideHook()

refs #9685

2015-12-21 09:31:12 +00:00 by elippmann f2d54af

Merge branch 'bugfix/deprecate-registerHook-9685'

fixes #9685

Relations:

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Nov 12, 2015

Updated by tgelf on 2015-11-12 11:05:05 +00:00

  • Blocked set to 10613
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Nov 13, 2015

Updated by icinga-kanban on 2015-11-13 16:45:02 +00:00

Build !#1134 triggered by the commits 30f8faf, fd71653, cd16206, 2589fbc, b735210, 6394cec, 0e709d5, ff2c96e, 35d3342, f3cb1f9, 4b9607a, 8fa33ce, 380f11d, b718938, 997c5a0, b66e4df, 54db2c9, a24bf32, dc3c787, e6903b3, 52159c2, d903f85, 576747f failed.

Branch: origin/master
Author: Thomas Gelf

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Dec 18, 2015

Updated by elippmann on 2015-12-18 09:20:14 +00:00

  • Subject changed from Icinga\Web\Hook: module name is not a good choice for the default "key" to Deprecate Module::registerHook() in favor of Hook::provideHook()
  • Category set to Framework
  • Target Version set to 2.1.1
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Dec 21, 2015

Updated by elippmann on 2015-12-21 09:35:06 +00:00

  • Status changed from New to Resolved
  • Done % changed from 0 to 100

Applied in changeset f2d54af.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.