sulu / SuluArticleBundle

Bundle for managing localized content-rich entities like blog-posts in the Sulu content management system
MIT License
52 stars 77 forks source link

Symfony 6.3 annotation issue #641

Closed hual7 closed 1 year ago

hual7 commented 1 year ago
Q A
Bug? yes
New Feature? no
Related issue  https://github.com/sulu/sulu/issues/7095, https://github.com/symfony/symfony/issues/50617
SuluArticleBundle Version 2.5.0
Sulu Version 2.5.9

Actual Behavior

After upgrading to Symfony 6.3 console shows a semantical error in FileLoader.php line 182: [Semantical Error] The annotation "@FOS\RestBundle\Controller\Annotations\Get" in method Sulu\Bundle\ArticleBundle\Controller\ArticleController::getAction() was never imported. Did you maybe forget to add a "use" statement for this annotation? in /vendor/sulu/article-bundle/Resources/config/routing_api.yml (which is being imported from "/config/routes/sulu_admin.yaml"). Make sure there is a loader supporting the "rest" type.

and AnnotationException.php line 40: [Semantical Error] The annotation "@FOS\RestBundle\Controller\Annotations\Get" in method Sulu\Bundle\ArticleBundle\Controller\ArticleController::getAction() was never imported. Did you maybe forget to add a "use" statement for this annotation?

Expected Behavior

It should not error.

Steps to Reproduce

composer up

EikiProg commented 1 year ago

I have the same type of errors with a fresh install when sulu call for admin/config

[Semantical Error] The annotation "@JMS\Serializer\Annotation\Groups" in property Sulu\Bundle\MarkupBundle\Markup\Link\LinkConfiguration::$title was never imported. Did you maybe forget to add a "use" statement for this annotation?
alexander-schranz commented 1 year ago

This sounds like a BC break in Symfony or FOSRestBundle itself, so I think the issue need to be resolved there.Do you already now a upstream issue which we can link here?

alexander-schranz commented 1 year ago

This should now be fixed with: https://github.com/handcraftedinthealps/ElasticsearchBundle/releases/tag/5.4.1:

composer update handcraftedinthealps/ElasticsearchBundle