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 HWIOAuthBundle错误不存在服务“;会议“;_Symfony_Hwioauthbundle - Fatal编程技术网

Symfony HWIOAuthBundle错误不存在服务“;会议“;

Symfony HWIOAuthBundle错误不存在服务“;会议“;,symfony,hwioauthbundle,Symfony,Hwioauthbundle,我看了所有的兔子,但找不到这方面的参考: 配置HWIOAuthBundle并解决一些问题后,我出现以下错误: ( ! ) Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException' with message 'The service "hwi_oauth.resource_owner.google" has a dependency on a

我看了所有的兔子,但找不到这方面的参考:

配置HWIOAuthBundle并解决一些问题后,我出现以下错误:

 ( ! ) Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException' with message 'The service "hwi_oauth.resource_owner.google" has a dependency on a non-existent service "session".' in E:\Servidor\Wamp\wamp\www\DEVELOPMENT\magnetics\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass.php on line 64
我使用的是Symfony 2.6,以下是我的配置文件:

imports:
- { resource: parameters.yml }
- { resource: security.yml }

framework:
#esi:             ~
translator:      { fallback: %locale% }
secret:          %secret%
router:
    resource: "%kernel.root_dir%/config/routing.yml"
    strict_requirements: %kernel.debug%
form:            ~
csrf_protection: false
validation:      { enable_annotations: true }
templating:
    engines: ['twig']
    #assets_version: SomeVersionScheme
default_locale:  "%locale%"
trusted_proxies: ~
session:         false
fragments:       ~

hwi_oauth:
# name of the firewall in which this bundle is active, this setting MUST be set
firewall_name: secured_area

resource_owners:
    google:
        type:                google
        client_id:           "977681365085-3pb"
        client_secret:       "0IvhJ-DL7"
        scope:               "https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile"
        #options:
            #access_type:  offline

# Twig Configuration
twig:
debug:            %kernel.debug%
strict_variables: %kernel.debug%
exception_controller: 'FOS\RestBundle\Controller\ExceptionController::showAction'

# Assetic Configuration
assetic:
debug:          %kernel.debug%
use_controller: false
bundles:        [ MagneticsAdminBundle ]
#java: /usr/bin/java
filters:
    cssrewrite: ~
    #closure:
    #    jar: %kernel.root_dir%/Resources/java/compiler.jar
    #yui_css:
    #    jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar

# Doctrine Configuration
doctrine:
dbal:
    driver:   %database_driver%
    host:     %database_host%
    port:     %database_port%
    dbname:   %database_name%
    user:     %database_user%
    password: %database_password%
    charset:  UTF8
    # if using pdo_sqlite as your database driver, add the path in parameters.yml
    # e.g. database_path: %kernel.root_dir%/data/data.db3
    # path:     %database_path%

orm:
    auto_generate_proxy_classes: %kernel.debug%
    auto_mapping: true

# Swiftmailer Configuration
swiftmailer:
transport: %mailer_transport%
host:      %mailer_host%
username:  %mailer_user%
password:  %mailer_password%
spool:     { type: memory }

sensio_framework_extra:
view: { annotations: false }

fos_rest:
disable_csrf_role: ROLE_API
param_fetcher_listener: true
view:
    mime_types:
        json: ['application/json', 'application/json;version=1.0', 'application/json;version=1.1']
    view_response_listener: 'force'
    formats:
        xml:  true
        json: true
    templating_formats:
        html: true
format_listener:
    rules:
        - { path: ^/, priorities: [ html, json, xml ], fallback_format: ~, prefer_extension: true }
    media_type:
        version_regex: '/(v|version)=(?P<version>[0-9\.]+)/'
exception:
    codes:
        'Symfony\Component\Routing\Exception\ResourceNotFoundException': 404
        'Doctrine\ORM\OptimisticLockException': HTTP_CONFLICT
    messages:
        'Symfony\Component\Routing\Exception\ResourceNotFoundException': true
allowed_methods_listener: true
access_denied_listener:
    json: true
body_listener: true

