@@ -31,28 +31,28 @@ class SidusEncryptionExtension extends Extension implements PrependExtensionInte
31
31
public function load (array $ configs , ContainerBuilder $ container ): void
32
32
{
33
33
$ loader = new Loader \YamlFileLoader ($ container , new FileLocator (__DIR__ .'/../Resources/config/services ' ));
34
- $ loader ->load ('encryption.yml ' );
35
- $ loader ->load ('doctrine.yml ' );
36
- $ loader ->load ('registry.yml ' );
37
- $ loader ->load ('security.yml ' );
38
- $ loader ->load ('session.yml ' );
39
-
34
+ $ loader ->load ('encryption.yaml ' );
35
+ $ loader ->load ('doctrine.yaml ' );
36
+ $ loader ->load ('registry.yaml ' );
37
+ $ loader ->load ('security.yaml ' );
38
+ $ loader ->load ('session.yaml ' );
39
+
40
40
$ configuration = new Configuration ();
41
41
$ config = $ this ->processConfiguration ($ configuration , $ configs );
42
-
42
+
43
43
$ registry = $ container ->getDefinition (EncryptionManagerRegistry::class);
44
44
$ registry ->replaceArgument ('$defaultCode ' , $ config ['preferred_adapter ' ]);
45
45
$ container ->setParameter ('sidus.encryption.throw_exceptions ' , $ config ['throw_exception ' ]);
46
46
}
47
47
48
48
public function prepend (ContainerBuilder $ container )
49
49
{
50
- $ doctrineConfiguration = $ container ->getExtensionConfig ('doctrine ' );
51
-
50
+ $ doctrineConfiguration = $ container ->getExtensionConfig ('doctrine ' )[ 0 ] ;
51
+
52
52
if (empty ($ doctrineConfiguration ['dbal ' ])) {
53
53
$ doctrineConfiguration ['dbal ' ] = [];
54
54
}
55
-
55
+
56
56
if (empty ($ doctrineConfiguration ['dbal ' ]['types ' ])) {
57
57
$ doctrineConfiguration ['dbal ' ]['types ' ] = [];
58
58
}
0 commit comments