-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* **BREAKING CHANGES** - Rename interfaces to have the Interface suffix **OTHER CHANGES** - Add pre-projection callables to `AbstractCachedProvider::getAndCacheData` to allow to perform additional operations after fetching data when there is a cache miss - Add `invalidateCacheItemByKey` to `AbstractCachedProvider` to allow invalidation of individual cache items - Fix tests - Add new test cases for the new methods - Update documention * Rework logic of pre-projection callables Fix tests Update Documentation
- Loading branch information
1 parent
0f0431d
commit 4fc1e44
Showing
45 changed files
with
521 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php declare(strict_types=1); | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Kununu\Projections\Exception; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
src/ProjectionItemIterable.php → src/ProjectionItemIterableInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
<?php declare(strict_types=1); | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Kununu\Projections; | ||
|
||
interface ProjectionItemIterable extends ProjectionItem | ||
interface ProjectionItemIterableInterface extends ProjectionItemInterface | ||
{ | ||
public function storeData(iterable $data): ProjectionItemIterable; | ||
public function storeData(iterable $data): ProjectionItemIterableInterface; | ||
|
||
public function data(): iterable; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Kununu\Projections; | ||
|
||
use Kununu\Projections\Tag\Tags; | ||
|
||
interface ProjectionRepositoryInterface | ||
{ | ||
public function add(ProjectionItemInterface $item): void; | ||
|
||
public function addDeferred(ProjectionItemInterface $item): void; | ||
|
||
public function flush(): void; | ||
|
||
public function get(ProjectionItemInterface $item): ?ProjectionItemInterface; | ||
|
||
public function delete(ProjectionItemInterface $item): void; | ||
|
||
public function deleteByTags(Tags $tags): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
<?php declare(strict_types=1); | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Kununu\Projections\Tag; | ||
|
||
trait ProjectionTagGenerator | ||
{ | ||
private static function createTagsFromArray(string ...$tagsAsStrings): Tags | ||
private static function createTagsFromArray(string ...$tags): Tags | ||
{ | ||
$tags = []; | ||
|
||
foreach ($tagsAsStrings as $tag) { | ||
$tags[] = new Tag($tag); | ||
} | ||
|
||
return new Tags(...$tags); | ||
return new Tags( | ||
...array_map( | ||
function(string $tag): Tag { | ||
return new Tag($tag); | ||
}, | ||
$tags | ||
) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php declare(strict_types=1); | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Kununu\Projections\Tag; | ||
|
||
|
Oops, something went wrong.