Skip to content

Commit c8ebf1c

Browse files
committed
update framework version
1 parent 1767fe2 commit c8ebf1c

File tree

7 files changed

+76
-51
lines changed

7 files changed

+76
-51
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Install PHP
1414
uses: shivammathur/setup-php@v2
1515
with:
16-
php-version: 8.0
16+
php-version: 8.1
1717
coverage: none
1818
tools: composer:v2
1919

@@ -33,15 +33,15 @@ jobs:
3333
- name: Install PHP
3434
uses: shivammathur/setup-php@v2
3535
with:
36-
php-version: 8.0
36+
php-version: 8.1
3737
coverage: none
3838
tools: composer:v2
3939

4040
- name: Install dependencies with composer
4141
run: composer update --no-ansi --no-interaction --no-progress
4242

4343
- name: Run vimeo/psalm
44-
run: ./vendor/bin/psalm --config=psalm.xml --shepherd
44+
run: rm -rf ~/.cache/psalm/ && ./vendor/bin/psalm --config=psalm.xml --shepherd
4545

4646
phpstan:
4747
name: PHPStan
@@ -53,15 +53,15 @@ jobs:
5353
- name: Install PHP
5454
uses: shivammathur/setup-php@v2
5555
with:
56-
php-version: 8.0
56+
php-version: 8.1
5757
coverage: none
5858
tools: composer:v2
5959

6060
- name: Install dependencies with composer
6161
run: composer update --no-ansi --no-interaction --no-progress
6262

6363
- name: Run phpstan/phpstan
64-
run: ./vendor/bin/phpstan analyse src --level 7
64+
run: ./vendor/bin/phpstan analyse src --level 9
6565

6666
phpunit:
6767
name: PHPUnit
@@ -76,6 +76,11 @@ jobs:
7676
RABBITMQ_DEFAULT_USER: guest
7777
RABBITMQ_DEFAULT_PASS: guest
7878
options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5
79+
nsqd:
80+
image: nsqio/nsq:v1.2.0
81+
options: --entrypoint /nsqd
82+
ports:
83+
- 4150:4150
7984
postgres:
8085
image: postgres:13
8186
env:
@@ -100,7 +105,7 @@ jobs:
100105
- name: Install PHP with extensions
101106
uses: shivammathur/setup-php@v2
102107
with:
103-
php-version: 8.0
108+
php-version: 8.1
104109
extensions: ${{ env.PHP_EXTENSIONS }}
105110
ini-values: ${{ env.PHP_INI_VALUES }}
106111
tools: composer:v2
@@ -120,6 +125,9 @@ jobs:
120125
run: XDEBUG_MODE=coverage php ./vendor/bin/phpunit --configuration ./phpunit.xml --debug --coverage-clover=coverage.xml
121126

122127
- name: Send code coverage report to Codecov.io
123-
uses: codecov/codecov-action@v1
128+
uses: codecov/codecov-action@v2
124129
with:
125-
token: ${{ secrets.CODECOV_TOKEN }}
130+
token: ${{ secrets.CODECOV_TOKEN }}
131+
verbose: true
132+
fail_ci_if_error: true
133+
files: ./coverage.xml

README.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,6 @@ After launching containers, execute
1515
```bash
1616
make ping && make consumer-logs
1717
```
18-
## Documentation
19-
Documentation can be found in the [documentation](https://github.com/php-service-bus/documentation) repository
20-
21-
* [Installation](https://github.com/php-service-bus/documentation/blob/master/pages/installation.md)
22-
* [Basic information](https://github.com/php-service-bus/documentation/blob/master/pages/basic_information.md)
23-
* [Available modules](https://github.com/php-service-bus/documentation/blob/master/pages/available_modules.md)
24-
* [Components](https://github.com/php-service-bus/documentation/blob/master/pages/available_modules.md#components)
25-
* [Sagas](https://github.com/php-service-bus/documentation/blob/master/pages/modules/sagas.md)
26-
* [Event Sourcing](https://github.com/php-service-bus/documentation/blob/master/pages/modules/event_sourcing.md)
27-
* [Scheduler](https://github.com/php-service-bus/documentation/blob/master/pages/modules/scheduler.md)
28-
* [Transport](https://github.com/php-service-bus/documentation/blob/master/pages/available_modules.md#transport)
29-
* [Database](https://github.com/php-service-bus/documentation/blob/master/pages/available_modules.md#database)
30-
* [Available packages](https://github.com/php-service-bus/documentation/blob/master/pages/available_packages.md)
31-
* [Http-client](https://github.com/php-service-bus/documentation/blob/master/pages/packages/http_client.md)
32-
* [Cache](https://github.com/php-service-bus/documentation/blob/master/pages/packages/cache.md)
33-
3418
## Contributing
3519
Contributions are welcome! Please read [CONTRIBUTING](CONTRIBUTING.md) for details.
3620

composer.json

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,26 @@
55
"license": "MIT",
66
"minimum-stability": "stable",
77
"require": {
8-
"php": ">=8.0",
8+
"php": ">=8.1",
99
"ext-json": "*",
10-
"php-service-bus/service-bus": "v5.0.*",
11-
"php-service-bus/sagas": "v5.0.*",
12-
"php-service-bus/event-sourcing": "v5.0.*",
13-
"php-service-bus/scheduler": "v5.0.*"
10+
"php-service-bus/service-bus": "v5.1.*",
11+
"php-service-bus/sagas": "v5.1.*",
12+
"php-service-bus/event-sourcing": "v5.1.*",
13+
"php-service-bus/scheduler": "v5.1.*"
1414
},
1515
"require-dev": {
16-
"php-service-bus/code-style-config": "v1.3.*",
16+
"php-service-bus/code-style-config": "v5.1.*",
1717
"phpunit/phpunit": "v9.5.*",
18-
"vimeo/psalm": "v4.5.*",
19-
"phpstan/phpstan": "v0.12.*"
18+
"vimeo/psalm": "v4.22.*",
19+
"phpstan/phpstan": "v1.5.*",
20+
"boesing/psalm-plugin-stringf": "v1.1.*"
2021
},
2122
"config": {
2223
"sort-packages": true,
23-
"optimize-autoloader": true
24+
"optimize-autoloader": true,
25+
"allow-plugins": {
26+
"composer/package-versions-deprecated": true
27+
}
2428
},
2529
"autoload": {
2630
"psr-4": {
@@ -41,15 +45,18 @@
4145
]
4246
},
4347
"scripts": {
44-
"psalm": "./vendor/bin/psalm --config=psalm.xml",
45-
"phpstan": "./vendor/bin/phpstan analyse src --level 7",
46-
"tests": "./vendor/bin/phpunit --configuration phpunit.xml --debug --verbose --debug",
47-
"coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --configuration phpunit.xml --coverage-html ./coverage --debug --verbose --debug",
48-
"cs-check": "./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run",
49-
"cs-fix": "./vendor/bin/php-cs-fixer fix --allow-risky=yes",
50-
"pre-commit": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes && ./vendor/bin/psalm --config=psalm.xml && ./vendor/bin/phpstan analyse src --level 7 && ./vendor/bin/phpunit --configuration phpunit.xml --debug --verbose"
48+
"psalm": "rm -rf ~/.cache/psalm/ && ./vendor/bin/psalm --config=psalm.xml",
49+
"phpstan": "./vendor/bin/phpstan analyse src --level 9",
50+
"tests": "./vendor/bin/phpunit --configuration phpunit.xml --verbose --debug",
51+
"coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --configuration phpunit.xml --coverage-html ./coverage --verbose --debug",
52+
"cs-check": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run",
53+
"cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes",
54+
"pre-commit": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes && ./vendor/bin/psalm --config=psalm.xml && ./vendor/bin/phpstan analyse src --level 9 && ./vendor/bin/phpunit --configuration phpunit.xml --verbose"
5155
},
5256
"config": {
53-
"optimize-autoloader": true
57+
"optimize-autoloader": true,
58+
"allow-plugins": {
59+
"composer/package-versions-deprecated": true
60+
}
5461
}
5562
}

docker/application/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.0-cli-alpine
1+
FROM php:8.1-cli-alpine
22

33
RUN set -xe \
44
&& apk update \

docker/postgresql/schema.sql

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,21 @@ CREATE TABLE IF NOT EXISTS sagas_store
1919
CONSTRAINT saga_identifier PRIMARY KEY (id, identifier_class)
2020
);
2121

22+
CREATE TABLE IF NOT EXISTS sagas_association
23+
(
24+
id UUID,
25+
saga_id uuid not null,
26+
identifier_class varchar(255) not null,
27+
saga_class varchar(255) not null,
28+
property_name varchar(255) not null,
29+
property_value varchar(255) not null,
30+
CONSTRAINT sagas_association_pk PRIMARY KEY (id)
31+
);
32+
2233
CREATE INDEX IF NOT EXISTS sagas_state ON sagas_store (state_id);
2334
CREATE INDEX IF NOT EXISTS saga_closed_index ON sagas_store (state_id, closed_at);
35+
CREATE UNIQUE INDEX IF NOT EXISTS sagas_association_property ON sagas_association (saga_id, saga_class, property_name);
36+
CREATE INDEX IF NOT EXISTS sagas_association_property_value ON sagas_association (identifier_class, saga_class, property_name, property_value);
2437

2538
CREATE TABLE IF NOT EXISTS event_store_stream
2639
(

phpunit.xml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false"
3-
backupStaticAttributes="false" beStrictAboutTestsThatDoNotTestAnything="false" colors="true" verbose="true"
4-
convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true"
5-
failOnRisky="true" failOnWarning="true" stopOnFailure="false"
6-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
4+
colors="true"
5+
cacheResult="false"
6+
convertDeprecationsToExceptions="true"
7+
convertErrorsToExceptions="true"
8+
convertNoticesToExceptions="true"
9+
convertWarningsToExceptions="true"
10+
processIsolation="true"
11+
stopOnError="false"
12+
stopOnFailure="false"
13+
beStrictAboutChangesToGlobalState="true"
14+
beStrictAboutOutputDuringTests="true"
15+
verbose="true"
16+
>
717
<coverage>
818
<include>
919
<directory>./src</directory>
@@ -16,7 +26,8 @@
1626
<ini name="error_reporting" value="-1"/>
1727
</php>
1828
<testsuites>
19-
<testsuite name="PHP Service Bus skeleton">
29+
30+
<testsuite name="Application">
2031
<directory>./tests/</directory>
2132
</testsuite>
2233
</testsuites>

psalm.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<?xml version="1.0"?>
22
<psalm
3-
totallyTyped="true"
43
useDocblockTypes="true"
54
useDocblockPropertyTypes="true"
6-
allowPhpStormGenerics="true"
75
strictBinaryOperands="true"
86
findUnusedPsalmSuppress="true"
97
ignoreInternalFunctionFalseReturn="false"
@@ -21,5 +19,9 @@
2119

2220
<issueHandlers>
2321
<PropertyNotSetInConstructor errorLevel="suppress"/>
22+
<UnnecessaryVarAnnotation errorLevel="suppress"/>
2423
</issueHandlers>
25-
</psalm>
24+
<plugins>
25+
<pluginClass class="Boesing\PsalmPluginStringf\Plugin"/>
26+
</plugins>
27+
</psalm>

0 commit comments

Comments
 (0)