-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
147 additions
and
158 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# for php-coveralls | ||
service_name: travis-ci | ||
coverage_clover: build/logs/clover.xml | ||
coverage_clover: clover.xml | ||
json_path: coveralls-upload.json |
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,11 @@ | ||
name: "Continuous Integration" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
tags: | ||
|
||
jobs: | ||
ci: | ||
uses: laminas/workflow-continuous-integration/.github/workflows/[email protected] |
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 |
---|---|---|
|
@@ -8,4 +8,4 @@ | |
nbproject | ||
composer.lock | ||
.phpunit.result.cache | ||
/build | ||
.phpcs-cache |
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,5 @@ | ||
{ | ||
"additional_composer_arguments": [ | ||
"--prefer-stable" | ||
] | ||
} |
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,8 @@ | ||
<?php | ||
|
||
$config = new Prooph\CS\Config\Prooph(); | ||
$config->getFinder()->in(__DIR__); | ||
|
||
$config->setCacheFile(__DIR__ . '/.php_cs.cache'); | ||
|
||
return $config; |
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,21 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
bootstrap="vendor/autoload.php" | ||
> | ||
<testsuite name="Prooph Common Test Suite"> | ||
<directory>./tests/</directory> | ||
</testsuite> | ||
|
||
<coverage> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" bootstrap="vendor/autoload.php" convertDeprecationsToExceptions="true" colors="true"> | ||
<coverage processUncoveredFiles="true"> | ||
<include> | ||
<directory suffix=".php">src</directory> | ||
<directory suffix=".php">./src</directory> | ||
</include> | ||
</coverage> | ||
|
||
<testsuite name="Prooph Common Test Suite"> | ||
<directory>./tests/</directory> | ||
</testsuite> | ||
</phpunit> |
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -18,6 +18,7 @@ | |
use DateTimeZone; | ||
use Ramsey\Uuid\Uuid; | ||
use Ramsey\Uuid\UuidInterface; | ||
use ReflectionClass; | ||
|
||
/** | ||
* Base class for commands, domain events and queries. All are messages but differ in their intention. | ||
|
@@ -50,12 +51,12 @@ public static function fromArray(array $messageData): DomainMessage | |
{ | ||
MessageDataAssertion::assert($messageData); | ||
|
||
$messageRef = new \ReflectionClass(\get_called_class()); | ||
$messageRef = new ReflectionClass(\get_called_class()); | ||
|
||
/** @var $message DomainMessage */ | ||
$message = $messageRef->newInstanceWithoutConstructor(); | ||
|
||
$message->uuid = Uuid::fromString($messageData['uuid']); | ||
$message->uuid = Uuid::fromString((string) $messageData['uuid']); | ||
$message->messageName = $messageData['message_name']; | ||
$message->metadata = $messageData['metadata']; | ||
$message->createdAt = $messageData['created_at']; | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -38,7 +38,7 @@ public function createMessageFromArray(string $messageName, array $messageData): | |
} | ||
|
||
if (! isset($messageData['uuid'])) { | ||
$messageData['uuid'] = Uuid::uuid4()->toString(); | ||
$messageData['uuid'] = Uuid::uuid4(); | ||
} | ||
|
||
if (! isset($messageData['created_at'])) { | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -19,7 +19,9 @@ | |
interface Message extends HasMessageName | ||
{ | ||
public const TYPE_COMMAND = 'command'; | ||
|
||
public const TYPE_EVENT = 'event'; | ||
|
||
public const TYPE_QUERY = 'query'; | ||
|
||
/** | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
|
||
/** | ||
* This file is part of prooph/common. | ||
* (c) 2014-2021 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2021 Sascha-Oliver Prolic <[email protected]> | ||
* (c) 2014-2022 Alexander Miertsch <[email protected]> | ||
* (c) 2015-2022 Sascha-Oliver Prolic <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
Oops, something went wrong.