this is my first time working a project with symfony 3.3 i installed it and everything is good , now i want to install FOSuserBundle , i followed all steps in symfony site . the last step is to :Update your database schema ( php bin/console doctrine:schema:update --force ) but i had this exception : Fatal error: Uncaught exception 'Symfony\Component\Yaml\Exception\ParseException' with message 'Indentation problem at line 34 (near " main:").' in C:\wamp64\www\untitled\vendor\symf ony\symfony\src\Symfony\Component\Yaml\Parser.php:591 Stack trace:
0 C:\wamp64\www\untitled\vendor\symfony\symfony\src\Symfony\Component\Yaml\Parser.php(320): Symfony\Component\Yaml\Parser->getNextEmbedBlock()
1 C:\wamp64\www\untitled\vendor\symfony\symfony\src\Symfony\Component\Yaml\Parser.php(450): Symfony\Component\Yaml\Parser->doParse('encoders:\n F...', 2816)
2 C:\wamp64\www\untitled\vendor\symfony\symfony\src\Symfony\Component\Yaml\Parser.php(320): Symfony\Component\Yaml\Parser->parseBlock(7, 'encoders:\n F...', 2816)
3 C:\wamp64\www\untitled\vendor\symfony\symfony\src\Symfony\Component\Yaml\Parser.php(450): Symfony\Component\Yaml\Parser->doParse('security:\n e...', 2816)
4 C:\wamp64\www\untitled\vendor\symfony\symfony\src\Symfony\Component\Yaml\Parser.php(320): Symfony\Component\Yaml\Parser->parseBlock(6, 'security:\n e in C:\wamp64\www\untitled\
vendor\symfony\symfony\src\Symfony\Component\Config\Loader\FileLoader.php on line 179
this is my ..app/config/security.yml
security:
# https://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
security: encoders: FOS\UserBundle\Model\UserInterface: bcrypt
role_hierarchy:
ROLE_ADMIN: ROLE_USER
ROLE_SUPER_ADMIN: ROLE_ADMIN
providers:
fos_userbundle:
id: fos_user.user_provider.username
firewalls:
main:
pattern: ^/
form_login:
provider: fos_userbundle
csrf_provider: security.csrf.token_manager # Use form.csrf_provider instead for Symfony <2.4
logout: true
anonymous: 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 }
main:
anonymous: ~
# activate different ways to authenticate
# https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
#http_basic: ~
# https://symfony.com/doc/current/security/form_login_setup.html
#form_login: ~
please help me thanks :)
.../app/config/security.yml