File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Bundle/FrameworkBundle/Resources/config Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 2121use Symfony \Component \JsonStreamer \Mapping \Read \DateTimeTypePropertyMetadataLoader as ReadDateTimeTypePropertyMetadataLoader ;
2222use Symfony \Component \JsonStreamer \Mapping \Write \AttributePropertyMetadataLoader as WriteAttributePropertyMetadataLoader ;
2323use Symfony \Component \JsonStreamer \Mapping \Write \DateTimeTypePropertyMetadataLoader as WriteDateTimeTypePropertyMetadataLoader ;
24+ use Symfony \Component \JsonStreamer \StreamerDumper ;
2425use Symfony \Component \JsonStreamer \ValueTransformer \DateTimeToStringValueTransformer ;
2526use Symfony \Component \JsonStreamer \ValueTransformer \StringToDateTimeValueTransformer ;
2627
3940 tagged_locator ('json_streamer.value_transformer ' ),
4041 service ('json_streamer.read.property_metadata_loader ' ),
4142 param ('.json_streamer.stream_readers_dir ' ),
43+ class_exists (StreamerDumper::class) ? service ('config_cache_factory ' )->ignoreOnInvalid () : param ('.json_streamer.lazy_ghosts_dir ' ),
4244 param ('.json_streamer.lazy_ghosts_dir ' ),
43- service ('config_cache_factory ' )->ignoreOnInvalid (),
4445 ])
4546 ->alias (JsonStreamWriter::class, 'json_streamer.stream_writer ' )
4647 ->alias (JsonStreamReader::class, 'json_streamer.stream_reader ' )
Original file line number Diff line number Diff 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 );
You can’t perform that action at this time.
0 commit comments