Skip to content

Commit

Permalink
php74+, github actions, cs
Browse files Browse the repository at this point in the history
  • Loading branch information
basz committed Oct 21, 2022
1 parent e8a37e9 commit ee582e4
Show file tree
Hide file tree
Showing 43 changed files with 147 additions and 158 deletions.
4 changes: 2 additions & 2 deletions .coveralls.yml
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
11 changes: 11 additions & 0 deletions .github/workflows/continuous-integration.yml
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]
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
nbproject
composer.lock
.phpunit.result.cache
/build
.phpcs-cache
5 changes: 5 additions & 0 deletions .laminas-ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"additional_composer_arguments": [
"--prefer-stable"
]
}
8 changes: 8 additions & 0 deletions .php-cs-fixer.php
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;
10 changes: 0 additions & 10 deletions .php_cs

This file was deleted.

24 changes: 15 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,15 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^7.3.0 | ^8.0",
"ramsey/uuid" : "^3.6.0 || ^4.0",
"php": "^7.4 || ^8.0",
"ramsey/uuid": "4.2.1 || ^4.3",
"beberlei/assert": "^2.7.1 || ^3.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"prooph/php-cs-fixer-config": "^0.4",
"satooshi/php-coveralls": "^1.0",
"prooph/bookdown-template": "^0.2.3"
},
"conflict": {
"php": "7.1.3"
"php-coveralls/php-coveralls": "^2.2",
"phpunit/phpunit": "^9.5.5",
"prooph/bookdown-template": "^0.2.3",
"prooph/php-cs-fixer-config": "^0.5"
},
"autoload": {
"psr-4": {
Expand All @@ -43,5 +40,14 @@
"psr-4": {
"ProophTest\\Common\\": "tests"
}
},
"scripts": {
"check": [
"@cs-check",
"@test"
],
"cs-check": "php-cs-fixer fix -v --diff --dry-run",
"cs-fix": "php-cs-fixer fix -v --diff",
"test": "phpunit --colors=always"
}
}
23 changes: 7 additions & 16 deletions phpunit.xml.dist
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>
4 changes: 2 additions & 2 deletions src/Event/ActionEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/Event/ActionEventEmitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/Event/ActionEventListenerAggregate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/Event/DefaultActionEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/Event/DefaultListenerHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/Event/DetachAggregateHandlers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/Event/ListenerHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/Event/ProophActionEventEmitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/Messaging/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/Messaging/DomainEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 5 additions & 4 deletions src/Messaging/DomainMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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'];
Expand Down
6 changes: 3 additions & 3 deletions src/Messaging/FQCNMessageFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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'])) {
Expand Down
4 changes: 2 additions & 2 deletions src/Messaging/HasMessageName.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 4 additions & 2 deletions src/Messaging/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -19,7 +19,9 @@
interface Message extends HasMessageName
{
public const TYPE_COMMAND = 'command';

public const TYPE_EVENT = 'event';

public const TYPE_QUERY = 'query';

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Messaging/MessageConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/Messaging/MessageDataAssertion.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/Messaging/MessageFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/Messaging/NoOpMessageConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/Messaging/PayloadConstructable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/Messaging/PayloadTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/Messaging/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading

0 comments on commit ee582e4

Please sign in to comment.