Skip to content

Commit

Permalink
feature/easy-monorepo-autoconfigure-services (#1543)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexndlm authored Sep 3, 2024
1 parent 5ef7848 commit 2764292
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions packages/EasyApiPlatform/bundle/config/filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->defaults()
->autowire()
->autoconfigure();

$services->set('eonx.api_platform.doctrine.orm.advanced_search_filter', AdvancedSearchFilter::class)
->autoconfigure(false)
Expand Down
11 changes: 7 additions & 4 deletions packages/EasyEventDispatcher/bundle/config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
use EonX\EasyEventDispatcher\Dispatcher\EventDispatcherInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as SymfonyEventDispatcherInterface;

return static function (ContainerConfigurator $container): void {
$container
->services()
->set(EventDispatcherInterface::class, EventDispatcher::class)
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->defaults()
->autowire()
->autoconfigure();

$services->set(EventDispatcherInterface::class, EventDispatcher::class)
->args([service(SymfonyEventDispatcherInterface::class)]);
};

0 comments on commit 2764292

Please sign in to comment.