Skip to content
This repository has been archived by the owner on Nov 11, 2020. It is now read-only.

Improve events/logging for Database methods #127

Merged
merged 6 commits into from
Aug 12, 2013
Merged

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Aug 12, 2013

Summary of changes:

  • Fixed post-event dispatching for getGridFS() and createCollection()
  • Added tests for Database event dispatching
  • Fixed logging for createCollection() and make LoggableDatabase's API consistent with the base class

The pre-event was being dispatched twice. Also renamed the doGetGridFS() method to be consistent.
PHPUnit doesn't seem to care about this, but this is more accurate.
This corrects an invalid variable reference and adds a test for the method. Additionally, the handling for multiple driver APIs is moved to a "do" method.

Also, use doSelectCollection() to avoid dispatching extra events.
LoggableDatabase must support the same arguments as the base method, which means duplicate the logic.

Ensure the created collection's name is logged, as well as the new options array. Deprecate the older log format (akin to what was done in CreateCollectionEventArgs).
jmikola added a commit that referenced this pull request Aug 12, 2013
Improve events/logging for Database methods
@jmikola jmikola merged commit ea5b7d0 into master Aug 12, 2013
@jmikola jmikola deleted the database-methods branch August 12, 2013 23:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant