Skip to content

DCB #763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 17 commits into
base: 3.12.x
Choose a base branch
from
Draft

DCB #763

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ phpstan-baseline: vendor

.PHONY: psalm
psalm: vendor ## run psalm static code analyser
vendor/bin/psalm
php -d memory_limit=312M vendor/bin/psalm

.PHONY: psalm-baseline
psalm-baseline: vendor ## run psalm static code analyser
Expand All @@ -41,11 +41,11 @@ phpunit-integration: vendor

.PHONY: phpunit-integration-postgres
phpunit-integration-postgres: vendor ## run phpunit integration tests on postgres
DB_URL="pdo-pgsql://postgres:postgres@localhost:5432/eventstore?charset=utf8" vendor/bin/phpunit --testsuite=integration
DB_URL="pdo-pgsql://postgres:postgres@127.0.0.1:5432/eventstore?charset=utf8" vendor/bin/phpunit --testsuite=integration

.PHONY: phpunit-integration-mysql
phpunit-integration-mysql: vendor ## run phpunit integration tests on mysql
DB_URL="pdo-mysql://root@localhost:3306/eventstore?charset=utf8" vendor/bin/phpunit --testsuite=integration
DB_URL="pdo-mysql://root@127.0.0.1:3306/eventstore?charset=utf8" vendor/bin/phpunit --testsuite=integration

.PHONY: phpunit-unit
phpunit-unit: vendor ## run phpunit unit tests
Expand Down Expand Up @@ -74,7 +74,7 @@ test: phpunit

.PHONY: benchmark
benchmark: vendor ## run benchmarks
DB_URL=sqlite3:///:memory: php -d memory_limit=512M vendor/bin/phpbench run tests/Benchmark --report=default
DB_URL=sqlite3:///:memory: php -d memory_limit=512M vendor/bin/phpbench run tests/Benchmark --report=default --filter=benchAppend100Events

.PHONY: benchmark-base
benchmark-base: vendor ## run benchmarks
Expand Down
68 changes: 67 additions & 1 deletion baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="6.12.0@cf420941d061a57050b6c468ef2c778faf40aee2">
<files psalm-version="6.13.1@1e3b7f0a8ab32b23197b91107adc0a7ed8a05b51">
<file src="src/Aggregate/AggregateRootBehaviour.php">
<UnsafeInstantiation>
<code><![CDATA[new static()]]></code>
Expand Down Expand Up @@ -29,6 +29,31 @@
<code><![CDATA[base64_decode($result['crypto_iv'])]]></code>
<code><![CDATA[base64_decode($result['crypto_key'])]]></code>
</ArgumentTypeCoercion>
<DeprecatedMethod>
<code><![CDATA[setPrimaryKey]]></code>
</DeprecatedMethod>
</file>
<file src="src/DCB/AttributeEventTagExtractor.php">
<RiskyTruthyFalsyComparison>
<code><![CDATA[$attribute->hash]]></code>
<code><![CDATA[$attribute->prefix]]></code>
</RiskyTruthyFalsyComparison>
</file>
<file src="src/DCB/CompositeProjection.php">
<MissingClosureReturnType>
<code><![CDATA[static function (Projection $projection) {]]></code>
</MissingClosureReturnType>
<MixedAssignment>
<code><![CDATA[$state[$name]]]></code>
</MixedAssignment>
</file>
<file src="src/DCB/DecisionModel.php">
<ImplementedReturnTypeMismatch>
<code><![CDATA[T[TKey]]]></code>
</ImplementedReturnTypeMismatch>
<InvalidCast>
<code><![CDATA[$offset]]></code>
</InvalidCast>
</file>
<file src="src/EventBus/AttributeListenerProvider.php">
<MixedMethodCall>
Expand Down Expand Up @@ -92,6 +117,12 @@
<code><![CDATA[archive]]></code>
</UndefinedInterfaceMethod>
</file>
<file src="src/Schema/DoctrineSchemaDirector.php">
<InternalMethod>
<code><![CDATA[getName]]></code>
<code><![CDATA[getName]]></code>
</InternalMethod>
</file>
<file src="src/Serializer/Normalizer/IdNormalizer.php">
<DeprecatedClass>
<code><![CDATA[ReflectionTypeUtil::classStringInstanceOf(
Expand All @@ -103,6 +134,11 @@
<code><![CDATA[IdNormalizer]]></code>
</DeprecatedInterface>
</file>
<file src="src/Serializer/Normalizer/StringableNormalizer.php">
<PropertyTypeCoercion>
<code><![CDATA[$type->getClassName()]]></code>
</PropertyTypeCoercion>
</file>
<file src="src/Serializer/Upcast/Upcast.php">
<MixedAssignment>
<code><![CDATA[$payload[$key]]]></code>
Expand Down Expand Up @@ -131,6 +167,11 @@
<code><![CDATA[$streamName]]></code>
</PropertyTypeCoercion>
</file>
<file src="src/Store/DoctrineDbalStore.php">
<DeprecatedMethod>
<code><![CDATA[setPrimaryKey]]></code>
</DeprecatedMethod>
</file>
<file src="src/Store/DoctrineDbalStoreStream.php">
<ArgumentTypeCoercion>
<code><![CDATA[(int)$data['playhead']]]></code>
Expand All @@ -144,11 +185,33 @@
<code><![CDATA[$this->messages]]></code>
</MixedPropertyTypeCoercion>
</file>
<file src="src/Store/StreamDoctrineDbalStore.php">
<DeprecatedMethod>
<code><![CDATA[setPrimaryKey]]></code>
</DeprecatedMethod>
</file>
<file src="src/Store/StreamDoctrineDbalStoreStream.php">
<ArgumentTypeCoercion>
<code><![CDATA[(int)$data['playhead']]]></code>
</ArgumentTypeCoercion>
</file>
<file src="src/Store/TaggableDoctrineDbalStore.php">
<MixedAssignment>
<code><![CDATA[$counter]]></code>
</MixedAssignment>
<MixedOperand>
<code><![CDATA[$counter]]></code>
<code><![CDATA[$counter]]></code>
</MixedOperand>
</file>
<file src="src/Store/TaggableDoctrineDbalStoreStream.php">
<ArgumentTypeCoercion>
<code><![CDATA[(int)$data['playhead']]]></code>
</ArgumentTypeCoercion>
<MixedArgument>
<code><![CDATA[json_decode($data['tags'], true, 512, JSON_THROW_ON_ERROR)]]></code>
</MixedArgument>
</file>
<file src="src/Subscription/Engine/DefaultSubscriptionEngine.php">
<DeprecatedInterface>
<code><![CDATA[SubscriberAccessor|null]]></code>
Expand Down Expand Up @@ -179,6 +242,9 @@
</InvalidOperand>
</file>
<file src="src/Subscription/Store/DoctrineSubscriptionStore.php">
<DeprecatedMethod>
<code><![CDATA[setPrimaryKey]]></code>
</DeprecatedMethod>
<MixedArgument>
<code><![CDATA[$context]]></code>
</MixedArgument>
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"infection/infection": "^0.29.12",
"league/commonmark": "^2.6.1",
"patchlevel/coding-standard": "^1.3.0",
"patchlevel/event-sourcing-phpstan-extension": "^1.0",
"patchlevel/event-sourcing-psalm-plugin": "^3.1.0",
"phpat/phpat": "^0.11.3",
"phpbench/phpbench": "^1.4.1",
Expand Down
Loading
Loading