title: Expression "has_role('ROLE_ADMIN')" denied access, with an Admin User
body: <p>I encountered a problem on roles promotion in Symfony3, as the title suggests.</p>
  
  <p>The error is simple :</p>
  
  <pre><code>Expression "has_role('ROLE_ADMIN')" denied access.
  </code></pre>
  
  <p>I promoted the user with </p>
  
  <pre><code>php bin/console fos:user:promote (etc.), 
  </code></pre>
  
  <p>resulting in :</p>
  
  <pre><code>a:1:{i:0;s:10:"ROLE_ADMIN";}
  </code></pre>
  
  <p>in the database.</p>
  
  <p>I also put an annotation on a my controller method :</p>
  
  <pre><code>/**
   * @Security("has_role('ROLE_ADMIN')")
   */
  </code></pre>
  
  <p>And my security.yml looks like this :</p>
  
  <pre><code>security:
   encoders:
    MR\UserBundle\Entity\User: sha512
  
  role_hierarchy:
        ROLE_ADMIN:       [ROLE_USER, ROLE_MODERATOR]
        ROLE_SUPER_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
  
  providers:
    main:
      id: fos_user.user_provider.username
  
  firewalls:
    dev:
      pattern: ^/(_(profiler|wdt)|css|images|js)/
      security: false
    main_login:
      pattern:   ^/login$
      anonymous: true
    main:
      pattern:      ^/
      anonymous:    true
      provider:     main
      form_login:
        login_path: fos_user_security_login
        check_path: fos_user_security_check
      logout:
        path:       fos_user_security_logout
        target:     /
      remember_me:
        secret:     %secret%
  
  access_control:
    #- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
  </code></pre>
  
  <p>Do not bother with the visible increments, there are a mere effect of my copy-paste.</p>
  
  <p>I hope I did not missed an obvious point, but I'd prefer it more than a nothing-solved case.</p>
  
  <p>Thanks in advance</p>