The child node "db_driver" at path "fos_user" must be configured, Symfony 3.4
nikitaodnorob opened this issue · comments
Hello! I have such problem with FOSUserBundle installation - I get an error The child node "db_driver" at path "fos_user" must be configured
It is written in the official documentation that
If you encounter installation errors pointing at a lack of configuration parameters, such as The child node "db_driver" at path "fos_user" must be configured, you should complete the configuration in Step 5 first and then re-run this step
Ok, I'm looking at step 5. Add the following configuration to your config.yml
. But there isn't such file in my Symfony version. In folder 'config' I have only routes.yaml
and services.yaml
. And security.yml
from step 4 doesn't exists too.
Next, I have tried to create these files:
config/security.yml
security:
firewalls:
main:
csrf_token_generator: security.csrf.token_manager
framework:
csrf_protection: true
access_control:
- { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/admin/, role: ROLE_ADMIN }
config/config.yml
fos_user:
db_driver: orm # other valid values are 'mongodb' and 'couchdb'
firewall_name: main
user_class: AppBundle\Entity\FOS_User
The class FOS_User is defined in src/Entity/FOS_User.php. The problem isn't fixed.
Hey!
Normally at installation, the created file is in config/packages
. It's called fos_user.yaml
.
Delete what you added in the config.yml. And rather modify the file fos_user.yaml.
The doc has not been updated since 3.4 ;)