Error: Class "Doctrine\Common\Lexer\AbstractLexer" not found

Created on 1 March 2023, over 1 year ago
Updated 28 June 2023, over 1 year ago

Hi All,

When I update Drupal 9.5.2 to 9.5.4 by running composer update then I got this issue. Any body could help or got something like this?
I'm applicate very much If anyone can share and help.

Thanks!! /\

---------------------------------------------------------------------------------------
The website encountered an unexpected error. Please try again later.
Error: Class "Doctrine\Common\Lexer\AbstractLexer" not found in include() (line 21 of /home/ide/project/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php).
include() (Line: 578)
Composer\Autoload\ClassLoader::Composer\Autoload\{closure}() (Line: 432)
Composer\Autoload\ClassLoader->loadClass() (Line: 79)
Drupal\Component\Annotation\Doctrine\SimpleAnnotationReader->__construct() (Line: 90)
Drupal\Component\Annotation\Plugin\Discovery\AnnotatedClassDiscovery->getAnnotationReader() (Line: 76)
Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery->getAnnotationReader() (Line: 110)
Drupal\Component\Annotation\Plugin\Discovery\AnnotatedClassDiscovery->getDefinitions() (Line: 86)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions() (Line: 291)
Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() (Line: 181)
Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 199)
Drupal\language\LanguageNegotiator->getNegotiationMethods() (Line: 136)
Drupal\language\HttpKernel\PathProcessorLanguage->initProcessors() (Line: 112)
Drupal\language\HttpKernel\PathProcessorLanguage->processOutbound() (Line: 108)
Drupal\Core\PathProcessor\PathProcessorManager->processOutbound() (Line: 388)
Drupal\Core\Routing\UrlGenerator->processPath() (Line: 297)
Drupal\Core\Routing\UrlGenerator->generateFromRoute() (Line: 105)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute() (Line: 765)
Drupal\Core\Url->toString() (Line: 223)
Drupal\system\Controller\DbUpdateController->info() (Line: 174)
Drupal\system\Controller\DbUpdateController->handle()
call_user_func_array() (Line: 115)
Drupal\Core\Update\UpdateKernel->handleRaw() (Line: 76)
Drupal\Core\Update\UpdateKernel->handle() (Line: 27)

πŸ’¬ Support request
Status

Fixed

Version

10.0 ✨

Component
ComposerΒ  β†’

Last updated 1 day ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States smethawee

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Issue created by @smethawee
  • πŸ‡ΊπŸ‡ΈUnited States smethawee
  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    There should be a file at vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php, which Composer should have installed for you.

    You can try deleting the entire vendor directory and rerunning composer install, which should redownload all packages.

  • πŸ‡ΊπŸ‡ΈUnited States smethawee

    Hi@longwave, Thank you very much for your comment, When I did that then I running Drush command please see below:

    drush cr

    Fatal error: Uncaught Exception: Could not locate autoload.php. cwd is /home/ide/project; __DIR__ is /home/ide/project/vendor/drush/drush in /home/ide/project/vendor/drush/drush/drush.php:58
    Stack trace:
    #0 /home/ide/project/vendor/drush/drush/includes/preflight.inc(18): require()
    #1 phar:///usr/local/bin/drush/bin/drush.php(143): drush_main()
    #2 /usr/local/bin/drush(14): require('...')
    #3 {main}
    thrown in /home/ide/project/vendor/drush/drush/drush.php on line 58
    ----------------------
    Again, Thank much!

  • πŸ‡ΊπŸ‡ΈUnited States smethawee

    Hi@longwave,

    Everything good to go now.

    Thank you very much for help.

    Thanks!

  • Status changed to Fixed over 1 year ago
  • Actually, as a support request, this is fixed.

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Status changed to Fixed over 1 year ago
  • πŸ‡ΉπŸ‡·Turkey Kartagis Istanbul

    I have the same issue. In my case, it's 10.0.x HEAD. I removed the vendor directory and performed a composer install as longwave suggested, which didn't work. However, the reported file's location is different with me. It's `vendor/doctrine/lexer/src/AbstractLexer.php`. Please advise.

Production build 0.71.5 2024