Skip to content

Commit

Permalink
Fix #26 (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentchalamon authored Jun 12, 2017
1 parent 936a17f commit 8b99bc7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion DependencyInjection/CoopTilleulsForgotPasswordExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public function load(array $configs, ContainerBuilder $container)

// Build normalizer
$class = true === $config['use_jms_serializer'] ? JMSNormalizer::class : SymfonyNormalizer::class;
$container->setDefinition('coop_tilleuls_forgot_password.normalizer', new Definition($class, [new Reference('serializer')]))->setPublic(false);
$serializerId = true === $config['use_jms_serializer'] ? 'jms_serializer.serializer' : 'serializer';
$container->setDefinition('coop_tilleuls_forgot_password.normalizer', new Definition($class, [new Reference($serializerId)]))->setPublic(false);
}
}
5 changes: 2 additions & 3 deletions features/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,15 @@ protected function configureContainer(ContainerBuilder $c, LoaderInterface $load
],
]);

$c->loadFromExtension('framework', [
$c->loadFromExtension('framework', array_merge([
'secret' => 'CoopTilleulsForgotPasswordBundle',
'test' => null,
'assets' => null,
'serializer' => null,
'profiler' => ['collect' => false],
'templating' => [
'engines' => ['twig'],
],
]);
], 'jmsserializer' !== $this->getEnvironment() ? ['serializer' => null] : []));

$c->loadFromExtension('security', [
'encoders' => [UserInterface::class => 'plaintext'],
Expand Down

0 comments on commit 8b99bc7

Please sign in to comment.