Skip to content

Commit 38fa326

Browse files
authored
Merge pull request #212 from acrobat/extra-config-fixes
Extra config changes needed to ensure compitbility over all symfony versions
2 parents 8a64ee7 + 5c1c277 commit 38fa326

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

resources/config/default.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
}
2525

2626
if ($container->hasParameter('kernel.project_dir')) {
27-
$loader->import('dist/parameters_sf5.yml');
27+
$loader->import(__DIR__.'/dist/parameters_sf5.yml');
2828
} else {
29-
$loader->import('dist/parameters.yml');
29+
$loader->import(__DIR__.'/dist/parameters.yml');
3030
}
3131
if (class_exists('Symfony\Bundle\MonologBundle\MonologBundle')) {
32-
$loader->import('dist/monolog.yml');
32+
$loader->import(__DIR__.'/dist/monolog.yml');
3333
}
34-
$loader->import('dist/doctrine.yml');
35-
$loader->import('dist/framework.php');
36-
$loader->import('dist/security.php');
34+
$loader->import(__DIR__.'/dist/doctrine.yml');
35+
$loader->import(__DIR__.'/dist/framework.php');
36+
$loader->import(__DIR__.'/dist/security.php');

resources/config/dist/security.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,12 @@
4545
$config = array_merge($config, ['firewall' => ['main' => ['anonymous' => null]]]);
4646
}
4747

48+
if (interface_exists(\Symfony\Component\PasswordHasher\PasswordHasherInterface::class)) {
49+
unset($config['encoders']);
50+
$config = array_merge($config, [
51+
'enable_authenticator_manager' => true,
52+
'password_hashers' => ['Symfony\Component\Security\Core\User\User' => 'plaintext'],
53+
]);
54+
}
55+
4856
$container->loadFromExtension('security', $config);

0 commit comments

Comments
 (0)