2015-05-26 3 views
1

Я посмотрел на everywhare, но не смог найти ссылку на это: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 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] 

Я нашел подобные проблемы, но ни одно из решений не работал для меня, у кого есть идеи?

ответ

2

Вы сеансы отключены в вашей конфигурации

session: false 

Я не знаю, что это точно, но я собираюсь предположить, что служба сеанс не создается, когда сеансы disabled at the framework level.

Вы можете проверить отладки контейнера

$ php app/console container:debug 

Или больше целевых

$ php app/console container:debug session 
+0

Это фиксированная моя проблема, прямо сейчас я чувствую себя очень глупо, спасибо! – JMilanes

Смежные вопросы