Skip to content
Draft
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
84 changes: 60 additions & 24 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
parameters:
ignoreErrors:
-
message: '#^Patchlevel\\EventSourcing\\Aggregate\\AggregateRootId should not depend on Patchlevel\\EventSourcing\\Serializer\\Normalizer\\IdNormalizer$#'
identifier: phpat.testAggregateCanOnlyDependOnAllowedLayers
count: 1
path: src/Aggregate/AggregateRootId.php

-
message: '#^Patchlevel\\EventSourcing\\Attribute\\Processor should not depend on Patchlevel\\EventSourcing\\Subscription\\RunMode$#'
identifier: phpat.testAttributeCanOnlyDependOnAllowedLayers
count: 2
path: src/Attribute/Processor.php

-
message: '#^Patchlevel\\EventSourcing\\Attribute\\Projector should not depend on Patchlevel\\EventSourcing\\Subscription\\RunMode$#'
identifier: phpat.testAttributeCanOnlyDependOnAllowedLayers
count: 2
path: src/Attribute/Projector.php

-
message: '#^Patchlevel\\EventSourcing\\Attribute\\SharedApplyContext should not depend on Patchlevel\\EventSourcing\\Aggregate\\AggregateRoot$#'
identifier: phpat.testAttributeCanOnlyDependOnAllowedLayers
count: 1
path: src/Attribute/SharedApplyContext.php

-
message: '#^Patchlevel\\EventSourcing\\Attribute\\Subscriber should not depend on Patchlevel\\EventSourcing\\Subscription\\RunMode$#'
identifier: phpat.testAttributeCanOnlyDependOnAllowedLayers
count: 1
path: src/Attribute/Subscriber.php

-
message: '#^Cannot unset offset ''url'' on array\{application_name\?\: string, charset\?\: string, defaultTableOptions\?\: array\<string, mixed\>, driver\?\: ''ibm_db2''\|''mysqli''\|''oci8''\|''pdo_mysql''\|''pdo_oci''\|''pdo_pgsql''\|''pdo_sqlite''\|''pdo_sqlsrv''\|''pgsql''\|''sqlite3''\|''sqlsrv'', driverClass\?\: class\-string\<Doctrine\\DBAL\\Driver\>, driverOptions\?\: array\<mixed\>, host\?\: string, keepReplica\?\: bool, \.\.\.\}\.$#'
identifier: unset.offset
Expand Down Expand Up @@ -84,6 +114,12 @@ parameters:
count: 1
path: src/Store/Criteria/StreamCriterion.php

-
message: '#^Patchlevel\\EventSourcing\\Store\\DoctrineDbalStore should not depend on Patchlevel\\EventSourcing\\Aggregate\\AggregateHeader$#'
identifier: phpat.testStoreCanOnlyDependOnAllowedLayers
count: 2
path: src/Store/DoctrineDbalStore.php

-
message: '#^Method Patchlevel\\EventSourcing\\Store\\DoctrineDbalStoreStream\:\:current\(\) never returns null so it can be removed from the return type\.$#'
identifier: return.unusedType
Expand All @@ -102,12 +138,36 @@ parameters:
count: 1
path: src/Store/DoctrineDbalStoreStream.php

-
message: '#^Patchlevel\\EventSourcing\\Store\\DoctrineDbalStoreStream should not depend on Patchlevel\\EventSourcing\\Aggregate\\AggregateHeader$#'
identifier: phpat.testStoreCanOnlyDependOnAllowedLayers
count: 1
path: src/Store/DoctrineDbalStoreStream.php

-
message: '#^Ternary operator condition is always true\.$#'
identifier: ternary.alwaysTrue
count: 1
path: src/Store/DoctrineDbalStoreStream.php

-
message: '#^Patchlevel\\EventSourcing\\Store\\InMemoryStore should not depend on Patchlevel\\EventSourcing\\Aggregate\\AggregateHeader$#'
identifier: phpat.testStoreCanOnlyDependOnAllowedLayers
count: 5
path: src/Store/InMemoryStore.php

-
message: '#^Patchlevel\\EventSourcing\\Store\\InMemoryStore should not depend on Patchlevel\\EventSourcing\\Metadata\\Event\\EventRegistry$#'
identifier: phpat.testStoreCanOnlyDependOnAllowedLayers
count: 1
path: src/Store/InMemoryStore.php

-
message: '#^Patchlevel\\EventSourcing\\Store\\MissingEventRegistry should not depend on Patchlevel\\EventSourcing\\Metadata\\Event\\EventRegistry$#'
identifier: phpat.testStoreCanOnlyDependOnAllowedLayers
count: 1
path: src/Store/MissingEventRegistry.php

-
message: '#^Method Patchlevel\\EventSourcing\\Store\\StreamDoctrineDbalStoreStream\:\:current\(\) never returns null so it can be removed from the return type\.$#'
identifier: return.unusedType
Expand Down Expand Up @@ -336,18 +396,6 @@ parameters:
count: 1
path: tests/Unit/Aggregate/AggregateRootTest.php

-
message: '#^Cannot access offset 0 on iterable\<int, Patchlevel\\EventSourcing\\CommandBus\\HandlerDescriptor\>\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 2
path: tests/Unit/CommandBus/AggregateHandlerProviderTest.php

-
message: '#^Cannot call method callable\(\) on mixed\.$#'
identifier: method.nonObject
count: 2
path: tests/Unit/CommandBus/AggregateHandlerProviderTest.php

-
message: '#^Parameter \#2 \$aggregateClass of class Patchlevel\\EventSourcing\\CommandBus\\Handler\\CreateAggregateHandler constructor expects class\-string\<Patchlevel\\EventSourcing\\Aggregate\\AggregateRoot\>, string given\.$#'
identifier: argument.type
Expand All @@ -366,18 +414,6 @@ parameters:
count: 5
path: tests/Unit/CommandBus/InstantRetryCommandBusTest.php

-
message: '#^Cannot access offset 0 on iterable\<int, Patchlevel\\EventSourcing\\CommandBus\\HandlerDescriptor\>\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 2
path: tests/Unit/CommandBus/ServiceHandlerProviderTest.php

-
message: '#^Cannot call method callable\(\) on mixed\.$#'
identifier: method.nonObject
count: 2
path: tests/Unit/CommandBus/ServiceHandlerProviderTest.php

-
message: '#^Parameter \#1 \$data of static method Patchlevel\\EventSourcing\\Tests\\Unit\\Fixture\\Message\:\:fromArray\(\) expects array\{id\: string, text\: string, createdAt\: string\}, array\<mixed, mixed\> given\.$#'
identifier: argument.type
Expand Down
5 changes: 5 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ services:
class: Patchlevel\EventSourcing\Tests\Architecture\FinalClassesTest
tags:
- phpat.test

-
class: Patchlevel\EventSourcing\Tests\Architecture\LayerDependenciesTest
tags:
- phpat.test
Loading
Loading