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 @@ -44,9 +44,13 @@ public function __construct(
4444 private ContainerInterface $ valueTransformers ,
4545 PropertyMetadataLoaderInterface $ propertyMetadataLoader ,
4646 string $ streamReadersDir ,
47+ ConfigCacheFactoryInterface |string |null $ configCacheFactory = null ,
4748 ?string $ lazyGhostsDir = null ,
48- ?ConfigCacheFactoryInterface $ configCacheFactory = null ,
4949 ) {
50+ if (\is_string ($ configCacheFactory )) {
51+ $ lazyGhostsDir = $ configCacheFactory ;
52+ $ configCacheFactory = null ;
53+ }
5054 $ this ->streamReaderGenerator = new StreamReaderGenerator ($ propertyMetadataLoader , $ streamReadersDir , $ configCacheFactory );
5155 $ this ->instantiator = new Instantiator ();
5256 $ this ->lazyInstantiator = new LazyInstantiator ($ lazyGhostsDir );
You can’t perform that action at this time.
0 commit comments