Skip to content

Commit b9321aa

Browse files
[FrameworkBundle] Fix wiring JsonStreamReader
1 parent b1da8d9 commit b9321aa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

JsonStreamReader.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,13 @@ public function __construct(
4646
private ContainerInterface $valueTransformers,
4747
PropertyMetadataLoaderInterface $propertyMetadataLoader,
4848
string $streamReadersDir,
49+
ConfigCacheFactoryInterface|string|null $configCacheFactory = null,
4950
?string $lazyGhostsDir = null,
50-
?ConfigCacheFactoryInterface $configCacheFactory = null,
5151
) {
52+
if (\is_string($configCacheFactory)) {
53+
$lazyGhostsDir = $configCacheFactory;
54+
$configCacheFactory = null;
55+
}
5256
$this->streamReaderGenerator = new StreamReaderGenerator($propertyMetadataLoader, $streamReadersDir, $configCacheFactory);
5357
$this->instantiator = new Instantiator();
5458
$this->lazyInstantiator = new LazyInstantiator($lazyGhostsDir);

0 commit comments

Comments
 (0)