From ad1799e6a9c54e079817070de26124069daa2b6f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 5 Dec 2025 03:56:45 +0000 Subject: [PATCH 1/9] Lock file maintenance Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- composer.lock | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 997355d1..895c388e 100644 --- a/composer.lock +++ b/composer.lock @@ -6023,12 +6023,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "6e9ea9dcd100b6dcc0b1cdfc139df3695ad73e38" + "reference": "114fdb88709703f1e43a022f08844798d11439f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/6e9ea9dcd100b6dcc0b1cdfc139df3695ad73e38", - "reference": "6e9ea9dcd100b6dcc0b1cdfc139df3695ad73e38", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/114fdb88709703f1e43a022f08844798d11439f4", + "reference": "114fdb88709703f1e43a022f08844798d11439f4", "shasum": "" }, "conflict": { @@ -6040,6 +6040,7 @@ "aimeos/ai-admin-graphql": ">=2022.04.1,<2022.10.10|>=2023.04.1,<2023.10.6|>=2024.04.1,<2024.07.2", "aimeos/ai-admin-jsonadm": "<2020.10.13|>=2021.04.1,<2021.10.6|>=2022.04.1,<2022.10.3|>=2023.04.1,<2023.10.4|==2024.04.1", "aimeos/ai-client-html": ">=2020.04.1,<2020.10.27|>=2021.04.1,<2021.10.22|>=2022.04.1,<2022.10.13|>=2023.04.1,<2023.10.15|>=2024.04.1,<2024.04.7", + "aimeos/ai-cms-grapesjs": ">=2021.04.1,<2021.10.8|>=2022.04.1,<2022.10.9|>=2023.04.1,<2023.10.15|>=2024.04.1,<2024.10.8|>=2025.04.1,<2025.10.2", "aimeos/ai-controller-frontend": "<2020.10.15|>=2021.04.1,<2021.10.8|>=2022.04.1,<2022.10.8|>=2023.04.1,<2023.10.9|==2024.04.1", "aimeos/aimeos-core": ">=2022.04.1,<2022.10.17|>=2023.04.1,<2023.10.17|>=2024.04.1,<2024.04.7", "aimeos/aimeos-typo3": "<19.10.12|>=20,<20.10.5", @@ -6047,6 +6048,7 @@ "akaunting/akaunting": "<2.1.13", "akeneo/pim-community-dev": "<5.0.119|>=6,<6.0.53", "alextselegidis/easyappointments": "<1.5.2.0-beta1", + "alexusmai/laravel-file-manager": "<=3.3.1", "alt-design/alt-redirect": "<1.6.4", "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", "amazing/media2click": ">=1,<1.3.3", @@ -6472,8 +6474,9 @@ "marshmallow/nova-tiptap": "<5.7", "matomo/matomo": "<1.11", "matyhtf/framework": "<3.0.6", - "mautic/core": "<5.2.8|>=6.0.0.0-alpha,<6.0.5", + "mautic/core": "<5.2.9|>=6,<6.0.7", "mautic/core-lib": ">=1.0.0.0-beta,<4.4.13|>=5.0.0.0-alpha,<5.1.1", + "mautic/grapes-js-builder-bundle": ">=4,<4.4.18|>=5,<5.2.9|>=6,<6.0.7", "maximebf/debugbar": "<1.19", "mdanter/ecc": "<2", "mediawiki/abuse-filter": "<1.39.9|>=1.40,<1.41.3|>=1.42,<1.42.2", @@ -7010,7 +7013,7 @@ "type": "tidelift" } ], - "time": "2025-12-02T01:33:57+00:00" + "time": "2025-12-05T02:37:28+00:00" }, { "name": "sanmai/di-container", From 11fe1cf6f72f28a9e0e9a93705014021fc4ebfc1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 6 Dec 2025 02:28:43 +0000 Subject: [PATCH 2/9] Lock file maintenance Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 895c388e..fc96d7b6 100644 --- a/composer.lock +++ b/composer.lock @@ -6023,12 +6023,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "114fdb88709703f1e43a022f08844798d11439f4" + "reference": "10c1e6abcb8094a428b92e7d8c3126371f9f9126" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/114fdb88709703f1e43a022f08844798d11439f4", - "reference": "114fdb88709703f1e43a022f08844798d11439f4", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/10c1e6abcb8094a428b92e7d8c3126371f9f9126", + "reference": "10c1e6abcb8094a428b92e7d8c3126371f9f9126", "shasum": "" }, "conflict": { @@ -6444,7 +6444,7 @@ "leantime/leantime": "<3.3", "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", "libreform/libreform": ">=2,<=2.0.8", - "librenms/librenms": "<2017.08.18", + "librenms/librenms": "<25.11", "liftkit/database": "<2.13.2", "lightsaml/lightsaml": "<1.3.5", "limesurvey/limesurvey": "<6.5.12", @@ -7013,7 +7013,7 @@ "type": "tidelift" } ], - "time": "2025-12-05T02:37:28+00:00" + "time": "2025-12-05T21:05:14+00:00" }, { "name": "sanmai/di-container", From b5e372d30117968b0999eae023a187823de15135 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 7 Dec 2025 21:41:41 +0000 Subject: [PATCH 3/9] Update dependency pymdown-extensions to v10.18 | datasource | package | from | to | | ---------- | ------------------ | ------- | ----- | | pypi | pymdown-extensions | 10.17.2 | 10.18 | Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index dd99c639..83a01a64 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -5,7 +5,7 @@ mkdocs-material==9.7.0 # Markdown extensions Pygments==2.19.2 -pymdown-extensions==10.17.2 +pymdown-extensions==10.18 # MkDocs plugins mkdocs-material-extensions==1.3.1 \ No newline at end of file From d375aca18f6cf3d3adea14717bf100d21cde7504 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 9 Dec 2025 02:59:15 +0000 Subject: [PATCH 4/9] Lock file maintenance Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- composer.lock | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index fc96d7b6..b5db6d28 100644 --- a/composer.lock +++ b/composer.lock @@ -6023,12 +6023,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "10c1e6abcb8094a428b92e7d8c3126371f9f9126" + "reference": "eeebba0043eaddd36fd8747cc144b9b661d9b392" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/10c1e6abcb8094a428b92e7d8c3126371f9f9126", - "reference": "10c1e6abcb8094a428b92e7d8c3126371f9f9126", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/eeebba0043eaddd36fd8747cc144b9b661d9b392", + "reference": "eeebba0043eaddd36fd8747cc144b9b661d9b392", "shasum": "" }, "conflict": { @@ -6668,7 +6668,7 @@ "reportico-web/reportico": "<=8.1", "rhukster/dom-sanitizer": "<1.0.7", "rmccue/requests": ">=1.6,<1.8", - "robrichards/xmlseclibs": ">=1,<3.0.4", + "robrichards/xmlseclibs": "<=3.1.3", "roots/soil": "<4.1", "roundcube/roundcubemail": "<1.5.10|>=1.6,<1.6.11", "rudloff/alltube": "<3.0.3", @@ -6939,6 +6939,7 @@ "yoast-seo-for-typo3/yoast_seo": "<7.2.3", "yourls/yourls": "<=1.8.2", "yuan1994/tpadmin": "<=1.3.12", + "yungifez/skuul": "<=2.6.5", "z-push/z-push-dev": "<2.7.6", "zencart/zencart": "<=1.5.7.0-beta", "zendesk/zendesk_api_client_php": "<2.2.11", @@ -7013,7 +7014,7 @@ "type": "tidelift" } ], - "time": "2025-12-05T21:05:14+00:00" + "time": "2025-12-08T23:05:37+00:00" }, { "name": "sanmai/di-container", From 6ac217314cc2101ab3175629b3cca7ff4c6151f8 Mon Sep 17 00:00:00 2001 From: Daniel Badura Date: Tue, 9 Dec 2025 08:45:19 +0100 Subject: [PATCH 5/9] Add table options for subscription store, also add tests folder for phpstan to analyse --- docs/pages/configuration.md | 2 + docs/pages/installation.md | 10 ++++ docs/pages/usage.md | 2 +- phpstan-baseline.neon | 48 +++++++++++++++++++ phpstan.neon.dist | 1 + src/DependencyInjection/Configuration.php | 12 ++++- .../PatchlevelEventSourcingExtension.php | 2 + tests/Fixtures/Profile.php | 1 + .../EventSourcingCollectorTest.php | 1 - .../PatchlevelEventSourcingBundleTest.php | 4 ++ 10 files changed, 80 insertions(+), 3 deletions(-) diff --git a/docs/pages/configuration.md b/docs/pages/configuration.md index 36305406..8c0bd1ae 100644 --- a/docs/pages/configuration.md +++ b/docs/pages/configuration.md @@ -340,6 +340,8 @@ patchlevel_event_sourcing: store: type: 'custom' # default is 'dbal' service: 'my_subscription_store' + options: + table_name: 'my_subscription_store' ``` !!! tip diff --git a/docs/pages/installation.md b/docs/pages/installation.md index cc0ce51a..f44249a4 100644 --- a/docs/pages/installation.md +++ b/docs/pages/installation.md @@ -37,6 +37,14 @@ patchlevel_event_sourcing: connection: url: '%env(EVENTSTORE_URL)%' provide_dedicated_connection: true + store: + type: dbal_stream + merge_orm_schema: true + command_bus: + service: messenger.bus.default + query_bus: + service: messenger.bus.default + cryptography: ~ when@dev: patchlevel_event_sourcing: @@ -50,6 +58,8 @@ when@dev: when@test: patchlevel_event_sourcing: subscription: + store: + type: 'static_in_memory' catch_up: true throw_on_error: true run_after_aggregate_save: true diff --git a/docs/pages/usage.md b/docs/pages/usage.md index d2e3ee1f..fa034b13 100644 --- a/docs/pages/usage.md +++ b/docs/pages/usage.md @@ -1,7 +1,7 @@ # Usage Here you will find some examples of how to use the bundle. -But we provide only examples for specific symfo +But we provide only examples for specific symfony features. !!! info diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 683babf7..66c93b9f 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -5,3 +5,51 @@ parameters: identifier: argument.type count: 1 path: src/DependencyInjection/QueryHandlerCompilerPass.php + + - + message: '#^Property Patchlevel\\EventSourcingBundle\\Tests\\Fixtures\\Profile\:\:\$id is never read, only written\.$#' + identifier: property.onlyWritten + count: 1 + path: tests/Fixtures/Profile.php + + - + message: '#^Property Patchlevel\\EventSourcingBundle\\Tests\\Fixtures\\SnapshotableProfile\:\:\$id is unused\.$#' + identifier: property.unused + count: 1 + path: tests/Fixtures/SnapshotableProfile.php + + - + message: '#^Call to an undefined method Symfony\\Component\\DependencyInjection\\ContainerBuilder\:\:getAutoconfiguredAttributes\(\)\.$#' + identifier: method.notFound + count: 1 + path: tests/Unit/PatchlevelEventSourcingBundleTest.php + + - + message: '#^Cannot access offset ''Patchlevel\\\\EventSourcing\\\\Attribute\\\\Aggregate''\|''Patchlevel\\\\EventSourcing\\\\Attribute\\\\Event'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: tests/Unit/PatchlevelEventSourcingBundleTest.php + + - + message: '#^Cannot access offset ''bus'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 3 + path: tests/Unit/PatchlevelEventSourcingBundleTest.php + + - + message: '#^Cannot access offset ''handles'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 3 + path: tests/Unit/PatchlevelEventSourcingBundleTest.php + + - + message: '#^Cannot access offset ''method'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 2 + path: tests/Unit/PatchlevelEventSourcingBundleTest.php + + - + message: '#^Trying to invoke mixed but it''s not a callable\.$#' + identifier: callable.nonCallable + count: 1 + path: tests/Unit/PatchlevelEventSourcingBundleTest.php diff --git a/phpstan.neon.dist b/phpstan.neon.dist index dc02b387..c01c9daa 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -6,3 +6,4 @@ parameters: level: max paths: - src + - tests diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 52f41deb..001b3b9b 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -22,7 +22,11 @@ * }, * query_bus: array{enabled: bool, service: string}, * subscription: array{ - * store: array{type: string, service: string|null}, + * store: array{ + * type: string, + * service: string|null, + * options: array{table_name: string} + * }, * retry_strategy?: array{base_delay: int, delay_factor: int, max_attempts: int}, * retry_strategies: array}>, * default_retry_strategy: string, @@ -197,6 +201,12 @@ public function getConfigTreeBuilder(): TreeBuilder ->defaultValue('dbal') ->end() ->scalarNode('service')->defaultNull()->end() + ->arrayNode('options') + ->addDefaultsIfNotSet() + ->children() + ->scalarNode('table_name')->defaultValue('subscriptions')->end() + ->end() + ->end() ->end() ->end() diff --git a/src/DependencyInjection/PatchlevelEventSourcingExtension.php b/src/DependencyInjection/PatchlevelEventSourcingExtension.php index 80979afd..e2bc845d 100644 --- a/src/DependencyInjection/PatchlevelEventSourcingExtension.php +++ b/src/DependencyInjection/PatchlevelEventSourcingExtension.php @@ -488,6 +488,8 @@ static function (ChildDefinition $definition): void { $container->register(DoctrineSubscriptionStore::class) ->setArguments([ new Reference('event_sourcing.dbal_connection'), + new Reference('event_sourcing.clock'), + $config['subscription']['store']['options']['table_name'], ]) ->addTag('event_sourcing.doctrine_schema_configurator'); diff --git a/tests/Fixtures/Profile.php b/tests/Fixtures/Profile.php index b3aedad4..551afe1c 100644 --- a/tests/Fixtures/Profile.php +++ b/tests/Fixtures/Profile.php @@ -16,6 +16,7 @@ class Profile extends BasicAggregateRoot #[Id] private CustomId $id; + /** @param Repository $profileRepository */ #[Handle] public static function create( CreateProfile $command, diff --git a/tests/Unit/DataCollector/EventSourcingCollectorTest.php b/tests/Unit/DataCollector/EventSourcingCollectorTest.php index 860373b8..f7f24a57 100644 --- a/tests/Unit/DataCollector/EventSourcingCollectorTest.php +++ b/tests/Unit/DataCollector/EventSourcingCollectorTest.php @@ -68,7 +68,6 @@ public function testCollectData(): void self::assertEquals(ProfileCreated::class, $message['event_class']); self::assertEquals('profile.created', $message['event_name']); self::assertInstanceOf(Data::class, $message['event']); - self::assertIsArray($message['headers']); self::assertCount(1, $message['headers']); self::assertInstanceOf(Data::class, $message['headers'][0]); } diff --git a/tests/Unit/PatchlevelEventSourcingBundleTest.php b/tests/Unit/PatchlevelEventSourcingBundleTest.php index 5659f6bb..d2b28281 100644 --- a/tests/Unit/PatchlevelEventSourcingBundleTest.php +++ b/tests/Unit/PatchlevelEventSourcingBundleTest.php @@ -83,6 +83,7 @@ use Patchlevel\EventSourcing\Subscription\Store\SubscriptionStore; use Patchlevel\EventSourcing\Subscription\Subscriber\MetadataSubscriberAccessorRepository; use Patchlevel\EventSourcingBundle\Command\StoreMigrateCommand; +use Patchlevel\EventSourcingBundle\DependencyInjection\Configuration; use Patchlevel\EventSourcingBundle\DependencyInjection\PatchlevelEventSourcingExtension; use Patchlevel\EventSourcingBundle\EventBus\SymfonyEventBus; use Patchlevel\EventSourcingBundle\PatchlevelEventSourcingBundle; @@ -1551,6 +1552,9 @@ public function testNamedRepository(): void self::assertSame($profileRepository, $namedArgumentProfileRepository); } + /** + * @param array{patchlevel_event_sourcing: array} $config + */ private function compileContainer(ContainerBuilder $container, array $config): void { $bundle = new PatchlevelEventSourcingBundle(); From c5b6e954c9119ea20c97335b8cae4fa51bc100f0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 10 Dec 2025 03:15:31 +0000 Subject: [PATCH 6/9] Lock file maintenance Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- composer.lock | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/composer.lock b/composer.lock index b5db6d28..955c03cc 100644 --- a/composer.lock +++ b/composer.lock @@ -6023,12 +6023,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "eeebba0043eaddd36fd8747cc144b9b661d9b392" + "reference": "75d4ccd9c135c4ac904cd4211a43e51d12feb1ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/eeebba0043eaddd36fd8747cc144b9b661d9b392", - "reference": "eeebba0043eaddd36fd8747cc144b9b661d9b392", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/75d4ccd9c135c4ac904cd4211a43e51d12feb1ef", + "reference": "75d4ccd9c135c4ac904cd4211a43e51d12feb1ef", "shasum": "" }, "conflict": { @@ -6280,6 +6280,7 @@ "feehi/feehicms": "<=2.1.1", "fenom/fenom": "<=2.12.1", "filament/actions": ">=3.2,<3.2.123", + "filament/filament": ">=4,<4.3.1", "filament/infolists": ">=3,<3.2.115", "filament/tables": ">=3,<3.2.115", "filegator/filegator": "<7.8", @@ -6534,6 +6535,7 @@ "netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15", "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", + "neuron-core/neuron-ai": "<=2.8.11", "nilsteampassnet/teampass": "<3.1.3.1-dev", "nitsan/ns-backup": "<13.0.1", "nonfiction/nterchange": "<4.1.1", @@ -6553,7 +6555,7 @@ "october/system": "<3.7.5", "oliverklee/phpunit": "<3.5.15", "omeka/omeka-s": "<4.0.3", - "onelogin/php-saml": "<2.10.4", + "onelogin/php-saml": "<2.21.1|>=3,<3.8.1|>=4,<4.3.1", "oneup/uploader-bundle": ">=1,<1.9.3|>=2,<2.1.5", "open-web-analytics/open-web-analytics": "<1.8.1", "opencart/opencart": ">=0", @@ -6687,8 +6689,8 @@ "shopware/core": "<6.6.10.9-dev|>=6.7,<6.7.4.1-dev", "shopware/platform": "<6.6.10.7-dev|>=6.7,<6.7.3.1-dev", "shopware/production": "<=6.3.5.2", - "shopware/shopware": "<=5.7.17|>=6.7,<6.7.2.1-dev", - "shopware/storefront": "<=6.4.8.1|>=6.5.8,<6.5.8.7-dev", + "shopware/shopware": "<=5.7.17|>=6.4.6,<6.6.10.10-dev|>=6.7,<6.7.5.1-dev", + "shopware/storefront": "<6.6.10.10-dev|>=6.7,<6.7.5.1-dev", "shopxo/shopxo": "<=6.4", "showdoc/showdoc": "<2.10.4", "shuchkin/simplexlsx": ">=1.0.12,<1.1.13", @@ -7014,7 +7016,7 @@ "type": "tidelift" } ], - "time": "2025-12-08T23:05:37+00:00" + "time": "2025-12-09T18:07:05+00:00" }, { "name": "sanmai/di-container", From 188cfc492ebcb51222b6eed3793ed7cfdb8a56be Mon Sep 17 00:00:00 2001 From: Daniel Badura Date: Wed, 10 Dec 2025 13:37:05 +0100 Subject: [PATCH 7/9] Also update default configuration --- docs/pages/configuration.md | 2 +- docs/pages/installation.md | 14 ++++++++--- .../CommandHandlerCompilerPass.php | 5 +++- .../QueryHandlerCompilerPass.php | 5 +++- .../ServiceAliasResolver.php | 25 +++++++++++++++++++ .../SubscriberGuardCompilePass.php | 16 ++---------- 6 files changed, 46 insertions(+), 21 deletions(-) create mode 100644 src/DependencyInjection/ServiceAliasResolver.php diff --git a/docs/pages/configuration.md b/docs/pages/configuration.md index 8c0bd1ae..df495fe5 100644 --- a/docs/pages/configuration.md +++ b/docs/pages/configuration.md @@ -672,7 +672,7 @@ For this you need to enable the crypto shredding. ```yaml patchlevel_event_sourcing: cryptography: - use_encrypted_field_name: true, + use_encrypted_field_name: true ``` !!! tip diff --git a/docs/pages/installation.md b/docs/pages/installation.md index f44249a4..b9432835 100644 --- a/docs/pages/installation.md +++ b/docs/pages/installation.md @@ -39,12 +39,18 @@ patchlevel_event_sourcing: provide_dedicated_connection: true store: type: dbal_stream - merge_orm_schema: true + # if you are using doctrine bundle you should enable this + #merge_orm_schema: true command_bus: - service: messenger.bus.default + service: messenger.default_bus query_bus: - service: messenger.bus.default - cryptography: ~ + service: messenger.default_bus + subscription: + gap_detection: ~ + + # enable this if you want to use sensitive data encryption + #cryptography: ~ + # use_encrypted_field_name: true when@dev: patchlevel_event_sourcing: diff --git a/src/DependencyInjection/CommandHandlerCompilerPass.php b/src/DependencyInjection/CommandHandlerCompilerPass.php index dad31be7..a078c79b 100644 --- a/src/DependencyInjection/CommandHandlerCompilerPass.php +++ b/src/DependencyInjection/CommandHandlerCompilerPass.php @@ -25,7 +25,10 @@ public function process(ContainerBuilder $container): void return; } - $bus = $container->getParameter('patchlevel_event_sourcing.aggregate_handlers.bus'); + $bus = ServiceAliasResolver::resolve( + $container, + $container->getParameter('patchlevel_event_sourcing.aggregate_handlers.bus'), + ); /** @var AggregateRootRegistry $aggregateRootRegistry */ $aggregateRootRegistry = $container->get(AggregateRootRegistry::class); diff --git a/src/DependencyInjection/QueryHandlerCompilerPass.php b/src/DependencyInjection/QueryHandlerCompilerPass.php index c2d069ab..2e00cb55 100644 --- a/src/DependencyInjection/QueryHandlerCompilerPass.php +++ b/src/DependencyInjection/QueryHandlerCompilerPass.php @@ -19,7 +19,10 @@ public function process(ContainerBuilder $container): void return; } - $bus = $container->getParameter('patchlevel_event_sourcing.query_handlers.bus'); + $bus = ServiceAliasResolver::resolve( + $container, + $container->getParameter('patchlevel_event_sourcing.query_handlers.bus'), + ); $subscribers = $container->findTaggedServiceIds('event_sourcing.subscriber'); foreach (array_keys($subscribers) as $subscriberServiceName) { diff --git a/src/DependencyInjection/ServiceAliasResolver.php b/src/DependencyInjection/ServiceAliasResolver.php new file mode 100644 index 00000000..91718440 --- /dev/null +++ b/src/DependencyInjection/ServiceAliasResolver.php @@ -0,0 +1,25 @@ +hasAlias($id)) { + return self::resolve( + $container, + (string)$container->getAlias($id), + ); + } + + return $id; + } +} \ No newline at end of file diff --git a/src/DependencyInjection/SubscriberGuardCompilePass.php b/src/DependencyInjection/SubscriberGuardCompilePass.php index 1dd1a766..65b5f2bb 100644 --- a/src/DependencyInjection/SubscriberGuardCompilePass.php +++ b/src/DependencyInjection/SubscriberGuardCompilePass.php @@ -34,7 +34,7 @@ public function process(ContainerBuilder $container): void ); } - $subscriptionConnection = $this->resolveService($container, (string)$argument); + $subscriptionConnection = ServiceAliasResolver::resolve($container, (string)$argument); $subscribers = $container->findTaggedServiceIds('event_sourcing.subscriber'); @@ -48,7 +48,7 @@ public function process(ContainerBuilder $container): void continue; } - if ($subscriptionConnection !== $this->resolveService($container, (string)$argument)) { + if ($subscriptionConnection !== ServiceAliasResolver::resolve($container, (string)$argument)) { continue; } @@ -68,16 +68,4 @@ public function process(ContainerBuilder $container): void } } } - - private function resolveService(ContainerBuilder $container, string $id): string - { - if ($container->hasAlias($id)) { - return $this->resolveService( - $container, - (string)$container->getAlias($id), - ); - } - - return $id; - } } From 5298f5ff5d29de6cffb0a8696e82a31b6014f6d8 Mon Sep 17 00:00:00 2001 From: Daniel Badura Date: Wed, 10 Dec 2025 13:47:32 +0100 Subject: [PATCH 8/9] SA fix --- phpstan-baseline.neon | 12 ++++++++++++ src/DependencyInjection/ServiceAliasResolver.php | 6 ++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 66c93b9f..2a5fff41 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,11 +1,23 @@ parameters: ignoreErrors: + - + message: '#^Parameter \#2 \$id of static method Patchlevel\\EventSourcingBundle\\DependencyInjection\\ServiceAliasResolver\:\:resolve\(\) expects string, array\|bool\|float\|int\|string\|null given\.$#' + identifier: argument.type + count: 1 + path: src/DependencyInjection/CommandHandlerCompilerPass.php + - message: '#^Parameter \#1 \$classString of static method Patchlevel\\EventSourcing\\QueryBus\\HandlerFinder\:\:findInClass\(\) expects class\-string, string given\.$#' identifier: argument.type count: 1 path: src/DependencyInjection/QueryHandlerCompilerPass.php + - + message: '#^Parameter \#2 \$id of static method Patchlevel\\EventSourcingBundle\\DependencyInjection\\ServiceAliasResolver\:\:resolve\(\) expects string, array\|bool\|float\|int\|string\|null given\.$#' + identifier: argument.type + count: 1 + path: src/DependencyInjection/QueryHandlerCompilerPass.php + - message: '#^Property Patchlevel\\EventSourcingBundle\\Tests\\Fixtures\\Profile\:\:\$id is never read, only written\.$#' identifier: property.onlyWritten diff --git a/src/DependencyInjection/ServiceAliasResolver.php b/src/DependencyInjection/ServiceAliasResolver.php index 91718440..440d27f1 100644 --- a/src/DependencyInjection/ServiceAliasResolver.php +++ b/src/DependencyInjection/ServiceAliasResolver.php @@ -6,9 +6,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; -/** - * @interal - */ +/** @interal */ final readonly class ServiceAliasResolver { public static function resolve(ContainerBuilder $container, string $id): string @@ -22,4 +20,4 @@ public static function resolve(ContainerBuilder $container, string $id): string return $id; } -} \ No newline at end of file +} From 11a01eb51c05524d6df98557cf4a1fa342196740 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 11 Dec 2025 02:41:21 +0000 Subject: [PATCH 9/9] Lock file maintenance Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 955c03cc..500667a7 100644 --- a/composer.lock +++ b/composer.lock @@ -6023,12 +6023,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "75d4ccd9c135c4ac904cd4211a43e51d12feb1ef" + "reference": "4400137eb61cd0db3192a409353ae83e811395fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/75d4ccd9c135c4ac904cd4211a43e51d12feb1ef", - "reference": "75d4ccd9c135c4ac904cd4211a43e51d12feb1ef", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/4400137eb61cd0db3192a409353ae83e811395fe", + "reference": "4400137eb61cd0db3192a409353ae83e811395fe", "shasum": "" }, "conflict": { @@ -6362,7 +6362,7 @@ "ibexa/http-cache": ">=4.6,<4.6.14", "ibexa/post-install": "<1.0.16|>=4.6,<4.6.14", "ibexa/solr": ">=4.5,<4.5.4", - "ibexa/user": ">=4,<4.4.3|>=5,<5.0.3", + "ibexa/user": ">=4,<4.4.3|>=5,<5.0.4", "icecoder/icecoder": "<=8.1", "idno/known": "<=1.3.1", "ilicmiljan/secure-props": ">=1.2,<1.2.2", @@ -7016,7 +7016,7 @@ "type": "tidelift" } ], - "time": "2025-12-09T18:07:05+00:00" + "time": "2025-12-10T19:05:59+00:00" }, { "name": "sanmai/di-container",