Skip to content

Annotations PHPDoc for FOSRest and JMS not longer working in 6.3.0 #50617

Closed
@alexander-schranz

Description

@alexander-schranz

Symfony version(s) affected

6.3.0

Description

Currently I run into the following error with the sulu/article-bundle and Symfony 6.3:

[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?

Another similar error is:

[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.

Both error do not happen on 6.2 and only Symfony dependencies where upgraded:

Bildschirmfoto 2023-06-09 um 15 38 20

How to reproduce

git clone git@github.com:alexander-schranz/sulu-demo.git
cd sulu-demo
git fetch origin
git checkout feature/sulu-symfony-upgrade-6-3

composer install # or update

# start database and es
docker compose up

# install fixtures
bin/console sulu:build dev --destroy

# start webserver
symfony serve

Visit Admin: https://127.0.0.1:8000/admin/
Login with admin/ admin

Login fails after loading https://127.0.0.1:8000/admin/config

Possible Solution

I'm not sure yet. In the stack trace there come nothing with vendor/symfony but still downgrade to 6.2:

git checkout 43f9311e9fe9bdb0f0f69ebe1472f48f126437a5
composer install

Does make the error disappear. So it must be related with some changes in the 6.3.0 version.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions