Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/248.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/symfony/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在Symfony 3.4(PHP)中注册Google OAuth捆绑包_Php_Symfony_Google Oauth_Symfony 3.4 - Fatal编程技术网

如何在Symfony 3.4(PHP)中注册Google OAuth捆绑包

如何在Symfony 3.4(PHP)中注册Google OAuth捆绑包,php,symfony,google-oauth,symfony-3.4,Php,Symfony,Google Oauth,Symfony 3.4,我的目标是将GoogleOAuth合并到我的Symfony3.4.22项目中。 我使用的是以Symfony为基础构建的Pimcore 5.6。 但是有一个错误 我尝试了各种方法来注册GoogleOAuth捆绑包,但没有找到解决方案。 在测试Symfony 4项目上运行良好 包括以下软件包: composer require knpuniversity/oauth2-client-bundle --ignore-platform-reqs composer require league/oauth

我的目标是将GoogleOAuth合并到我的Symfony3.4.22项目中。 我使用的是以Symfony为基础构建的Pimcore 5.6。 但是有一个错误

我尝试了各种方法来注册GoogleOAuth捆绑包,但没有找到解决方案。 在测试Symfony 4项目上运行良好

包括以下软件包:

composer require knpuniversity/oauth2-client-bundle --ignore-platform-reqs
composer require league/oauth2-google --ignore-platform-reqs
和注册包: app/AppKernel.php

$collection->addBundle(new KnpU\OAuth2ClientBundle\KnpUOAuth2ClientBundle, 0, ['test', 'prod', 'dev', 'staging']);
我不知道如何注册GoogleOAuth捆绑包

我的SymfonyV3.4PHP7.1项目

Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\InvalidArgumentException: Class "AppBundle\Controller\GoogleController" used for service "AppBundle\Controller\GoogleController" cannot be found. in /var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php on line 68

Symfony\Component\DependencyInjection\Exception\InvalidArgumentException: Class "AppBundle\Controller\GoogleController" used for service "AppBundle\Controller\GoogleController" cannot be found. in /var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php on line 68
我希望谷歌捆绑包能够注册——并且正在努力解决这个问题。感谢您的帮助。

已解决

我有:

类GoogleController扩展了FrontendController


应该有:类GoogleController扩展AbstractController

是什么让您认为给定的错误消息与任何其他捆绑包相关?它只是告诉您,自动加载器无法检测到给定的类。你的问题使我对这个问题有了不同的看法。解决了,我在下面发布了解决方案。