Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #9 from hellofresh/php71-compatibility
Browse files Browse the repository at this point in the history
Add 7.1 compatibility
  • Loading branch information
Nenad Stojanovikj authored May 24, 2017
2 parents a523acb + 160905f commit 3a5fad4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"require": {
"php": ">=5.6",
"ramsey/uuid": "^3.0",
"easyframework/collections": "^6.0",
"easyframework/collections": "^7.0.0",
"beberlei/assert": "^2.5"
},
"require-dev": {
Expand Down
3 changes: 1 addition & 2 deletions tests/EventStore/EventStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace HelloFresh\Tests\Engine\EventStore;

use HelloFresh\Engine\Domain\AggregateId;
use HelloFresh\Engine\Domain\AggregateIdInterface;
use HelloFresh\Engine\Domain\DomainMessage;
use HelloFresh\Engine\Domain\EventStream;
use HelloFresh\Engine\Domain\StreamName;
Expand Down Expand Up @@ -96,7 +95,7 @@ protected function createDomainMessage($id, $version, $recordedOn = null)
return new DomainMessage(
$id,
$version,
new SomethingHappened(),
new SomethingHappened($recordedOn),
$recordedOn ? $recordedOn : new \DateTimeImmutable("now")
);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Mock/SomethingHappened.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class SomethingHappened implements DomainEventInterface
/**
* SomethingHappened constructor.
*/
public function __construct()
public function __construct(\DateTimeInterface $dateTime = null)
{
$this->occurredOn = new \DateTime();
$this->occurredOn = $dateTime === null ? $dateTime : new \DateTime();
}

/**
Expand Down

0 comments on commit 3a5fad4

Please sign in to comment.