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

Donation logging #451

Merged
merged 2 commits into from May 30, 2016

Conversation

2 participants
@gbirke
Member

gbirke commented May 30, 2016

Implement a donation event logging service, use service when PPL notification creates child donation.

This is for https://phabricator.wikimedia.org/T135526.

The other subtasks of https://phabricator.wikimedia.org/T135522 still need to be implemented.

gbirke added some commits May 30, 2016

Add DonationEventLogger Service
It logs donation lifetime events.

Add DoctrineDonationEventLogger that writes to the `data` field of a
`Donation` entity.
Add event logging to PPL notification
When a child donation is created, add donation IDs to child and parent
donation event log.

Implementation for https://phabricator.wikimedia.org/T135526
$expectedLog = [
'2014-01-01 0:00:00' => 'New year!',
self::LOG_TIMESTAMP => self::DEFAULT_MESSAGE
];

This comment has been minimized.

@JeroenDeDauw

JeroenDeDauw May 30, 2016

Member

Do you prefer this style over inlining the $expectedLog variable?

@JeroenDeDauw

JeroenDeDauw May 30, 2016

Member

Do you prefer this style over inlining the $expectedLog variable?

@@ -231,15 +245,15 @@ public function testGivenNewTransactionIdForBookedDonation_transactionIdShowsUpI
$fakeRepository,
new SucceedingDonationAuthorizer(),
$this->getMailer(),
new NullLogger()
new NullLogger(),
$this->getEventLogger()

This comment has been minimized.

@JeroenDeDauw

JeroenDeDauw May 30, 2016

Member

This can be avoided by setting default services in setUp. An yeah, I'm aware I was complaining about setUp before :)

@JeroenDeDauw

JeroenDeDauw May 30, 2016

Member

This can be avoided by setting default services in setUp. An yeah, I'm aware I was complaining about setUp before :)

@JeroenDeDauw JeroenDeDauw merged commit ca54606 into master May 30, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@JeroenDeDauw JeroenDeDauw deleted the donation-logging branch May 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment