Skip to content

Commit f10d9aa

Browse files
committed
fixed CI
1 parent fdd483f commit f10d9aa

35 files changed

+92
-102
lines changed

.github/workflows/ci.yaml

Lines changed: 48 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -6,116 +6,107 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- name: Checkout repository
9-
uses: actions/checkout@v2
9+
uses: actions/checkout@v4
10+
- name: Set up Docker Compose
11+
uses: docker/setup-compose-action@v1
1012
- name: Docker pull
11-
run: docker-compose pull php
12-
- name: Docker caching
13-
uses: satackey/action-docker-layer-caching@v0.0.11
14-
continue-on-error: true
13+
run: docker compose pull php
1514
- name: Start PHP container
16-
run: docker-compose up --detach --build --no-deps php
15+
run: docker compose up --detach --build --no-deps php
1716
- name: Run composer validate
18-
run: docker-compose exec -T php composer validate --strict --no-interaction --ansi
17+
run: docker compose exec -T php composer validate --strict --no-interaction --ansi
1918
run-php-cs-fixer:
2019
name: php-cs-fixer
2120
runs-on: ubuntu-latest
2221
steps:
2322
- name: Checkout repository
24-
uses: actions/checkout@v2
23+
uses: actions/checkout@v4
24+
- name: Set up Docker Compose
25+
uses: docker/setup-compose-action@v1
2526
- name: Docker pull
26-
run: docker-compose pull php
27-
- name: Docker caching
28-
uses: satackey/action-docker-layer-caching@v0.0.11
29-
continue-on-error: true
27+
run: docker compose pull php
3028
- name: Composer caching
31-
uses: actions/cache@v2
29+
uses: actions/cache@v4
3230
with:
3331
path: ./build/.composer
34-
key: ${{ runner.os }}-composer-v1-${{ hashFiles('composer.json') }}
35-
restore-keys: ${{ runner.os }}-composer-v1-
32+
key: ${{ runner.os }}-composer-v2-${{ hashFiles('composer.json') }}
33+
restore-keys: ${{ runner.os }}-composer-v2-
3634
- name: Start PHP container
37-
run: docker-compose up --detach --build --no-deps php
35+
run: docker compose up --detach --build --no-deps php
3836
- name: Install dependencies
39-
run: docker-compose exec -T php composer --no-scripts install --no-interaction --ansi
37+
run: docker compose exec -T php composer --no-scripts install --no-interaction --ansi
4038
- name: Run php-cs-fixer
41-
run: docker-compose exec -T php bin/php-cs-fixer fix --diff --dry-run --ansi --config=.php-cs-fixer.dist.php
39+
run: docker compose exec -T php bin/php-cs-fixer fix --diff --dry-run --ansi --config=.php-cs-fixer.dist.php
4240
run-phpunit:
4341
name: phpunit
4442
runs-on: ubuntu-latest
4543
steps:
4644
- name: Checkout repository
47-
uses: actions/checkout@v2
45+
uses: actions/checkout@v4
46+
- name: Set up Docker Compose
47+
uses: docker/setup-compose-action@v1
4848
- name: Docker pull
49-
run: docker-compose pull
50-
- name: Docker caching
51-
uses: satackey/action-docker-layer-caching@v0.0.11
52-
continue-on-error: true
49+
run: docker compose pull
5350
- name: Composer caching
54-
uses: actions/cache@v2
51+
uses: actions/cache@v4
5552
with:
5653
path: ./build/.composer
57-
key: ${{ runner.os }}-composer-v1-${{ hashFiles('composer.json') }}
58-
restore-keys: ${{ runner.os }}-composer-v1-
54+
key: ${{ runner.os }}-composer-v2-${{ hashFiles('composer.json') }}
55+
restore-keys: ${{ runner.os }}-composer-v2-
5956
- name: Start containers
60-
run: docker-compose up --detach --build
57+
run: docker compose up --detach --build
6158
- name: Install dependencies
62-
run: docker-compose exec -T php composer install --no-scripts --no-interaction --ansi
59+
run: docker compose exec -T php composer install --no-scripts --no-interaction --ansi
6360
- name: Run phpunit
64-
run: docker-compose exec -T php xphp -dxdebug.mode=coverage bin/phpunit --color=always --configuration=phpunit.xml.dist
61+
run: docker compose exec -T php xphp -dxdebug.mode=coverage bin/phpunit --color=always --configuration=phpunit.xml.dist
6562
- name: Upload coverage report to Codecov.io
66-
uses: codecov/codecov-action@v2
63+
uses: codecov/codecov-action@v5
6764
with:
6865
files: ./build/.phpunit/clover.xml
6966
fail_ci_if_error: true
7067
verbose: true
71-
# - name: Upload coverage report to GitHub.com
72-
# uses: actions/upload-artifact@v2
73-
# with:
74-
# name: Code Coverage Report
75-
# path: build/.phpunit/code-coverage/*
68+
token: ${{ secrets.CODECOV_TOKEN }}
7669
run-rector:
7770
name: rector
7871
runs-on: ubuntu-latest
7972
steps:
8073
- name: Checkout repository
81-
uses: actions/checkout@v2
74+
uses: actions/checkout@v4
75+
- name: Set up Docker Compose
76+
uses: docker/setup-compose-action@v1
8277
- name: Docker pull
83-
run: docker-compose pull php
84-
- name: Docker caching
85-
uses: satackey/action-docker-layer-caching@v0.0.11
86-
continue-on-error: true
78+
run: docker compose pull php
8779
- name: Composer caching
88-
uses: actions/cache@v2
80+
uses: actions/cache@v4
8981
with:
9082
path: ./build/.composer
91-
key: ${{ runner.os }}-composer-v1-${{ hashFiles('composer.json') }}
92-
restore-keys: ${{ runner.os }}-composer-v1-
83+
key: ${{ runner.os }}-composer-v2-${{ hashFiles('composer.json') }}
84+
restore-keys: ${{ runner.os }}-composer-v2-
9385
- name: Start PHP container
94-
run: docker-compose up --detach --build --no-deps php
86+
run: docker compose up --detach --build --no-deps php
9587
- name: Install dependencies
96-
run: docker-compose exec -T php composer install --no-interaction --ansi
88+
run: docker compose exec -T php composer install --no-interaction --ansi
9789
- name: Run rector
98-
run: docker-compose exec -T php bin/rector --no-progress-bar --dry-run --ansi
90+
run: docker compose exec -T php bin/rector --no-progress-bar --dry-run --ansi
9991
run-deptrac:
10092
name: deptrac
10193
runs-on: ubuntu-latest
10294
steps:
10395
- name: Checkout repository
104-
uses: actions/checkout@v2
96+
uses: actions/checkout@v4
97+
- name: Set up Docker Compose
98+
uses: docker/setup-compose-action@v1
10599
- name: Docker pull
106-
run: docker-compose pull php
107-
- name: Docker caching
108-
uses: satackey/action-docker-layer-caching@v0.0.11
109-
continue-on-error: true
100+
run: docker compose pull php
110101
- name: Composer caching
111-
uses: actions/cache@v2
102+
uses: actions/cache@v4
112103
with:
113104
path: ./build/.composer
114-
key: ${{ runner.os }}-composer-v1-${{ hashFiles('composer.json') }}
115-
restore-keys: ${{ runner.os }}-composer-v1-
105+
key: ${{ runner.os }}-composer-v2-${{ hashFiles('composer.json') }}
106+
restore-keys: ${{ runner.os }}-composer-v2-
116107
- name: Start PHP container
117-
run: docker-compose up --detach --build --no-deps php
108+
run: docker compose up --detach --build --no-deps php
118109
- name: Install dependencies
119-
run: docker-compose exec -T php composer install --no-scripts --no-interaction --ansi
110+
run: docker compose exec -T php composer install --no-scripts --no-interaction --ansi
120111
- name: Run deptrac
121-
run: docker-compose exec -T php bin/deptrac --no-progress --no-interaction --cache-file=./build/.deptrac/.deptrac.cache --ansi
112+
run: docker compose exec -T php bin/deptrac --no-progress --no-interaction --cache-file=./build/.deptrac/.deptrac.cache --ansi

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '3.7'
21
services:
32

43
php:

rector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@
2929
$configurator->import(PHPUnitSetList::PHPUNIT_MOCK);
3030
$configurator->import(PHPUnitSetList::PHPUNIT_SPECIFIC_METHOD);
3131
$configurator->import(PHPUnitSetList::PHPUNIT_YIELD_DATA_PROVIDER);
32-
// $configurator->import(SetList::CODE_QUALITY);
32+
// $configurator->import(SetList::CODE_QUALITY);
3333
$configurator->import(SetList::EARLY_RETURN);
3434
$configurator->import(SetList::PHP_74);
3535
$configurator->import(SetList::PHP_80);
36-
// $configurator->import(SetList::PRIVATIZATION);
36+
// $configurator->import(SetList::PRIVATIZATION);
3737

3838
$parameters->set(Option::SKIP, [
3939
]);

src/Domain/Entity/EventSourcing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function registerAggregate(Event\Sourced\Aggregate $aggregate): void
4545
public function aggregateRoot(): Event\Sourced\AggregateRoot
4646
{
4747
if (null === $this->aggregateRoot) {
48-
throw new \BadMethodCallException(sprintf('Aggregate root no registered. Did you forget to run %s::registerAggregateRoot()?', static::class));
48+
throw new \BadMethodCallException(\sprintf('Aggregate root no registered. Did you forget to run %s::registerAggregateRoot()?', static::class));
4949
}
5050

5151
return $this->aggregateRoot;

src/Domain/Event/Envelope.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function set(string $name, $value): self
9292
throw new \InvalidArgumentException('Name of the attribute can not be empty.');
9393
}
9494
if (!\is_scalar($value)) {
95-
throw new \InvalidArgumentException(sprintf('Value for attribute "%s" is a scalar.', $name));
95+
throw new \InvalidArgumentException(\sprintf('Value for attribute "%s" is a scalar.', $name));
9696
}
9797

9898
$new = new self(

src/Domain/Event/Exception/EventNotSupported.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class EventNotSupported extends \InvalidArgumentException
2424
{
2525
public function __construct(private Event\Envelope $event, \Throwable $previous = null)
2626
{
27-
parent::__construct(sprintf('Event "%s" not supported.', $event->name()), 0, $previous);
27+
parent::__construct(\sprintf('Event "%s" not supported.', $event->name()), 0, $previous);
2828
}
2929

3030
public function event(): Event\Envelope

src/Domain/Event/Exception/NotSupportedType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct($value)
3030
} else {
3131
$type = \gettype($value);
3232
}
33-
parent::__construct(sprintf('Type %s is not supported for conversion!', $type));
33+
parent::__construct(\sprintf('Type %s is not supported for conversion!', $type));
3434
$this->value = $value;
3535
}
3636

src/Domain/Event/Exception/SourcingObjectWithEventFailed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class SourcingObjectWithEventFailed extends \BadMethodCallException
2424
{
2525
public function __construct(private object $subject, private Event\Envelope $event, \Throwable $previous = null)
2626
{
27-
$message = sprintf('Sourcing "%s" object with "%s" event failed.', $subject::class, $event->name());
27+
$message = \sprintf('Sourcing "%s" object with "%s" event failed.', $subject::class, $event->name());
2828

2929
parent::__construct($message, 0, $previous);
3030
}

src/Domain/Event/Listener/Filtering.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function filter(Event\Stream $stream): Event\Stream
6969

7070
// ...that is final...
7171
if (false === $parameter->isFinal()) {
72-
throw new \InvalidArgumentException(sprintf('Event class "%s" must be final in order to be used for stream filtering.', $parameter->getName()));
72+
throw new \InvalidArgumentException(\sprintf('Event class "%s" must be final in order to be used for stream filtering.', $parameter->getName()));
7373
}
7474

7575
$types[] = $parameter->getName();

src/Domain/Event/Listener/Listening.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function on(Event\Envelope $event): bool
104104
}
105105

106106
if (false === \is_bool($listenedTo)) {
107-
throw new \UnexpectedValueException(sprintf('Value returned by %s::%s($event) expected to be null or boolean, but %s was given.', $reflection->getShortName(), $method->getName(), \gettype($listenedTo)));
107+
throw new \UnexpectedValueException(\sprintf('Value returned by %s::%s($event) expected to be null or boolean, but %s was given.', $reflection->getShortName(), $method->getName(), \gettype($listenedTo)));
108108
}
109109

110110
return $listenedTo;

0 commit comments

Comments
 (0)