This site suddenly is making an AnnotionException. Nothing was changed on the server nor de site itself, just maybe Apache / PHP updates. I tried using different PHP versions, 7.4 / 8.0 / 8.1 but all give the same error.
When I run the site locally on 8.0 or 8.1 there is no error. Can anyone point me in the right direction as to where I should start looking?
Drupal 9.4.0
DoctrineCommonAnnotationsAnnotationException: [Semantical Error] The class "DrupallanguageAnnotationLanguageNegotiation" is not annotated with @Annotation. Are you sure this class can be used as annotation? If so, then you need to add @Annotation to the _class_ doc comment of "DrupallanguageAnnotationLanguageNegotiation". If it is indeed no annotation, then you need to add @IgnoreAnnotation("LanguageNegotiation") to the _class_ doc comment of class DrupallanguagePluginLanguageNegotiationLanguageNegotiationBrowser. in DoctrineCommonAnnotationsAnnotationException::semanticalError() (line 39 of /home/avascosolar/test/app/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php). DrupalComponentAnnotationDoctrineDocParser->Annotation() (Line: 640) DrupalComponentAnnotationDoctrineDocParser->Annotations() (Line: 338) DrupalComponentAnnotationDoctrineDocParser->parse('/** * Class for identifying language from the browser Accept-language HTTP header. * * @LanguageNegotiation( * id = DrupallanguagePluginLanguageNegotiationLanguageNegotiationBrowser::METHOD_ID, * weight = -2, * name = @Translation("Browser"), * description = @Translation("Language from the browser's language settings."), * config_route_name = "language.negotiation_browser" * ) */', 'class DrupallanguagePluginLanguageNegotiationLanguageNegotiationBrowser') (Line: 101) DrupalComponentAnnotationDoctrineSimpleAnnotationReader->getClassAnnotations(Object) (Line: 125) DrupalComponentAnnotationDoctrineSimpleAnnotationReader->getClassAnnotation(Object, 'DrupallanguageAnnotationLanguageNegotiation') (Line: 145) DrupalComponentAnnotationPluginDiscoveryAnnotatedClassDiscovery->getDefinitions() (Line: 86) DrupalComponentPluginDiscoveryDerivativeDiscoveryDecorator->getDefinitions() (Line: 285) DrupalCorePluginDefaultPluginManager->findDefinitions() (Line: 175) DrupalCorePluginDefaultPluginManager->getDefinitions() (Line: 22) DrupalCorePluginDefaultPluginManager->getDefinition('language-url') (Line: 185) DrupallanguageLanguageNegotiator->negotiateLanguage('language_interface', 'language-url') (Line: 133) DrupallanguageLanguageNegotiator->initializeType('language_interface') (Line: 218) DrupallanguageConfigurableLanguageManager->getCurrentLanguage() (Line: 92) DrupallanguageEventSubscriberLanguageRequestSubscriber->setLanguageOverrides() (Line: 74) DrupallanguageEventSubscriberLanguageRequestSubscriber->onKernelRequestLanguage(Object, 'kernel.request', Object) call_user_func(Array, Object, 'kernel.request', Object) (Line: 142) DrupalComponentEventDispatcherContainerAwareEventDispatcher->dispatch(Object, 'kernel.request') (Line: 134) SymfonyComponentHttpKernelHttpKernel->handleRaw(Object, 1) (Line: 80) SymfonyComponentHttpKernelHttpKernel->handle(Object, 1, 1) (Line: 58) DrupalCoreStackMiddlewareSession->handle(Object, 1, 1) (Line: 48) DrupalCoreStackMiddlewareKernelPreHandle->handle(Object, 1, 1) (Line: 191) Drupalpage_cacheStackMiddlewarePageCache->fetch(Object, 1, 1) (Line: 128) Drupalpage_cacheStackMiddlewarePageCache->lookup(Object, 1, 1) (Line: 82) Drupalpage_cacheStackMiddlewarePageCache->handle(Object, 1, 1) (Line: 48) DrupalCoreStackMiddlewareReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51) DrupalCoreStackMiddlewareNegotiationMiddleware->handle(Object, 1, 1) (Line: 23) StackStackedHttpKernel->handle(Object, 1, 1) (Line: 709) DrupalCoreDrupalKernel->handle(Object) (Line: 19)