fos_http_cache:
cache_control:
    rules:
        # the controls section values are used in a call to Response::setCache();
        -
            match:
                path: ^/notes
                methods: [GET, HEAD]
            headers:
                cache_control: { public: true, max_age: 15, s_maxage: 30 }
                last_modified: "-1 hour"
                vary: [Accept-Encoding, Accept-Language]
导入:
-{resource:parameters.yml}
-{资源:security.yml}
框架:
#esi:~
转换器:{回退:%locale%}
秘密:%secret%
路由器:
资源:“%kernel.root\u dir%/config/routing.yml”
严格的\u要求:%kernel.debug%
表格:~
csrf_保护:错误
验证:{enable_annotations:true}
模板:
引擎:['twig']
#资产版本:SomeVersionScheme
默认语言环境:“%locale%”
受信任的_代理:~
会话:false
片段:~
卫生福利及食物局局长:
#此捆绑包处于活动状态的防火墙的名称,必须设置此设置
防火墙\u名称:安全\u区域
资源所有者:
谷歌:
类型:谷歌
客户id:“977681365085-3pb”
客户机密:“0IvhJ-DL7”
范围:“https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile"
#选项:
#访问类型:脱机
#细枝形态
细枝:
调试:%kernel.debug%
严格变量:%kernel.debug%
异常\u控制器:“FOS\RestBundle\controller\ExceptionController::showAction”
#资产配置
资产:
调试:%kernel.debug%
使用控制器:false
bundles:[MagneticsAdminBundle]
#java:/usr/bin/java
过滤器:
CSSRew:~
#关闭:
#jar:%kernel.root\u dir%/Resources/java/compiler.jar
#yui_css:
#jar:%kernel.root\u dir%/Resources/java/yuicompressor-2.4.7.jar
#条令结构
教条:
dbal:
驱动程序:%1数据库\u驱动程序%
主机:%database\u主机%
端口:%database\u端口%
数据库名称:%database\u name%
用户:%database\u用户%
密码:%1数据库\u密码%
字符集:UTF8
#如果使用pdo_sqlite作为数据库驱动程序,请在parameters.yml中添加路径
#例如,数据库路径:%kernel.root\u dir%/data/data.db3
#路径:%1数据库\u路径%
orm:
自动生成代理类:%kernel.debug%
自动映射:true
#Swiftmailer配置
速递员:
传输:%mailer\u传输%
主机:%mailer\u主机%
用户名:%mailer\u用户%
密码:%mailer\u密码%
假脱机:{type:memory}
感官框架额外:
视图:{注释:false}
fos_休息:
禁用\u csrf\u角色:角色\u API
参数获取程序侦听器:true
视图:
mime_类型:
json:['application/json','application/json;version=1.0','application/json;version=1.1']
查看\u响应\u侦听器:“强制”
格式:
xml:对
json:true
模板格式:
html:对
格式\u侦听器:
规则:
-{path:^/,优先级:[html,json,xml],回退\格式:~,首选\扩展名:true}
媒体类型:
version_regex:'/(v | version)=(P[0-9\.]+)/'
例外情况:
代码:
'Symfony\Component\Routing\Exception\ResourceNotFoundException':404
“条令\ORM\OptimisticLockException”:HTTP\U冲突
信息:
“Symfony\Component\Routing\Exception\ResourceNotFoundException”:true
允许的\u方法\u侦听器:true
访问被拒绝\u侦听器:
json:true
body_listener:正确
fos_http_缓存:
缓存控制:
规则:
#控件部分的值用于对Response::setCache()的调用;
-
匹配:
路径:^/notes
方法:[获取,头部]
标题:
缓存控件:{public:true,最大年龄:15,s\u最大年龄:30}
上次修改:“-1小时”
vary:[接受编码,接受语言]

我发现了类似的问题,但没有一个解决方案对我有效,有人知道吗?

您的配置中禁用了会话

session: false
我不确定这一点,但我猜会话服务不是在会话被创建时创建的

您可以通过调试容器进行检查

$ php app/console container:debug
或者更有针对性

$ php app/console container:debug session