0

I need help. I install FOSUserBundle and have error

The service "fos_user.security.login_manager" has a dependency on a non-existent service "security.token_storage".

I do not understand why this happens. Search on the Internet has not yielded results

My composer.json

{
  "name": "symfony/framework-standard-edition",
  "license": "MIT",
  "type": "project",
  "description": "The \"Symfony Standard Edition\" distribution",
  "autoload": {
    "psr-4": { "": "src/" },
    "classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
  },
  "autoload-dev": {
    "psr-4": { "Tests\\": "tests/" },
    "files": [ "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" ]
  },
  "require": {
    "php": ">=5.5.9",
    "doctrine/doctrine-bundle": "^1.6",
    "doctrine/orm": "^2.5",
    "incenteev/composer-parameter-handler": "^2.0",
    "sensio/distribution-bundle": "^5.0",
    "sensio/framework-extra-bundle": "^3.0.2",
    "symfony/monolog-bundle": "^3.0.2",
    "symfony/polyfill-apcu": "^1.0",
    "symfony/swiftmailer-bundle": "^2.3.10",
    "symfony/symfony": "3.3.x-dev",
    "twig/twig": "^1.0||^2.0",
    "doctrine/doctrine-cache-bundle": "^1",
    "novuscom/cmfbundle": "dev-master",
    "gedmo/doctrine-extensions": "dev-master",
    "friendsofsymfony/user-bundle": "~2.0@dev",
    "knplabs/knp-paginator-bundle": "^2.5",
    "helios-ag/fm-elfinder-bundle": "dev-master",
    "stfalcon/tinymce-bundle": "dev-master",
    "symfony/assetic-bundle": "^2.7",
    "knplabs/knp-menu": "^2.1",
    "knplabs/knp-menu-bundle": "^2.1",
    "apy/breadcrumbtrail-bundle": "dev-master",
    "liip/imagine-bundle": "^1.4",
    "openlss/lib-array2xml": "^0.0.10",
    "guzzlehttp/guzzle": "^6.2"
  },
  "require-dev": {
    "sensio/generator-bundle": "^3.0",
    "symfony/phpunit-bridge": "^3.0"
  },
  "scripts": {
    "symfony-scripts": [
      "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
    ],
    "post-install-cmd": [
      "@symfony-scripts"
    ],
    "post-update-cmd": [
      "@symfony-scripts"
    ]
  },
  "config": {
    "platform": {
      "php": "5.5.9"
    },
    "sort-packages": true
  },
  "extra": {
    "symfony-app-dir": "app",
    "symfony-bin-dir": "bin",
    "symfony-var-dir": "var",
    "symfony-web-dir": "web",
    "symfony-tests-dir": "tests",
    "symfony-assets-install": "relative",
    "incenteev-parameters": {
      "file": "app/config/parameters.yml"
    },
    "branch-alias": {
      "dev-master": "3.3-dev"
    }
  }
}
Alexander
  • 85
  • 1
  • 7
  • Check if the token_storage service is present - run command "bin/console debug:container token" and there should be a line "security.token_storage" – Jan Rydrych Mar 14 '17 at 07:24
  • take a look at this http://stackoverflow.com/a/36533186/2270041 – Matteo Mar 14 '17 at 08:24
  • try this http://stackoverflow.com/a/34333270/2270041 – Matteo Mar 14 '17 at 08:41
  • Comand "bin/console debug:container token" result https://yadi.sk/d/W5vsLrnX3FmAHi – Alexander Mar 14 '17 at 08:50
  • Bit puzzling. You didn't by any chance remove SecurityBundle from AppKernel.php or otherwise mess around with it? It's almost like you are using Symfony 2.3. Have you done a composer update? – Cerad Mar 14 '17 at 12:32
  • Is the `security.yml` file still loaded from your `config.yml` file? Can you please show your current `security.yml` file? The SecurityBundle is enabled? – xabbuh Mar 14 '17 at 13:06

0 Answers0