title: Symfony2 : InvalidTypeException in ArrayNode.php line 267:
body: <p>Its really bothering me a lot. Where did I make mistake or How can I solve this error.</p>
  
  <p>I got an error as <code>InvalidTypeException in ArrayNode.php line 267:</code> -- <code>Invalid type for path "security.providers.in_memory.memory.users.admin:{ password". Expected array, but got string</code></p>
  
  <p>I am implementing the controller from symfony cookbook. Here is my <code>security.yml</code></p>
  
  <pre><code>security:
  encoders:
      Symfony\Component\Security\Core\User\User: plaintext
      Leo\CLUBBundle\Entity\User: bcrypt
  role_hierarchy:
      ROLE_ADMIN: [ROLE_USER]
  providers:
      chain_provider:
          chain:
              providers: [in_memory, user_db]
      in_memory:
          memory:
              users:
                  admin:{ password: adminpass, roles:ROLE_ADMIN}
      user_db:
          entity:{ class: LeoCLUBBundle:User, property:username }
  firewalls:
      main:
          pattern: /.*
          form_login:
              login_path: /login_path
              check_path: /login_check
              default_target_path: /
          logout:
              path: /logout
              target: /
          security: true
          anonymous: true
  access_control:
      - { path: /login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
      - { path: /user, roles: ROLE_ADMIN }
      - { path: /.*, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  </code></pre>