Skip to content

Commit

Permalink
Change the extension of configuration from yml to yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkrovitch committed Nov 27, 2020
1 parent c30c6d2 commit ef41dc9
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
20 changes: 10 additions & 10 deletions src/DependencyInjection/SidusEncryptionExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,28 @@ class SidusEncryptionExtension extends Extension implements PrependExtensionInte
public function load(array $configs, ContainerBuilder $container): void
{
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/services'));
$loader->load('encryption.yml');
$loader->load('doctrine.yml');
$loader->load('registry.yml');
$loader->load('security.yml');
$loader->load('session.yml');

$loader->load('encryption.yaml');
$loader->load('doctrine.yaml');
$loader->load('registry.yaml');
$loader->load('security.yaml');
$loader->load('session.yaml');
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);

$registry = $container->getDefinition(EncryptionManagerRegistry::class);
$registry->replaceArgument('$defaultCode', $config['preferred_adapter']);
$container->setParameter('sidus.encryption.throw_exceptions', $config['throw_exception']);
}

public function prepend(ContainerBuilder $container)
{
$doctrineConfiguration = $container->getExtensionConfig('doctrine');

$doctrineConfiguration = $container->getExtensionConfig('doctrine')[0];
if (empty($doctrineConfiguration['dbal'])) {
$doctrineConfiguration['dbal'] = [];
}

if (empty($doctrineConfiguration['dbal']['types'])) {
$doctrineConfiguration['dbal']['types'] = [];
}
Expand Down
1 change: 0 additions & 1 deletion src/Resources/config/services/doctrine.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
services:
doctrine.dbal.connection_factory:
class: Sidus\EncryptionBundle\Doctrine\Connection\Factory\ConnectionFactory
alias: Sidus\EncryptionBundle\Doctrine\Connection\Factory\ConnectionFactory
autowire: true
autoconfigure: true
arguments:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ef41dc9

Please sign in to comment.