title: Issue with namespace. Using method from wrong object
body: <p>I'm having an issue with my code below. The error I get is:</p>
  
  <blockquote>
    <p>Catchable fatal error: Argument 1 passed to
    Closure::QuizApp\Routes{closure}() must be an instance of
    QuizApp\Routes\ServerRequestInterface, instance of Slim\Http\Request
    given in /var/www/QuizApp/Routes/AuthRoutes.php on line 8</p>
  </blockquote>
  
  <p>Is this because I'm declaring a namespace at the top? I can solve it by using an alias, but I'm curious as to why it's happening in the first place.</p>
  
  <pre><code>&lt;?php
  
  namespace QuizApp\Routes;
  
  use \Psr\Http\Message\ServiceRequestInterface;
  use \Psr\Http\Message\ResponseInterface;
  
  $app-&gt;get('/login', function(ServerRequestInterface $req, ResponseInterface $resp) use ($config) {
  
      $callback = $config['site']['domain'] . $this-&gt;router-&gt;pathFor('fb_callback');
      return $this-&gt;FBAuthServices-&gt;redirect_to_auth_page($config['facebook']['permission'],
                                                          $callback);
  
  });
  </code></pre>
  
  <p><strong>Edit</strong> After looking at my own code, I realize I don't even need the namespace. The class that was in this file, has now been moved out. Would still love an answer though, I'm curious.</p>