更改模块路径导致报错,/vendor/symfony/class-loader/ApcClassLoader.php

Submitted by dravenk on Sat, 11/18/2017 - 17:15

更改之前安装过的模块的路径导致报错,错误信息如下   

Warning: require(/**********/modules/contrib/tagadelic/src/Form/TagadelicSettingsForm.php): failed to open stream: No such file or directory in require() (line 110 of /**********/vendor/symfony/class-loader/ApcClassLoader.php) #0 /**********/core/includes/bootstrap.inc(566): _drupal_error_handler_real(2, 'require(/Users/...', '/**********/...', 110, Array) #1 /**********/vendor/symfony/class-loader/ApcClassLoader.php(110): _drupal_error_handler(2, 'require(/Users/...', '/**********/...', 110, Array) #2 /**********/vendor/symfony/class-loader/ApcClassLoader.php(110): require() #3 [internal function]: Symfony\Component\ClassLoader\ApcClassLoader->loadClass('Drupal\\tagadeli...') #4 [internal function]: spl_autoload_call('Drupal\\tagadeli...') #5 /.../core/lib/Drupal/Core/DependencyInjection/ClassResolver.php(23): class_exists('Drupal\\tagadeli...') #6 /**********/core/lib/Drupal/Core/Controller/HtmlFormController.php(47): Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition('Drupal\\tagadeli...') #7 /**********/core/lib/Drupal/Core/Controller/FormController.php(59): Drupal\Core\Controller\HtmlFormController->getFormObject(Object(Drupal\Core\Routing\RouteMatch), 'Drupal\\tagadeli...') #8 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch)) #9 /**********/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #10 /**********/core/lib/Drupal/Core/Render/Renderer.php(576): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #11 /**********/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #12 /**********/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #13 [internal function]: Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #14 /**********/vendor/symfony/http-kernel/HttpKernel.php(153): call_user_func_array(Object(Closure), Array) #15 /**********/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #16 /**********/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /**********/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /**********/core/modules/ban/src/BanMiddleware.php(50): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /**********/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /**********/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /**********/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /**********/core/lib/Drupal/Core/DrupalKernel.php(657): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /**********/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #24 {main}.

 需要重建缓存并重启 php-fpm ,本地开发环境处理如下:  

drush cr

brew services restart php71