title: Unable to move a controller class to a different folder
body: <p>I took over a project from another developer, so I want to move a lot of his code to a temp folder to clear things up and I'll go back to his stuff if I need any examples. </p>
  
  <p>So in moving one of his controller classes to a temp folder "src/Controller/Temp", I get the following message:</p>
  
  <blockquote>
    <p>The autoloader expected class "App\Controller\Temp\AccountSetupController" to be defined in file "/var/www/vhosts/mywebsite.com/vendor/composer/../../src/Controller/Temp/AccountSetupController.php". The file was found but the class was not in it, the class name or namespace probably has a typo in /var/www/vhosts/mywebsite.com/config/services.yaml (which is loaded in resource "/var/www/vhosts/mywebsite.com/config/services.yaml").</p>
  </blockquote>
  
  <p>Here is what the beginning of the controller class (AccountSetupController.php)  looks like (that I moved from /src/Controller/CreatorDashboard to /src/Controller/Temp):</p>
  
  <p>
  
  <pre><code>namespace App\Controller\CreatorDashboard;
  
  use Symfony\Component\HttpFoundation\Request;
  use Symfony\Component\Routing\Annotation\Route;
  use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  
  /**
  * @Route("/dashboard/setup")
  */
  class AccountSetupController extends Controller
  {
  </code></pre>
  
  <p>Here is what my services.yaml file looks like: </p>
  
  <pre><code># This file is the entry point to configure your own services.
  # Files in the packages/ subdirectory configure your dependencies.
  
  # Put parameters here that don't need to change on each machine where the app is deployed
  # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
  parameters:
      locale: 'en'
      aws.bucket: 'bucket'
      aws.compliance.bucket: 'bucket.compliance'
      num_notification_records: 5
      default_profile_photo_id: 1
  
  services:
      # default configuration for services in *this* file
      _defaults:
          autowire: true      # Automatically injects dependencies in your services.
          autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
          public: false       # Allows optimizing the container by removing unused services; this also means
                              # fetching services directly from the container via $container-&gt;get() won't work.
                              # The best practice is to be explicit about your dependencies anyway.
  
      Liip\ImagineBundle\Service\FilterService: '@liip_imagine.service.filter'
  
      Imagine\Image\ImagineInterface: '@liip_imagine.gd'
  
      App\Repository\PhotoRepository:
          arguments: ['@liip_imagine.imagine_interface']
  
  
      # makes classes in src/ available to be used as services
      # this creates a service per class whose id is the fully-qualified class name
      App\:
          resource: '../src/*'
          exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}'
  
      # controllers are imported separately to make sure services can be injected
      # as action arguments even if you don't extend any base controller class
      App\Controller\:
          resource: '../src/Controller'
          tags: ['controller.service_arguments']
  
      # add more service definitions when explicit configuration is needed
      # please note that last definitions always *replace* previous ones
  </code></pre>
  
  <p>It worked perfectly fine before, all I did was move the controller class to a different location. </p>
  
  <p>Why can't the autoloader load a moved controller class? </p>