title: Symfony 3.3 Wrong redirect to login page
body: <p>I create some API. API url's under firewall, and only authenticated users can use them.</p>
  
  <p>Request: PATCH /api/test
  Response: No route found for "PATCH /login": Method Not Allowed (Allow: GET, POST)</p>
  
  <p>Why redirect with PATCH method?</p>
  
  <p>I use FOSRestBundle and I need json response with access denied message.</p>
  
  <p>security.yml:</p>
  
  <pre><code>security:
      encoders:
          FOS\UserBundle\Model\UserInterface: bcrypt
  
      role_hierarchy:
          ROLE_ADMIN: ROLE_USER
  
      providers:
          fos_userbundle:
              id: fos_user.user_provider.username
  
      firewalls:
          dev:
              pattern: ^/(_(profiler|wdt)|css|images|js)/
              security: false
          main:
              pattern: ^/
              form_login:
                  provider: fos_userbundle
                  csrf_token_generator: security.csrf.token_manager
              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: ^/api/cities, role: ROLE_USER }
          - { path: ^/api/courses, role: ROLE_USER, allow_if: "request.getMethod() == 'GET'" }
  </code></pre>