File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
DependencyInjection/CompilerPass Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -37,13 +37,12 @@ public function process(ContainerBuilder $container): void
3737 ->setFactory ([new Reference (FilesystemFactory::class), 'create ' ])
3838 ->setArguments ([
3939 $ attributes ['alias ' ],
40- $ attributes ['config ' ] ?? []
40+ $ attributes ['config ' ] ?? [],
4141 ]);
4242 $ serviceName = sprintf ('api_components.filesystem.%s ' , $ attributes ['alias ' ]);
4343 $ container
4444 ->setDefinition ($ serviceName , $ definition )
45- ->addTag (FilesystemProvider::FILESYSTEM_TAG , [ 'alias ' => $ attributes ['alias ' ] ])
46- ;
45+ ->addTag (FilesystemProvider::FILESYSTEM_TAG , ['alias ' => $ attributes ['alias ' ]]);
4746 }
4847 }
4948 }
Original file line number Diff line number Diff line change 2323class FilesystemFactory
2424{
2525 public function __construct (private readonly ServiceLocator $ adapters )
26- {}
26+ {
27+ }
2728
2829 /**
2930 * @throws RuntimeException
Original file line number Diff line number Diff line change 1616use League \Flysystem \Filesystem ;
1717use Psr \Container \ContainerExceptionInterface ;
1818use Psr \Container \NotFoundExceptionInterface ;
19- use Symfony \Component \DependencyInjection \Exception \RuntimeException ;
2019use Symfony \Component \DependencyInjection \ServiceLocator ;
2120
2221/**
@@ -29,7 +28,8 @@ class FilesystemProvider
2928 public const FILESYSTEM_TAG = 'silverback.api_components.filesystem ' ;
3029
3130 public function __construct (private readonly ServiceLocator $ filesystems )
32- {}
31+ {
32+ }
3333
3434 /**
3535 * @throws ContainerExceptionInterface
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ public function persistFiles(object $object): void
147147
148148 $ path = $ fieldConfiguration ->prefix ?? '' ;
149149 $ path .= $ file ->getFilename ();
150- $ stream = fopen ($ file ->getRealPath (), 'rb ' );
150+ $ stream = fopen ($ file ->getRealPath (), 'r ' );
151151 $ filesystem ->writeStream (
152152 $ path ,
153153 $ stream ,
You can’t perform that action at this time.
0 commit comments