From ec9ba89f1f4013310b159748b67a2a6b9fa9a2e3 Mon Sep 17 00:00:00 2001 From: othillo Date: Sun, 9 Aug 2026 20:36:03 +0200 Subject: [PATCH] build: allow broadway/broadway 3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also moves to PHPUnit 11 — the non-static data provider in the shipped EventStoreTest helper made that impossible against broadway 2.5. --- composer.json | 4 ++-- phpstan-baseline.neon | 24 ++++++++++++++++++++++++ phpunit.xml.dist | 32 +++++++++++--------------------- 3 files changed, 37 insertions(+), 23 deletions(-) diff --git a/composer.json b/composer.json index 78bfbaf..89a7663 100644 --- a/composer.json +++ b/composer.json @@ -11,12 +11,12 @@ ], "require": { "php": "^8.2", - "broadway/broadway": "^2.2.1", + "broadway/broadway": "^3.0", "mongodb/mongodb": "^2.3", "ext-mongodb": "^2.3" }, "require-dev": { - "phpunit/phpunit": "^10.5", + "phpunit/phpunit": "^11.5", "ramsey/uuid": "^4.0", "broadway/coding-standard": "^1.2", "phpstan/phpstan": "^2.0" diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index d90407b..58bee76 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -6,12 +6,36 @@ parameters: count: 4 path: src/MongoDBEventStore.php + - + message: '#^Class Broadway\\EventStore\\MongoDB\\MongoDBEventStore implements generic interface Broadway\\EventStore\\EventStore but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/MongoDBEventStore.php + + - + message: '#^Method Broadway\\EventStore\\MongoDB\\MongoDBEventStore\:\:append\(\) has parameter \$eventStream with generic class Broadway\\Domain\\DomainEventStream but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/MongoDBEventStore.php + - message: '#^Method Broadway\\EventStore\\MongoDB\\MongoDBEventStore\:\:buildFindByCriteria\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/MongoDBEventStore.php + - + message: '#^Method Broadway\\EventStore\\MongoDB\\MongoDBEventStore\:\:load\(\) return type with generic class Broadway\\Domain\\DomainEventStream does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/MongoDBEventStore.php + + - + message: '#^Method Broadway\\EventStore\\MongoDB\\MongoDBEventStore\:\:loadFromPlayhead\(\) return type with generic class Broadway\\Domain\\DomainEventStream does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/MongoDBEventStore.php + - message: '#^Method Broadway\\EventStore\\MongoDB\\MongoDBEventStore\:\:normalizeDomainMessage\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue diff --git a/phpunit.xml.dist b/phpunit.xml.dist index b4de26d..a08d710 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,23 +1,13 @@ - - - - - ./test/ - - - - - ./src/ - - + + + + ./test/ + + + + + ./src/ + +