diff --git a/baseline.xml b/baseline.xml index d629609f8..5064237b4 100644 --- a/baseline.xml +++ b/baseline.xml @@ -1,5 +1,5 @@ - + $data[$propertyMetadata['fieldName']] @@ -9,6 +9,11 @@ $value + + + array{id: string, aggregate_id: string, playhead: string, event: class-string, payload: string, recorded_on: string}|null + + $payload diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index b181454e3..a01a379c6 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,14 +1,9 @@ parameters: ignoreErrors: - - message: "#^Method Patchlevel\\\\EventSourcing\\\\Console\\\\DoctrineHelper\\:\\:databaseName\\(\\) should return string but returns mixed\\.$#" - count: 2 - path: src/Console/DoctrineHelper.php - - - - message: "#^Unable to resolve the template type T in call to method Patchlevel\\\\EventSourcing\\\\Serializer\\\\Serializer\\:\\:deserialize\\(\\)$#" + message: "#^Cannot unset offset 'url' on array\\{charset\\?\\: string, dbname\\?\\: string, defaultTableOptions\\?\\: array\\, default_dbname\\?\\: string, driver\\?\\: 'ibm_db2'\\|'mysqli'\\|'oci8'\\|'pdo_mysql'\\|'pdo_oci'\\|'pdo_pgsql'\\|'pdo_sqlite'\\|'pdo_sqlsrv'\\|'sqlsrv', driverClass\\?\\: class\\-string\\, driverOptions\\?\\: array, host\\?\\: string, \\.\\.\\.\\}\\.$#" count: 1 - path: src/Store/MultiTableStore.php + path: src/Console/DoctrineHelper.php - message: "#^While loop condition is always true\\.$#" diff --git a/src/Console/DoctrineHelper.php b/src/Console/DoctrineHelper.php index d21ebc914..7774966ae 100644 --- a/src/Console/DoctrineHelper.php +++ b/src/Console/DoctrineHelper.php @@ -50,10 +50,7 @@ public function copyConnectionWithoutDatabase(Connection $connection): Connectio */ unset($params['dbname'], $params['path'], $params['url']); - $tmpConnection = DriverManager::getConnection($params); - $tmpConnection->connect(); - - return $tmpConnection; + return DriverManager::getConnection($params); } public function hasDatabase(Connection $connection, string $databaseName): bool diff --git a/src/Store/MultiTableStore.php b/src/Store/MultiTableStore.php index 6040b5f29..d08b9cd62 100644 --- a/src/Store/MultiTableStore.php +++ b/src/Store/MultiTableStore.php @@ -173,6 +173,7 @@ public function stream(int $fromIndex = 0): Generator throw new AggregateNotDefined($name); } + /** @var array{id: string, aggregate_id: string, playhead: string, event: class-string, payload: string, recorded_on: string}|null $eventData */ $eventData = $queries[$name]->current(); if ($eventData === null) {