From 8384216bedf03f0cd59ec3470526fc6f617161fc Mon Sep 17 00:00:00 2001 From: Rodrigo Pedra Brum Date: Mon, 8 Mar 2021 15:07:04 -0300 Subject: [PATCH 1/3] Allow custom path as a base path --- src/EventSourcingServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EventSourcingServiceProvider.php b/src/EventSourcingServiceProvider.php index 112c3da1..8fa5cc47 100644 --- a/src/EventSourcingServiceProvider.php +++ b/src/EventSourcingServiceProvider.php @@ -114,7 +114,7 @@ private function discoverEventHandlers() (new DiscoverEventHandlers()) ->within(config('event-sourcing.auto_discover_projectors_and_reactors')) - ->useBasePath(base_path()) + ->useBasePath(base_path(config('event-sourcing.base_path'))) ->ignoringFiles(Composer::getAutoloadedFiles(base_path('composer.json'))) ->addToProjectionist($projectionist); } From 8659e74dafec2957c1dd04cfb719e51f87d67049 Mon Sep 17 00:00:00 2001 From: Rodrigo Pedra Brum Date: Mon, 8 Mar 2021 20:06:16 -0300 Subject: [PATCH 2/3] allow passing full base path --- src/EventSourcingServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EventSourcingServiceProvider.php b/src/EventSourcingServiceProvider.php index 8fa5cc47..6f62fcb6 100644 --- a/src/EventSourcingServiceProvider.php +++ b/src/EventSourcingServiceProvider.php @@ -114,7 +114,7 @@ private function discoverEventHandlers() (new DiscoverEventHandlers()) ->within(config('event-sourcing.auto_discover_projectors_and_reactors')) - ->useBasePath(base_path(config('event-sourcing.base_path'))) + ->useBasePath(config('event-sourcing.base_path', base_path())) ->ignoringFiles(Composer::getAutoloadedFiles(base_path('composer.json'))) ->addToProjectionist($projectionist); } From ba4096fc1232e8c53b8f4fe726ad2d5ad8be4014 Mon Sep 17 00:00:00 2001 From: Rodrigo Pedra Brum Date: Mon, 8 Mar 2021 20:07:38 -0300 Subject: [PATCH 3/3] use more descriptive config key --- src/EventSourcingServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EventSourcingServiceProvider.php b/src/EventSourcingServiceProvider.php index 6f62fcb6..0137d290 100644 --- a/src/EventSourcingServiceProvider.php +++ b/src/EventSourcingServiceProvider.php @@ -114,7 +114,7 @@ private function discoverEventHandlers() (new DiscoverEventHandlers()) ->within(config('event-sourcing.auto_discover_projectors_and_reactors')) - ->useBasePath(config('event-sourcing.base_path', base_path())) + ->useBasePath(config('event-sourcing.auto_discover_base_path', base_path())) ->ignoringFiles(Composer::getAutoloadedFiles(base_path('composer.json'))) ->addToProjectionist($projectionist); }