We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec80a00 commit 6481cb7Copy full SHA for 6481cb7
src/DatabasePackage.php
@@ -78,7 +78,16 @@ public function register(Container $container): void
78
DatabaseAdapter::class,
79
fn(DatabaseServiceFactory $factory, ?string $tag = null) => $factory->get($tag),
80
new DIOptions(isolation: true)
81
- );
+ )
82
+ ->extend(
83
+ function (DatabaseAdapter $db, Container $container, ?string $tag = null) {
84
+ // Instant get ORM to init some extends and listeners.
85
+ $container->get(ORM::class, tag: $tag);
86
+
87
+ return $db;
88
+ }
89
+ );
90
91
$container->bindShared(
92
ORM::class,
93
fn(Container $container, ?string $tag = null)
0 commit comments