File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
rules-tests/CodeQuality/Rector/Closure/StringExtensionToConfigBuilderRector/Fixture Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace Symfony \Component \DependencyInjection \Loader \Configurator ;
6
+
7
+ use Http \Discovery \Psr17Factory ;
8
+ use Psr \Http \Message \RequestFactoryInterface ;
9
+ use Psr \Http \Message \ResponseFactoryInterface ;
10
+ use Psr \Http \Message \ServerRequestFactoryInterface ;
11
+ use Psr \Http \Message \StreamFactoryInterface ;
12
+ use Psr \Http \Message \UploadedFileFactoryInterface ;
13
+ use Psr \Http \Message \UriFactoryInterface ;
14
+
15
+ return static function (ContainerConfigurator $ containerConfigurator ): void {
16
+ $ services = $ containerConfigurator ->services ();
17
+
18
+ $ services ->alias (RequestFactoryInterface::class, 'http_discovery.psr17_factory ' );
19
+
20
+ $ services ->alias (ResponseFactoryInterface::class, 'http_discovery.psr17_factory ' );
21
+
22
+ $ services ->alias (ServerRequestFactoryInterface::class, 'http_discovery.psr17_factory ' );
23
+
24
+ $ services ->alias (StreamFactoryInterface::class, 'http_discovery.psr17_factory ' );
25
+
26
+ $ services ->alias (UploadedFileFactoryInterface::class, 'http_discovery.psr17_factory ' );
27
+
28
+ $ services ->alias (UriFactoryInterface::class, 'http_discovery.psr17_factory ' );
29
+
30
+ $ services ->set ('http_discovery.psr17_factory ' , Psr17Factory::class);
31
+ };
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ public function match(Closure $closure): ?ExtensionKeyAndConfiguration
29
29
return null ;
30
30
}
31
31
32
+ if ($ extensionNames === []) {
33
+ return null ;
34
+ }
35
+
32
36
// warn use early about it, to avoid silent skip
33
37
$ errorMessage = sprintf (
34
38
'Split extensions "%s" to multiple separated files first ' ,
You can’t perform that action at this time.
0 commit comments