【发布时间】:2016-11-16 23:44:31
【问题描述】:
我正在做一个项目,我想连接到 Steam,以便根据登录的用户提取信息 - 我的应用程序正在运行 Symfony 3,我在 git 上找到了一个我想按顺序使用的包验证用户并将其登录到我的网站。
这是捆绑包 - https://github.com/SirWaddles/SteamAuthBundle
因为没有 composer 包,我已将包克隆到我的 AppBundle 旁边的 src/ 文件夹中 - 在 appKernal 中启用并按照包中的说明连接了配置和安全性 - 我现在收到以下错误
The service "steam.user_service" has a dependency on a non-existent service "guzzle.client.steam_user".
现在我知道这是从以下服务类调用的
services:
steam.user_provider:
class: SteamAuthBundle\Security\User\SteamUserProvider
arguments: [ '@doctrine.orm.default_entity_manager', '@steam.user_service', '%steam_auth.user_class%' ]
steam.security.authentication.provider:
class: SteamAuthBundle\Security\Authentication\SteamProvider
arguments: [ '@steam.user_provider', '@guzzle.client.steam' ]
public: false
steam.security.authentication.listener:
class: SteamAuthBundle\Security\Firewall\SteamListener
arguments: [ 'home', '@security.token_storage', '@security.authentication.manager', '@router' ]
public: false
steam.security.authentication.entry_point:
class: SteamAuthBundle\Security\EntryPoint\SteamEntryPoint
arguments: [ '@security.http_utils' ]
public: false
steam.user_service:
class: SteamAuthBundle\Service\SteamUserService
arguments: [ '@guzzle.client.steam_user', '%steam_auth.steam_key%' ]
现在当然 guzzle 服务会引起问题,但我没有使用 Guzzle 的经验 - 我对它的基础有点了解,但谁能指出我可能遗漏的任何明显内容?任何帮助将不胜感激或指点!
【问题讨论】:
-
如果你查看 composer.json 文件你会发现这个包依赖于一个叫做:八点/guzzle-bundle 你确定没有 composer 包吗?如果是这样,请查看作曲家网站以了解如何从 git 存储库安装。这样做将安装所有必要的依赖项,并将所有内容留在供应商之下。该软件包确实存在:packagist.org/packages/sirwaddles/steamauth 没有稳定版本。需要使用开发版。 stackoverflow.com/questions/18214600/…
-
嘿@Cerad 感谢您的回复!我以前知道作曲家包,但不熟悉使用 dev-master 分支,所以谢谢!原来我试图使用的包名为“eightpoints/guzzle-bundle”的包需要 php -v 5.6 但我正在运行 7 - 这有点痛苦:/但再次感谢您的进步:)
标签: authentication symfony steam