Q:

How to deny access to a route for logged user? 

I want to deny access of the signup/signin route for logged user directly in the access_controls of security.yaml
Anyone know how to do it cause in the documentation?  I didn't see stuff like that. 
current access_controls : 
access_control:

    - { path: ^/signin$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/signup$, roles: IS_AUTHENTICATED_ANONYMOUSLY}
    - { path: ^/product$, roles: IS_AUTHENTICATED_ANONYMOUSLY }

A:

You can add an access_control allowed only if user has not role ROLE_USER in your security.yaml :
    - { path: ^/sign(up|in), allow_if: "not has_role('ROLE_USER')" }

You have to add any access_denied_url 
    access_denied_url: /access-denied

And add a controller action with route /access-denied that redirect user to route Login if not logged and to profil page if logged : 
/**
 * @Route("/access-denied", name="app_access_denied")
 */
public function accessDenied()
{
    if ( $this->getUser() ) {
        return $this->redirectToRoute('app_user_home');
    }

    return $this->redirectToRoute('app_login');
}

