Skip to content

Commit b2ba3fd

Browse files
committed
Feature/update event contracts and dependencies for improved compatibility
1 parent 4f81c8a commit b2ba3fd

File tree

6 files changed

+22
-17
lines changed

6 files changed

+22
-17
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
php-version: [ '8.2', '8.3', '8.4']
16+
php-version: [ '8.2', '8.3', '8.4' ]
1717

1818
steps:
1919
- name: Checkout source code
@@ -40,7 +40,10 @@ jobs:
4040

4141
- name: Install Dependencies
4242
if: steps.composer-cache.outputs.cache-hit != 'true'
43-
run: composer install --prefer-dist --no-progress --no-suggest
43+
run: composer install --prefer-dist --no-progress
44+
45+
- name: Check Code Style
46+
run: composer pint-test
4447

4548
- name: Execute Static Code analysis
4649
run: composer analyse

composer.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111
],
1212
"minimum-stability": "stable",
1313
"require": {
14-
"php": "^8.1.0",
14+
"php": "^8.2",
1515
"ext-json": "*",
1616
"ramsey/uuid": "^4.1.0",
1717
"nesbot/carbon": "^3.2.0",
1818
"illuminate/collections": "^11.0.0",
1919
"lambdish/phunctional": "^2.1.0",
2020
"doctrine/instantiator": "^2.0.0",
21-
"complex-heart/contracts": "^2.0.0"
21+
"complex-heart/contracts": "^3.0.0"
2222
},
2323
"require-dev": {
2424
"mockery/mockery": "^1.6.0",
25-
"pestphp/pest": "^2.0",
26-
"pestphp/pest-plugin-faker": "^2.0",
25+
"pestphp/pest": "^3.8.4",
26+
"pestphp/pest-plugin-faker": "^3.0.0",
2727
"phpstan/phpstan": "^1.0",
2828
"phpstan/extension-installer": "^1.3",
2929
"phpstan/phpstan-mockery": "^1.1",
@@ -42,12 +42,9 @@
4242
"scripts": {
4343
"test": "vendor/bin/pest --configuration=phpunit.xml --coverage --coverage-clover=coverage.xml --log-junit=test.xml",
4444
"test-cov": "vendor/bin/pest --configuration=phpunit.xml --coverage --coverage-html=coverage",
45-
"analyse": "vendor/bin/phpstan analyse src --no-progress --memory-limit=4G --level=8",
46-
"check": [
47-
"@analyse",
48-
"@test"
49-
],
50-
"pint": "vendor/bin/pint --preset psr12"
45+
"analyse": "vendor/bin/phpstan analyse --no-progress --memory-limit=4G",
46+
"pint-test": "vendor/bin/pint --preset=psr12 --test",
47+
"pint": "vendor/bin/pint --preset=psr12"
5148
},
5249
"config": {
5350
"allow-plugins": {

phpstan.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parameters:
2+
paths:
3+
- src/
4+
level: 8

src/Traits/HasDomainEvents.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
namespace ComplexHeart\Domain\Model\Traits;
66

7-
use ComplexHeart\Domain\Contracts\ServiceBus\Event;
8-
use ComplexHeart\Domain\Contracts\ServiceBus\EventBus;
7+
use ComplexHeart\Domain\Contracts\Events\Event;
8+
use ComplexHeart\Domain\Contracts\Events\EventBus;
99

1010
/**
1111
* Trait HasDomainEvents

tests/AggregatesTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
declare(strict_types=1);
44

5-
use ComplexHeart\Domain\Contracts\ServiceBus\Event;
6-
use ComplexHeart\Domain\Contracts\ServiceBus\EventBus;
5+
6+
use ComplexHeart\Domain\Contracts\Events\Event;
7+
use ComplexHeart\Domain\Contracts\Events\EventBus;
78
use ComplexHeart\Domain\Model\Test\Fixtures\OrderManagement\Domain\Order;
89
use ComplexHeart\Domain\Model\ValueObjects\UUIDValue;
910

tests/Fixtures/OrderManagement/Domain/Events/OrderCreated.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace ComplexHeart\Domain\Model\Test\Fixtures\OrderManagement\Domain\Events;
66

7-
use ComplexHeart\Domain\Contracts\ServiceBus\Event;
7+
use ComplexHeart\Domain\Contracts\Events\Event;
88
use ComplexHeart\Domain\Model\Test\Fixtures\OrderManagement\Domain\OrderLine;
99
use ComplexHeart\Domain\Model\Test\Fixtures\OrderManagement\Domain\Order;
1010
use ComplexHeart\Domain\Model\ValueObjects\DateTimeValue as Timestamp;

0 commit comments

Comments
 (0)