title: How to enable the annotation reader service for sensio framework controller listener?
body: <p>After a composer update to fix some vulnerabilities on package used by my application, I handle an error:</p>
  
  <blockquote>
    <p>The service "sensio_framework_extra.controller.listener" has a dependency on a non-existent service "annotation_reader"</p>
  </blockquote>
  
  <p>As suggested in <a href="https://stackoverflow.com/questions/47290778/enable-annotations-on-the-validator-cannot-be-set-as-annotations-support-is-dis">this answer</a>, I tried to add the <code>doctrine/annotations</code> package, but it doesn't solved my issue (package seems to be already installed). </p>
  
  <pre><code>λ composer require doctrine/annotations
  Using version ^1.8 for doctrine/annotations
  ./composer.json has been updated
  Loading composer repositories with package information
  Updating dependencies (including require-dev)
  Restricting packages listed in "symfony/symfony" to "4.2.*"
  Nothing to install or update
  </code></pre>
  
  <p>Here is the packages used by my <code>composer.json</code>:</p>
  
  
  
  <pre><code>"require": {
      "php": "^7.1.3",
      "ext-ctype": "*",
      "ext-fileinfo": "*",
      "ext-iconv": "*",
      "ext-json": "*",
      "doctrine/doctrine-fixtures-bundle": "^3.1",
      "ekyna/payum-monetico-bundle": "^1.5",
      "gedmo/doctrine-extensions": "^2.4",
      "knplabs/knp-paginator-bundle": "^3.0",
      "payum/offline": "^1.5",
      "payum/paypal-express-checkout-nvp": "^1.5",
      "payum/payum-bundle": "^2.3",
      "php-http/guzzle6-adapter": "^2.0",
      "sensio/framework-extra-bundle": "^5.1",
      "stof/doctrine-extensions-bundle": "^1.3",
      "symfony/asset": "4.2.*",
      "symfony/console": "4.2.*",
      "symfony/dotenv": "4.2.*",
      "symfony/expression-language": "4.2.*",
      "symfony/flex": "^1.1",
      "symfony/form": "4.2.*",
      "symfony/framework-bundle": "4.2.*",
      "symfony/monolog-bundle": "^3.1",
      "symfony/orm-pack": "1.*",
      "symfony/process": "4.2.*",
      "symfony/security-bundle": "4.2.*",
      "symfony/serializer-pack": "1.*",
      "symfony/swiftmailer-bundle": "^3.1",
      "symfony/templating": "4.2.*",
      "symfony/translation": "4.2.*",
      "symfony/twig-bundle": "4.2.*",
      "symfony/validator": "4.2.*",
      "symfony/web-link": "4.2.*",
      "symfony/webpack-encore-bundle": "^1.4",
      "symfony/yaml": "4.2.*",
      "twig/extensions": "^1.5",
      "vich/uploader-bundle": "^1.8"
  },
  "require-dev": {
      "codeception/codeception": "^2.5",
      "codeception/c3": "2.*",
      "friendsofphp/php-cs-fixer": "^2.14",
      "php-coveralls/php-coveralls": "^2.1",
      "phpmd/phpmd": "2.*",
      "squizlabs/php_codesniffer": "*",
      "symfony/debug-pack": "*",
      "symfony/maker-bundle": "^1.11",
      "symfony/profiler-pack": "*",
      "symfony/test-pack": "^1.0",
      "symfony/web-server-bundle": "4.2.*"
  }
  </code></pre>
  
  <p>Edit :
  I'm using all the framework, I've manually dropped cache to be sure there is no problem. I rebooted my dev computer too. Finally, I went around the problem by deploying my github project in another directory and application works fine. I don't close this question because I want to find the problem if it occurs in production.</p>