Skip to content

Commit 6e06f7f

Browse files
authored
fix(symfony): lazy service config in PHP 8.4+ (#123)
1 parent b8b0cd3 commit 6e06f7f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Filesystem/Symfony/DependencyInjection/ZenstruckFilesystemExtension.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,11 @@ private function registerFilesystem(string $name, array $config, ContainerBuilde
406406
;
407407

408408
if ($config['lazy']) {
409-
// $flysystemDef
410-
// ->setLazy(true)
411-
// ->addTag('proxy', ['interface' => Flysystem::class])
412-
// ;
409+
$flysystemDef->setLazy(true);
410+
411+
if (\PHP_VERSION_ID <= 80400) {
412+
$flysystemDef->addTag('proxy', ['interface' => Flysystem::class]);
413+
}
413414
}
414415

415416
$container->register($filesystemId = 'zenstruck_filesystem.filesystem.'.$name, FlysystemFilesystem::class)

0 commit comments

Comments
 (0)