Skip to content

Commit

Permalink
broadway-saga 0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
othillo committed Apr 9, 2020
1 parent 60dc81f commit 4bb3ef9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "MIT",
"require": {
"php": ">=7.2",
"broadway/broadway-saga": "~0.8",
"broadway/broadway-saga": "~0.10",
"doctrine/mongodb": "^1.0",
"beberlei/assert": "^3.0",
"alcaeus/mongo-php-adapter": "^1.1"
Expand Down
4 changes: 2 additions & 2 deletions src/MongoDBRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(Collection $collection)
/**
* {@inheritdoc}
*/
public function findOneBy(Criteria $criteria, $sagaId)
public function findOneBy(Criteria $criteria, $sagaId): ?State
{
$query = $this->createQuery($criteria, $sagaId);
$results = $query->execute();
Expand All @@ -51,7 +51,7 @@ public function findOneBy(Criteria $criteria, $sagaId)
/**
* {@inheritdoc}
*/
public function save(State $state, $sagaId)
public function save(State $state, $sagaId): void
{
$serializedState = $state->serialize();
$serializedState['_id'] = $serializedState['id'];
Expand Down
3 changes: 2 additions & 1 deletion test/MongoDBRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

namespace Broadway\Saga\State\MongoDB;

use Broadway\Saga\State\RepositoryInterface;
use Broadway\Saga\State\Testing\AbstractRepositoryTest;
use Doctrine\MongoDB\Configuration;
use Doctrine\MongoDB\Connection;
Expand All @@ -22,7 +23,7 @@ class MongoDBRepositoryTest extends AbstractRepositoryTest
protected static $dbName = 'doctrine_mongodb';
protected $connection;

protected function createRepository()
protected function createRepository(): RepositoryInterface
{
$config = new Configuration();
$config->setLoggerCallable(function ($msg) {});
Expand Down

0 comments on commit 4bb3ef9

Please sign in to comment.